Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEV] Passer à Symfony 6.2 / PHP8.1 (actuellement SF6.0 / PHP8.0) #916

Merged
merged 6 commits into from
Feb 14, 2023

Conversation

sfinx13
Copy link
Collaborator

@sfinx13 sfinx13 commented Feb 13, 2023

https://histologe-staging-pr916.osc-fr1.scalingo.io/

Ticket

#847

Description

La version 6.0 et 6.1 de Symfony n'est plus maintenu par la communauté, une mise vers la 6.2 est nécessaire.
https://symfony.com/releases/6.0

La version 6.2 nécessite une version de PHP 8.1, les images docker PHP ont été mises à jour.
https://symfony.com/releases/6.2

Changements apportés

  • Mise à jour de la version de PHP dans les images docker
  • Ignorer PHP 8.0 dans la CI
  • Mise à jour des dépendances symfony de 6.0.* à 6.2.*
  • Suppression code mort
    • Commandes obsolètes
    • Configuration obsolètes ou dépréciées
  • Mise à jour code dépréciées
  • [Doctrine] Mise à jour de 4 requêtes utilisant le mot PARTIAL
  • [Test] Correction autoloading PSR-4

Tests

  • make build OK
  • make test OK
  • make e2e OK
  • Mise à jour design barre de debug
  • Mise à jour design profiler

Documentation

https://symfony.com/doc/current/setup/upgrade_minor.html
https://github.com/symfony/symfony/blob/6.1/CHANGELOG-6.1.md
https://github.com/symfony/symfony/blob/6.2/CHANGELOG-6.2.md
https://www.php.net/releases/8.1/en.php

@sonarcloud
Copy link

sonarcloud bot commented Feb 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sfinx13 sfinx13 changed the title [DEV] Passer à Symfony 6.2 (actuellement 6.0) [DEV] Passer à Symfony 6.2/PHP8.1 (actuellement SF6.0/ PHP8.0) Feb 14, 2023
@sfinx13 sfinx13 changed the title [DEV] Passer à Symfony 6.2/PHP8.1 (actuellement SF6.0/ PHP8.0) [DEV] Passer à Symfony 6.2 / PHP8.1 (actuellement SF6.0 / PHP8.0) Feb 14, 2023
Copy link
Collaborator Author

@sfinx13 sfinx13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pour les autre requête utilisant des PARTIAL Object, elle nécéssiteront la création de DTO donc plus de travail, ça rentre dans le chantier peformance

@@ -59,48 +59,3 @@ MESSENGER_TRANSPORT_DSN=doctrine://default
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
###< symfony/messenger ###

### Tarn
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Utilisé lors de la migration, obsolète

@@ -4,37 +4,6 @@ doctrine:
connections:
default:
url: '%env(resolve:DATABASE_URL)%'
legacy_81: # Tarn
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Utilisé lors de la migration, obsolète

@@ -6,7 +6,6 @@ security:
ROLE_ADMIN_TERRITORY: ROLE_ADMIN_PARTNER
ROLE_ADMIN: ROLE_ADMIN_TERRITORY

enable_authenticator_manager: true
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -81,10 +81,6 @@ services:
alias: App\Manager\Manager
public: true

App\Command\MigrateLegacyCommand:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suppression de commande migration

@@ -14,10 +14,10 @@
use Doctrine\ORM\Event\OnFlushEventArgs;
use Doctrine\ORM\Events;
use Doctrine\Persistence\Event\LifecycleEventArgs;
use Symfony\Bundle\SecurityBundle\Security;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -9,8 +9,8 @@
use App\Event\SignalementCreatedEvent;
use App\Factory\SignalementFactory;
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Bundle\SecurityBundle\Security;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


final class DossierMessageHandler implements MessageHandlerInterface
#[AsMessageHandler]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -37,7 +37,6 @@ public function getMaxScore()
public function findAllList()
{
return $this->createQueryBuilder('c')
->select('PARTIAL c.{id,label}')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial Object déprécié

Le mode LAZY est celui par défaut. Les données sont chargées uniquement si nécessaires et l'appel aux données de relations provoque une requête supplémentaire.

Exemple si par exemple Situation qui a une relation ManyToOne sur critere n'est pas appelé, aucune requete supplémentaire ne sera effectuée

public function findAllList()
{
$qb = $this->createQueryBuilder('t')
->select('PARTIAL t.{id,name,zip}')
Copy link
Collaborator Author

@sfinx13 sfinx13 Feb 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -41,54 +41,6 @@ public function upgradePassword(PasswordAuthenticatedUserInterface $user, string
$this->_em->flush();
}

public function findAdmins()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pas utilisé

Copy link
Collaborator Author

@sfinx13 sfinx13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suppression des commandes

  • src/Command/CleanSignalementInputCommand.php
  • src/Command/CleanSignalementInputCommand.php
  • src/Command/CleanSignalementInputCommand.php
  • src/Command/UpdateSuiviTypeCommand.php

@sfinx13 sfinx13 marked this pull request as ready for review February 14, 2023 08:43
@hmeneuvrier
Copy link
Collaborator

tests ok

Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aucun commentaire à faire, et tests OK

Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@emilschn emilschn merged commit b12c766 into develop Feb 14, 2023
@emilschn emilschn deleted the feature/847-passage-symfony-6_2 branch February 14, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants