From 44eb599006f6ef5f3d16c3188cfac3adba58c44a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9l=C3=A8ne=20Meneuvrier?= Date: Thu, 23 Jan 2025 12:02:52 +0100 Subject: [PATCH] add migration and composer.lock #3582 --- composer.lock | 155 +-------------------------- migrations/Version20250122140631.php | 27 +++++ src/Form/AutoAffectationRuleType.php | 2 +- 3 files changed, 30 insertions(+), 154 deletions(-) create mode 100644 migrations/Version20250122140631.php diff --git a/composer.lock b/composer.lock index 1dc1fd2af..bd5654dc1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "727f9a63054c0e1f2b9ac17c5ca06b06", + "content-hash": "5096f2ed35426df739daceb598708c81", "packages": [ { "name": "aws/aws-crt-php", @@ -3351,74 +3351,6 @@ ], "time": "2024-03-23T07:42:40+00:00" }, - { - "name": "longitude-one/wkt-parser", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/longitude-one/wkt-parser.git", - "reference": "cb9ded868bfd0200e5134bf259b1e001b83ebaa2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/longitude-one/wkt-parser/zipball/cb9ded868bfd0200e5134bf259b1e001b83ebaa2", - "reference": "cb9ded868bfd0200e5134bf259b1e001b83ebaa2", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2.1|^3.0", - "php": "^8.1" - }, - "replace": { - "creof/wkt-parser": "*" - }, - "require-dev": { - "phpunit/phpunit": "^10.5" - }, - "type": "library", - "autoload": { - "psr-0": { - "LongitudeOne\\Geo\\WKT": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alexandre Tranchant", - "email": "alexandre.tranchant@gmail.com" - }, - { - "name": "axi" - }, - { - "name": "Derek J. Lambert", - "email": "dlambert@dereklambert.com" - }, - { - "name": "ellisgl" - } - ], - "description": "Parser for well-known text (WKT) object strings", - "keywords": [ - "ewkt", - "geography", - "geometry", - "lexer", - "parser", - "spatial", - "string", - "text", - "wkt" - ], - "support": { - "issues": "https://github.com/longitude-one/wkt-parser/issues", - "source": "https://github.com/longitude-one/wkt-parser/tree/3.0.0" - }, - "time": "2024-04-27T07:44:31+00:00" - }, { "name": "lorenzo/pinky", "version": "1.1.0", @@ -3723,89 +3655,6 @@ }, "time": "2024-03-31T07:05:07+00:00" }, - { - "name": "mjaschen/phpgeo", - "version": "5.0.0", - "source": { - "type": "git", - "url": "https://github.com/mjaschen/phpgeo.git", - "reference": "20524a47c8edc76364c7373911224a710aeb1cae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mjaschen/phpgeo/zipball/20524a47c8edc76364c7373911224a710aeb1cae", - "reference": "20524a47c8edc76364c7373911224a710aeb1cae", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "phpunit/phpunit": "^10.0", - "squizlabs/php_codesniffer": "^3.7", - "vimeo/psalm": "^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Location\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marcus Jaschen", - "email": "mjaschen@gmail.com", - "homepage": "https://www.marcusjaschen.de/" - } - ], - "description": "Simple Yet Powerful Geo Library", - "homepage": "https://phpgeo.marcusjaschen.de/", - "keywords": [ - "Polygon", - "area", - "bearing", - "bounds", - "calculation", - "coordinate", - "distance", - "earth", - "ellipsoid", - "geo", - "geofence", - "gis", - "gps", - "haversine", - "length", - "perpendicular", - "point", - "polyline", - "projection", - "simplify", - "track", - "vincenty" - ], - "support": { - "docs": "https://phpgeo.marcusjaschen.de/Installation.html", - "email": "mjaschen@gmail.com", - "issues": "https://github.com/mjaschen/phpgeo/issues", - "source": "https://github.com/mjaschen/phpgeo/tree/5.0.0" - }, - "funding": [ - { - "url": "https://www.paypal.com/paypalme/mjaschen", - "type": "custom" - }, - { - "url": "https://github.com/mjaschen", - "type": "github" - } - ], - "time": "2023-12-07T09:53:11+00:00" - }, { "name": "monolog/monolog", "version": "3.8.0", @@ -15153,5 +15002,5 @@ "php": "~8.3" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.2.0" } diff --git a/migrations/Version20250122140631.php b/migrations/Version20250122140631.php new file mode 100644 index 000000000..e0ad5ee6b --- /dev/null +++ b/migrations/Version20250122140631.php @@ -0,0 +1,27 @@ +addSql('ALTER TABLE auto_affectation_rule CHANGE insee_to_include insee_to_include VARCHAR(255) DEFAULT NULL COMMENT \'Value possible null or an array of code insee\''); + $this->addSql("UPDATE auto_affectation_rule SET insee_to_include = null WHERE insee_to_include IN ('all','partner_list')"); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE auto_affectation_rule CHANGE insee_to_include insee_to_include VARCHAR(255) NOT NULL COMMENT \'Value possible all, partner_list or an array of code insee\''); + } +} diff --git a/src/Form/AutoAffectationRuleType.php b/src/Form/AutoAffectationRuleType.php index 82489dc6c..2bcf45ebe 100644 --- a/src/Form/AutoAffectationRuleType.php +++ b/src/Form/AutoAffectationRuleType.php @@ -124,7 +124,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ], ]) ->add('inseeToInclude', TextType::class, [ - 'label' => 'Périmètre géographique à inclure (facultatif)', + 'label' => 'Code insee à inclure (facultatif)', 'attr' => [ 'class' => 'fr-input', ],