Selaa lähdekoodia

upgrade dependencies step 1

Olivier Massot 9 kuukautta sitten
vanhempi
commit
9bdcc3a730

+ 30 - 35
composer.json

@@ -2,10 +2,6 @@
   "type": "project",
   "license": "proprietary",
   "repositories": [
-    {
-      "type": "vcs",
-      "url": "ssh://git@gitlab.2iopenservice.com/vincent/foselastica.git"
-    },
     {
       "type": "vcs",
       "url": "ssh://git@gitlab.2iopenservice.com/opentalent/phpdocx-15.5.git"
@@ -15,28 +11,28 @@
     "php": ">=8.2",
     "ext-ctype": "*",
     "ext-iconv": "*",
-    "api-platform/core": "3.1.7",
+    "api-platform/core": "3.4.16",
     "beberlei/doctrineextensions": "^1.3",
     "composer/package-versions-deprecated": "^1.11",
-    "doctrine/dbal": "3.9",
-    "doctrine/doctrine-bundle": "^2.1",
+    "doctrine/dbal": "^3.9",
+    "doctrine/doctrine-bundle": "2.13",
     "doctrine/doctrine-migrations-bundle": "^3.0",
-    "doctrine/orm": "^2.17",
-    "dompdf/dompdf": "^3.0",
-    "egulias/email-validator": "^3.0",
+    "doctrine/orm": "^3.3",
+    "dompdf/dompdf": "^3.1",
+    "egulias/email-validator": "^4.0",
     "jbouzekri/phumbor-bundle": "^3.1.0",
-    "knplabs/knp-gaufrette-bundle": "^0.8.0",
-    "knplabs/knp-snappy-bundle": "^1.9",
-    "lcobucci/jwt": "^4.1",
-    "lexik/jwt-authentication-bundle": "^2.8",
-    "liip/imagine-bundle": "^2.12",
+    "knplabs/knp-gaufrette-bundle": "0.9.0",
+    "knplabs/knp-snappy-bundle": "^1.10",
+    "lcobucci/jwt": "^5.5",
+    "lexik/jwt-authentication-bundle": "^3.1",
+    "liip/imagine-bundle": "^2.13",
     "lorenzo/pinky": "^1.0",
-    "myclabs/php-enum": "^1.7",
+    "myclabs/php-enum": "^1.8",
     "nelmio/cors-bundle": "^2.1",
-    "odolbeau/phone-number-bundle": "^3.1",
+    "odolbeau/phone-number-bundle": "^4.1",
     "opentalent/phpdocx": "dev-master",
-    "phpdocumentor/reflection-docblock": "^5.2",
-    "phpstan/phpdoc-parser": "^1.0",
+    "phpdocumentor/reflection-docblock": "^5.6",
+    "phpstan/phpdoc-parser": "^1.16",
     "ramsey/uuid": "^4.2",
     "ramsey/uuid-doctrine": "^2.0",
     "symfony/asset": "6.4.*",
@@ -66,27 +62,26 @@
     "symfony/uid": "6.4.*",
     "symfony/validator": "6.4.*",
     "symfony/yaml": "6.4.*",
-    "twig/cssinliner-extra": "^3.4",
-    "twig/extra-bundle": "^3.4",
-    "twig/inky-extra": "^3.4",
-    "vincent/foselastica": "1.3.1",
-    "webonyx/graphql-php": "^14.3",
+    "twig/cssinliner-extra": "^3.20",
+    "twig/extra-bundle": "^3.20",
+    "twig/inky-extra": "^3.20",
+    "webonyx/graphql-php": "^15.19",
     "xantios/mimey": "*"
   },
   "require-dev": {
-    "cyclonedx/cyclonedx-php-composer": "^3.4",
+    "cyclonedx/cyclonedx-php-composer": "^5.2",
     "dg/bypass-finals": "^1.4",
     "doctrine/doctrine-fixtures-bundle": "^3.4",
-    "friendsofphp/php-cs-fixer": "^3.52.1",
-    "hautelook/alice-bundle": "^2.11",
-    "justinrainbow/json-schema": "^5.2",
+    "friendsofphp/php-cs-fixer": "^3.69",
+    "hautelook/alice-bundle": "^2.14",
+    "justinrainbow/json-schema": "^6.1",
     "phpstan/extension-installer": "^1.2",
-    "phpstan/phpstan": "^1.10",
-    "phpstan/phpstan-doctrine": "^1.3",
-    "phpstan/phpstan-phpunit": "^1.3",
-    "phpstan/phpstan-symfony": "^1.3",
+    "phpstan/phpstan": "^2.1",
+    "phpstan/phpstan-doctrine": "^2.0",
+    "phpstan/phpstan-phpunit": "^2.0",
+    "phpstan/phpstan-symfony": "^2.0",
     "phpunit/phpunit": "^9.6",
-    "rector/rector": "^1.2",
+    "rector/rector": "^2.0",
     "symfony/browser-kit": "6.4.*",
     "symfony/css-selector": "6.4.*",
     "symfony/debug-bundle": "6.4.*",
@@ -94,8 +89,8 @@
     "symfony/phpunit-bridge": "6.4.*",
     "symfony/stopwatch": "6.4.*",
     "symfony/web-profiler-bundle": "6.4.*",
-    "timeweb/phpstan-enum": "^3.1",
-    "zenstruck/foundry": "^1.31"
+    "timeweb/phpstan-enum": "^4.0",
+    "zenstruck/foundry": "2.3"
   },
   "config": {
     "optimize-autoloader": true,

+ 0 - 1
config/bundles.php

@@ -11,7 +11,6 @@ return [
     Jb\Bundle\PhumborBundle\JbPhumborBundle::class => ['all' => true],
     Misd\PhoneNumberBundle\MisdPhoneNumberBundle::class => ['all' => true],
     Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
-    FOS\ElasticaBundle\FOSElasticaBundle::class => ['all' => true],
     Knp\Bundle\SnappyBundle\KnpSnappyBundle::class => ['all' => true],
     Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true],
     Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],

+ 0 - 27
config/packages/elastica.yaml

@@ -1,27 +0,0 @@
-imports:
-  - { resource: elastica/ }
-
-fos_elastica:
-  clients:
-    default: { host: '%env(resolve:ELASTICSEARCH_HOST)%', port: '%env(resolve:ELASTICSEARCH_PORT)%' }
-  indexes:
-    search:
-      use_alias: true
-      client: default
-      finder: ~
-      settings:
-        index:
-          analysis:
-            analyzer:
-              search_analyzer:
-                type:    custom
-                tokenizer:    standard
-                filter:    [standard, asciifolding ,lowercase]
-              custom_analyzer:
-                type:    custom
-                tokenizer:    standard
-                filter:    [standard, asciifolding ,lowercase]
-              custom_search_analyzer:
-                type:    custom
-                tokenizer:    standard
-                filter:    [standard, asciifolding ,lowercase]

+ 0 - 24
config/packages/elastica/educationNotation.yaml

@@ -1,24 +0,0 @@
-fos_elastica:
-  indexes:
-    search:
-      types:
-        educationNotation:
-          persistence:
-            driver: orm
-            model: 'App\Entity\Education\EducationNotation'
-            listener: ~
-            finder: ~
-            elastica_to_model_transformer:
-              ignore_missing: true
-          mappings:
-            id:
-              index: not_analyzed
-              type: integer
-            note_origine:
-              analyzer: custom_analyzer
-              search_analyzer: custom_search_analyzer
-              property_path: false
-            note_recalcul:
-              analyzer: custom_analyzer
-              search_analyzer: custom_search_analyzer
-              property_path: false

+ 0 - 20
config/packages/elastica/organization.yaml

@@ -1,20 +0,0 @@
-fos_elastica:
-  indexes:
-    search:
-      types:
-        organization:
-          persistence:
-            driver: orm
-            model: 'App\Entity\Organization\Organization'
-            listener: ~
-            finder: ~
-            elastica_to_model_transformer:
-              ignore_missing: true
-            provider: ~
-          mappings:
-            id:
-              index: not_analyzed
-              type: integer
-            name:
-              analyzer: custom_analyzer
-              search_analyzer: custom_search_analyzer

+ 3 - 6
config/services.yaml

@@ -68,6 +68,9 @@ services:
     App\Tests\Fixture\:
         resource: '%kernel.project_dir%/tests/Fixture/*'
 
+    Doctrine\ORM\Tools\Console\EntityManagerProvider: '@doctrine.orm.command.entity_manager_provider'
+
+
     #########################################
     ##  TAG Services ##
     _instanceof:
@@ -119,12 +122,6 @@ services:
     #########################################
     ##  LISTENER ##
 
-    #########################################
-    ##  ELASTIC SERVICE ##
-    App\Service\Elasticsearch\EducationNotationUpdater:
-        arguments:
-            - '@fos_elastica.object_persister.search.educationNotation'
-
     #########################################
     ## AutoWiring du service container ##
     Symfony\Component\DependencyInjection\ContainerInterface: '@service_container'

+ 3 - 3
src/Commands/Doctrine/SchemaUpdateCommand.php

@@ -5,7 +5,7 @@
 namespace App\Commands\Doctrine;
 
 use App\Service\Utils\Path;
-use Doctrine\Bundle\DoctrineBundle\Command\Proxy\UpdateSchemaDoctrineCommand;
+use Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand;
 use Doctrine\ORM\Tools\SchemaTool;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
@@ -14,9 +14,9 @@ use Symfony\Component\Console\Style\SymfonyStyle;
 /**
  * Overrides the default doctrine:schema:update command.
  */
-class SchemaUpdateCommand extends UpdateSchemaDoctrineCommand
+class SchemaUpdateCommand extends UpdateCommand
 {
-    protected function executeSchemaCommand(InputInterface $input, OutputInterface $output, SchemaTool $schemaTool, array $metadatas, SymfonyStyle $ui): ?int
+    protected function executeSchemaCommand(InputInterface $input, OutputInterface $output, SchemaTool $schemaTool, array $metadatas, SymfonyStyle $ui): int
     {
         $output->writeln('-- Executing pre-update scripts');
 

+ 0 - 5
src/Entity/Billing/EducationalProjectIntangible.php

@@ -17,11 +17,6 @@ use Doctrine\ORM\Mapping as ORM;
 #[ORM\Entity]
 class EducationalProjectIntangible extends AbstractBillingIntangible
 {
-    #[ORM\Id]
-    #[ORM\Column]
-    #[ORM\GeneratedValue]
-    protected ?int $id = null;
-
     #[ORM\ManyToOne(inversedBy: 'educationalProjectIntangibles')]
     private EducationalProject $educationalProject;
 

+ 1 - 1
src/Entity/Core/ContactPoint.php

@@ -80,7 +80,7 @@ class ContactPoint
     #[ORM\InverseJoinColumn(name: 'person_id', referencedColumnName: 'id')]
     private Collection $person;
 
-    #[ORM\ManyToMany(targetEntity: Place::class, mappedBy: 'contactpoint')]
+    #[ORM\ManyToMany(targetEntity: Place::class, inversedBy: 'contactpoint')]
     #[ORM\JoinTable(name: 'place_contactpoint')]
     #[ORM\JoinColumn(name: 'contactPoint_id', referencedColumnName: 'id', unique: true)]
     #[ORM\InverseJoinColumn(name: 'place_id', referencedColumnName: 'id')]

+ 0 - 1
src/Entity/Message/Email.php

@@ -26,7 +26,6 @@ use Ramsey\Uuid\Uuid;
 #[ORM\Entity]
 class Email extends AbstractMessage
 {
-    #[ORM\Column(length: 255, nullable: false)]
     protected string $discr = 'email';
 
     #[ORM\Column(type: 'boolean', options: ['default' => false])]

+ 0 - 1
src/Entity/Message/Mail.php

@@ -26,7 +26,6 @@ use Ramsey\Uuid\Uuid;
 #[ORM\Entity]
 class Mail extends AbstractMessage
 {
-    #[ORM\Column(length: 255, nullable: false)]
     protected string $discr = 'mail';
 
     #[ORM\ManyToOne(inversedBy: 'mails')]

+ 0 - 1
src/Entity/Message/Sms.php

@@ -25,7 +25,6 @@ use Ramsey\Uuid\Uuid;
 #[ORM\Entity]
 class Sms extends AbstractMessage
 {
-    #[ORM\Column(length: 255, nullable: false)]
     protected string $discr = 'sms';
 
     #[ORM\ManyToOne(inversedBy: 'sms')]

+ 0 - 3
src/Entity/Product/AbstractProduct.php

@@ -18,9 +18,6 @@ abstract class AbstractProduct
     #[ORM\GeneratedValue]
     protected ?int $id = null;
 
-    #[ORM\ManyToOne]
-    protected Organization $organization;
-
     public function getId(): ?int
     {
         return $this->id;