Jelajahi Sumber

suppression de quelques deprecated

François Drouhard 1 tahun lalu
induk
melakukan
9b3d8ddb0e

+ 1 - 1
config/packages/security.yaml

@@ -1,5 +1,5 @@
 security:
-    enable_authenticator_manager: true
+    #enable_authenticator_manager: true
 
     password_hashers:
         App\Entity\User:

+ 3 - 3
src/Controller/GenreController.php

@@ -40,7 +40,7 @@ class GenreController extends AbstractController
 			return $this->redirectToRoute('genre_liste');
 		}
 
-		return $this->renderForm('genre/ajouter.html.twig', array(
+		return $this->render('genre/ajouter.html.twig', array(
 			'form'	=>	$form,
 		));
 	}
@@ -59,7 +59,7 @@ class GenreController extends AbstractController
 			return $this->redirectToRoute('genre_liste');
 		}
 
-		return $this->renderForm('genre/modifier.html.twig', array(
+		return $this->render('genre/modifier.html.twig', array(
 			'form'	=> $form,
             'genre'   =>  $genre,
             'films' => $films
@@ -78,7 +78,7 @@ class GenreController extends AbstractController
             return $this->redirectToRoute('genre_liste');
         }
 
-		return $this->renderForm('genre/supprimer.html.twig', array(
+		return $this->render('genre/supprimer.html.twig', array(
 			'genre'  =>  $genre,
             'form'  =>  $form
 		));

+ 2 - 2
src/Controller/ProfilController.php

@@ -27,7 +27,7 @@ class ProfilController extends AbstractController
             $this->addFlash('success', "Votre profil a été modifié");
         }
 
-        return $this->renderForm('profil/monprofil.html.twig', array (
+        return $this->render('profil/monprofil.html.twig', array (
             'form'  =>  $form
         ));
     }
@@ -46,7 +46,7 @@ class ProfilController extends AbstractController
             $this->addFlash('success', "Les préférences ont été modifiées");
         }
 
-        return $this->renderForm('profil/mespreferences.html.twig', [
+        return $this->render('profil/mespreferences.html.twig', [
             'form'  =>  $form
         ]);
     }

+ 3 - 3
src/Controller/RealisateurController.php

@@ -40,7 +40,7 @@ class RealisateurController extends AbstractController
 			return $this->redirectToRoute('realisateur_liste');
 		}
 
-		return $this->renderForm('realisateur/ajouter.html.twig', array(
+		return $this->render('realisateur/ajouter.html.twig', array(
 			'form'	=>	$form
 		));
 	}
@@ -59,7 +59,7 @@ class RealisateurController extends AbstractController
 			return $this->redirectToRoute('realisateur_liste');
 		}
 
-		return $this->renderForm('realisateur/modifier.html.twig', array(
+		return $this->render('realisateur/modifier.html.twig', array(
 			'form'	=> $form,
             'realisateur'   =>  $realisateur
 		));
@@ -79,7 +79,7 @@ class RealisateurController extends AbstractController
             return $this->redirectToRoute('realisateur_liste');
         }
 
-		return $this->renderForm('realisateur/supprimer.html.twig', array(
+		return $this->render('realisateur/supprimer.html.twig', array(
 			'realisateur'  =>  $realisateur,
             'form'  =>  $form
 		));

+ 7 - 7
src/Controller/SecurityController.php

@@ -56,7 +56,7 @@ class SecurityController extends AbstractController
             $this->addFlash('success', 'L\'utilisateur a été ajouté');
             return $this->redirectToRoute('admin_index');
         }
-        return $this->renderForm('security/createuser.html.twig', array (
+        return $this->render('security/createuser.html.twig', array (
             'form'  => $form
         ));
     }
@@ -72,7 +72,7 @@ class SecurityController extends AbstractController
             $this->addFlash('success', 'L\'utilisateur a été modifié');
             return $this->redirectToRoute('admin_index');
         }
-        return $this->renderForm('security/createuser.html.twig', array (
+        return $this->render('security/createuser.html.twig', array (
             'form'  => $form
         ));
     }
@@ -90,7 +90,7 @@ class SecurityController extends AbstractController
             return $this->redirectToRoute('admin_index');
         }
         
-        return $this->renderForm('profil/preferences.html.twig', [
+        return $this->render('profil/preferences.html.twig', [
             'user'  => $options->getUser(),
             'form'  => $form
         ]);
@@ -116,7 +116,7 @@ class SecurityController extends AbstractController
             $this->addFlash("success", "L'utilisateur a bien été supprimé");
             return $this->redirectToRoute('admin_index');
         }
-        return $this->renderForm('security/supprimeruser.html.twig', array (
+        return $this->render('security/supprimeruser.html.twig', array (
             'user'  =>  $user,
             'form'  =>  $form
         ));
@@ -142,7 +142,7 @@ class SecurityController extends AbstractController
             return $this->redirectToRoute('security_attente');
         }
 
-        return $this->renderForm('security/register.html.twig', [
+        return $this->render('security/register.html.twig', [
             'form'  => $form
         ]);
     }
@@ -179,7 +179,7 @@ class SecurityController extends AbstractController
                 $this->addFlash('warning', "Cet email n'existe pas");
             }
         }
-        return $this->renderForm('security/chercheruserpourpassword.html.twig', array (
+        return $this->render('security/chercheruserpourpassword.html.twig', array (
             'form'  =>  $form
         ));
     }
@@ -196,7 +196,7 @@ class SecurityController extends AbstractController
                     $this->addFlash('success', 'Mot de passe changé, veuillez vous connecter');
                     return $this->redirectToRoute('videotheque_liste');
                 }
-                return $this->renderForm('security/password.html.twig', array(
+                return $this->render('security/password.html.twig', array(
                     'form' => $form
                 ));
             }

+ 5 - 5
src/Controller/VideothequeController.php

@@ -89,7 +89,7 @@ class VideothequeController extends AbstractController
 			return $this->redirectToRoute('videotheque_voirfilm', array('id'=>$film->getId()));
 		}
 
-		return $this->renderForm('videotheque/ajouter.html.twig', array(
+		return $this->render('videotheque/ajouter.html.twig', array(
 			'form'	=>	$form,
 		));
 	}
@@ -113,7 +113,7 @@ class VideothequeController extends AbstractController
             $films = $tmdbApiService->getFilms();
         }
         
-        return $this->renderForm('videotheque/add_tmdb.html.twig', [
+        return $this->render('videotheque/add_tmdb.html.twig', [
             'titre' => 'Ajouter via TheMovieDB.org',
             'films'  => $films,
             'nbFilms'    => $nbFilms,
@@ -135,7 +135,7 @@ class VideothequeController extends AbstractController
 			return $this->redirectToRoute('videotheque_voirfilm',array('id'=>$film->getId()));
 		}
 
-		return $this->renderForm('videotheque/modifier.html.twig', array(
+		return $this->render('videotheque/modifier.html.twig', array(
 			'form'	=> $form,
 		));
 	}
@@ -153,7 +153,7 @@ class VideothequeController extends AbstractController
             return $this->redirectToRoute('videotheque_liste');
         }
 
-		return $this->renderForm('videotheque/supprimer.html.twig', array(
+		return $this->render('videotheque/supprimer.html.twig', array(
 			'film'  =>  $film,
             'form'  =>  $form
 		));
@@ -181,7 +181,7 @@ class VideothequeController extends AbstractController
             $form = $this->createForm(CommentaireType::class, null);
         }
         
-        return $this->renderForm('videotheque/voirfilm.html.twig', array(
+        return $this->render('videotheque/voirfilm.html.twig', array(
             'film' => $film,
             'form'  =>  $form
         ));

+ 1 - 1
src/Service/ActivityListener.php

@@ -3,8 +3,8 @@ namespace App\Service;
 
 use App\Entity\User;
 use Doctrine\ORM\EntityManagerInterface;
+use Symfony\Bundle\SecurityBundle\Security;
 use Symfony\Component\HttpKernel\Event\ControllerEvent;
-use Symfony\Component\Security\Core\Security;
 
 class ActivityListener
 {

+ 1 - 1
src/Service/CommentaireManager.php

@@ -5,7 +5,7 @@ namespace App\Service;
 use App\Entity\Commentaire;
 use App\Entity\Film;
 use Doctrine\ORM\EntityManagerInterface;
-use Symfony\Component\Security\Core\Security;
+use Symfony\Bundle\SecurityBundle\Security;
 use Symfony\Component\Security\Core\User\UserInterface;
 
 /**

+ 2 - 1
src/Service/FilmManager.php

@@ -5,7 +5,7 @@ namespace App\Service;
 use App\Entity\Film;
 use App\Entity\User;
 use Doctrine\ORM\EntityManagerInterface;
-use Symfony\Component\Security\Core\Security;
+use Symfony\Bundle\SecurityBundle\Security;
 
 /**
  * Class FilmManager
@@ -40,6 +40,7 @@ class FilmManager {
     public function delFilm(Film $film): void
     {
         $commentaires = $film->getCommentaires();
+        /** @var \App\Entity\Commentaire $commentaire */
         foreach($commentaires as $commentaire)
         {
             $this->cm->delCommentaire($commentaire);

+ 1 - 1
src/Service/OptionsManager.php

@@ -4,7 +4,7 @@ namespace App\Service;
 
 use App\Entity\User;
 use App\Entity\Profile;
-use Symfony\Component\Security\Core\Security;
+use Symfony\Bundle\SecurityBundle\Security;
 
 class OptionsManager
 {