-
-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
6,908 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ Feature: | |
|
||
Scenario: As a user granted with local scope, I can get geo zone available for a new committee | ||
Given I am logged with "[email protected]" via OAuth client "JeMengage Web" with scope "jemengage_admin" | ||
And I send a "GET" request to "/api/v3/zone/autocomplete?scope=referent&q=Hauts&availableForCommittee=true" | ||
And I send a "GET" request to "/api/v3/zone/autocomplete?scope=referent&q=Hauts de Flandre&availableForCommittee=true" | ||
Then the response status code should be 200 | ||
And the response should be in JSON | ||
And the JSON should be equal to: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20230322154120 extends AbstractMigration | ||
{ | ||
public function up(Schema $schema): void | ||
{ | ||
$this->addSql('ALTER TABLE geo_city DROP FOREIGN KEY FK_297C2D349D25CF90'); | ||
$this->addSql('ALTER TABLE | ||
geo_city | ||
ADD | ||
CONSTRAINT FK_297C2D349D25CF90 FOREIGN KEY (replacement_id) REFERENCES geo_city (id) ON DELETE CASCADE'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->addSql('ALTER TABLE geo_city DROP FOREIGN KEY FK_297C2D349D25CF90'); | ||
$this->addSql('ALTER TABLE | ||
geo_city | ||
ADD | ||
CONSTRAINT FK_297C2D349D25CF90 FOREIGN KEY (replacement_id) REFERENCES geo_city (id) ON UPDATE NO ACTION ON DELETE NO ACTION'); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
use Doctrine\DBAL\DriverManager; | ||
use League\Csv\Reader; | ||
use League\Csv\Writer; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use Symfony\Component\Console\Style\SymfonyStyle; | ||
use Symfony\Component\Finder\Finder; | ||
|
||
require __DIR__.'/vendor/autoload.php'; | ||
|
||
$connectionParams = [ | ||
'url' => 'mysql://root:[email protected]:3306/enmarche?charset=utf8', | ||
]; | ||
|
||
$conn = DriverManager::getConnection($connectionParams); | ||
|
||
$csv = Reader::createFromPath(__DIR__.'/zone_uuid_migration2.csv')->setDelimiter(';')->setHeaderOffset(0); | ||
|
||
$io = new SymfonyStyle( | ||
new Symfony\Component\Console\Input\ArrayInput([]), | ||
new Symfony\Component\Console\Output\ConsoleOutput(OutputInterface::VERBOSITY_VERY_VERBOSE) | ||
); | ||
|
||
$io->progressStart(count($csv)); | ||
|
||
//$zonesFromDb = $conn->executeQuery('SELECT concat(TYPE, \'_\', code) AS id, code, uuid FROM geo_zone')->fetchAllAssociativeIndexed(); | ||
|
||
$zones = []; | ||
foreach ($csv as $row) { | ||
$zones[] = $row; | ||
$io->progressAdvance(); | ||
} | ||
|
||
$finder = Finder::create()->in(__DIR__.'/features')->name('*.feature')->ignoreDotFiles(true); | ||
$toUpdate = []; | ||
|
||
$files = []; | ||
foreach ($finder->files() as $file) { | ||
$files[$file->getPathname()] = file_get_contents($file->getPathname()); | ||
} | ||
|
||
foreach ($zones as $zone) { | ||
foreach ($files as $filePath => $fileContent) { | ||
if (str_contains($fileContent, $zone['old'])) { | ||
$toUpdate[] = $zone; | ||
file_put_contents($filePath, str_replace($zone['old'], $zone['new'], $fileContent)); | ||
} | ||
} | ||
} | ||
|
||
dd($toUpdate); | ||
|
||
//$writer = Writer::createFromPath(__DIR__.'/zone_to_update.csv', 'w')->setDelimiter(';'); | ||
//$writer->insertAll($toUpdate); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
AF;e3ef6700-906e-11eb-a875-0242ac150002;943e2b28-872a-11eb-9419-42010a840019 | ||
ES;e3ef84ed-906e-11eb-a875-0242ac150002;943fb07b-872a-11eb-9419-42010a840019 | ||
ES;e3ef84ed-906e-11eb-a875-0242ac150002;943fb07b-872a-11eb-9419-42010a840019 | ||
FR;e3ef8883-906e-11eb-a875-0242ac150002;943fb3ac-872a-11eb-9419-42010a840019 | ||
CIRCO_FDE-06;e3efac36-906e-11eb-a875-0242ac150002;943fda85-872a-11eb-9419-42010a840019 | ||
CH;e3efcea1-906e-11eb-a875-0242ac150002;943ffff9-872a-11eb-9419-42010a840019 | ||
11;e3efe139-906e-11eb-a875-0242ac150002;9440131e-872a-11eb-9419-42010a840019 | ||
75;e3efe563-906e-11eb-a875-0242ac150002;944057ca-872a-11eb-9419-42010a840019 | ||
75;e3efe563-906e-11eb-a875-0242ac150002;944057ca-872a-11eb-9419-42010a840019 | ||
77;e3efe5c5-906e-11eb-a875-0242ac150002;94405a9c-872a-11eb-9419-42010a840019 | ||
77;e3efe5c5-906e-11eb-a875-0242ac150002;94405a9c-872a-11eb-9419-42010a840019 | ||
77;e3efe5c5-906e-11eb-a875-0242ac150002;94405a9c-872a-11eb-9419-42010a840019 | ||
77;e3efe5c5-906e-11eb-a875-0242ac150002;94405a9c-872a-11eb-9419-42010a840019 | ||
77;e3efe5c5-906e-11eb-a875-0242ac150002;94405a9c-872a-11eb-9419-42010a840019 | ||
92;e3efe6fd-906e-11eb-a875-0242ac150002;944062a9-872a-11eb-9419-42010a840019 | ||
92;e3efe6fd-906e-11eb-a875-0242ac150002;944062a9-872a-11eb-9419-42010a840019 | ||
92;e3efe6fd-906e-11eb-a875-0242ac150002;944062a9-872a-11eb-9419-42010a840019 | ||
92;e3efe6fd-906e-11eb-a875-0242ac150002;944062a9-872a-11eb-9419-42010a840019 | ||
92;e3efe6fd-906e-11eb-a875-0242ac150002;944062a9-872a-11eb-9419-42010a840019 | ||
92;e3efe6fd-906e-11eb-a875-0242ac150002;944062a9-872a-11eb-9419-42010a840019 | ||
92;e3efe6fd-906e-11eb-a875-0242ac150002;944062a9-872a-11eb-9419-42010a840019 | ||
92;e3efe6fd-906e-11eb-a875-0242ac150002;944062a9-872a-11eb-9419-42010a840019 | ||
92;e3efe6fd-906e-11eb-a875-0242ac150002;944062a9-872a-11eb-9419-42010a840019 | ||
92;e3efe6fd-906e-11eb-a875-0242ac150002;944062a9-872a-11eb-9419-42010a840019 | ||
94;e3efe7bf-906e-11eb-a875-0242ac150002;9440643f-872a-11eb-9419-42010a840019 | ||
76;e3efef5d-906e-11eb-a875-0242ac150002;94405a38-872a-11eb-9419-42010a840019 | ||
59;e3eff020-906e-11eb-a875-0242ac150002;9440518c-872a-11eb-9419-42010a840019 | ||
59;e3eff020-906e-11eb-a875-0242ac150002;9440518c-872a-11eb-9419-42010a840019 | ||
13;e3f01553-906e-11eb-a875-0242ac150002;94403ac2-872a-11eb-9419-42010a840019 | ||
75-1;e3f0bf9d-906e-11eb-a875-0242ac150002;94415793-872a-11eb-9419-42010a840019 | ||
75-1;e3f0bf9d-906e-11eb-a875-0242ac150002;94415793-872a-11eb-9419-42010a840019 | ||
75-1;e3f0bf9d-906e-11eb-a875-0242ac150002;94415793-872a-11eb-9419-42010a840019 | ||
75-1;e3f0bf9d-906e-11eb-a875-0242ac150002;94415793-872a-11eb-9419-42010a840019 | ||
75-2;e3f0bfff-906e-11eb-a875-0242ac150002;944157f5-872a-11eb-9419-42010a840019 | ||
92-11;e3f0ebd6-906e-11eb-a875-0242ac150002;94418bb1-872a-11eb-9419-42010a840019 | ||
7723;e3f15390-906e-11eb-a875-0242ac150002;94459aa3-872a-11eb-9419-42010a840019 | ||
9203;e3f154b1-906e-11eb-a875-0242ac150002;94463aee-872a-11eb-9419-42010a840019 | ||
200040954;e3f17cac-906e-11eb-a875-0242ac150002;94966e3d-872a-11eb-9419-42010a840019 | ||
200043321;e3f17e32-906e-11eb-a875-0242ac150002;94966a68-872a-11eb-9419-42010a840019 | ||
200055655;e3f180d7-906e-11eb-a875-0242ac150002;94970e20-872a-11eb-9419-42010a840019 | ||
200057958;e3f18139-906e-11eb-a875-0242ac150002;94970c96-872a-11eb-9419-42010a840019 | ||
200059228;e3f1828a-906e-11eb-a875-0242ac150002;94970d5a-872a-11eb-9419-42010a840019 | ||
200072130;e3f187e7-906e-11eb-a875-0242ac150002;94970ab1-872a-11eb-9419-42010a840019 | ||
200072346;e3f18848-906e-11eb-a875-0242ac150002;9497061e-872a-11eb-9419-42010a840019 | ||
200090504;e3f18a2c-906e-11eb-a875-0242ac150002;9497067f-872a-11eb-9419-42010a840019 | ||
245901038;e3f18d97-906e-11eb-a875-0242ac150002;94966e9d-872a-11eb-9419-42010a840019 | ||
247600505;e3f19169-906e-11eb-a875-0242ac150002;94970317-872a-11eb-9419-42010a840019 | ||
247700065;e3f197ca-906e-11eb-a875-0242ac150002;94970805-872a-11eb-9419-42010a840019 | ||
06004;e3f19d3c-906e-11eb-a875-0242ac150002;944aa68b-872a-11eb-9419-42010a840019 | ||
06088;e3f1a8e8-906e-11eb-a875-0242ac150002;944ac8ee-872a-11eb-9419-42010a840019 | ||
13080;e3f1cb08-906e-11eb-a875-0242ac150002;94500a09-872a-11eb-9419-42010a840019 | ||
13098;e3f1e343-906e-11eb-a875-0242ac150002;94501105-872a-11eb-9419-42010a840019 | ||
59350;e3f21338-906e-11eb-a875-0242ac150002;9477b1d8-872a-11eb-9419-42010a840019 | ||
59350;e3f21338-906e-11eb-a875-0242ac150002;9477b1d8-872a-11eb-9419-42010a840019 | ||
59350;e3f21338-906e-11eb-a875-0242ac150002;9477b1d8-872a-11eb-9419-42010a840019 | ||
59350;e3f21338-906e-11eb-a875-0242ac150002;9477b1d8-872a-11eb-9419-42010a840019 | ||
75056;e3f274b8-906e-11eb-a875-0242ac150002;94869992-872a-11eb-9419-42010a840019 | ||
76495;e3f28b24-906e-11eb-a875-0242ac150002;94878f83-872a-11eb-9419-42010a840019 | ||
77079;e3f29811-906e-11eb-a875-0242ac150002;94884d7a-872a-11eb-9419-42010a840019 | ||
77210;e3f2a3e7-906e-11eb-a875-0242ac150002;948886c7-872a-11eb-9419-42010a840019 | ||
77430;e3f2b860-906e-11eb-a875-0242ac150002;9488f5dd-872a-11eb-9419-42010a840019 | ||
77514;e3f2c010-906e-11eb-a875-0242ac150002;94891a56-872a-11eb-9419-42010a840019 | ||
92024;e3f2c4a0-906e-11eb-a875-0242ac150002;94938c58-872a-11eb-9419-42010a840019 | ||
92032;e3f2c5ec-906e-11eb-a875-0242ac150002;94938d80-872a-11eb-9419-42010a840019 | ||
92060;e3f2cb17-906e-11eb-a875-0242ac150002;949393bc-872a-11eb-9419-42010a840019 | ||
CONS_030-1;e3f33a66-906e-11eb-a875-0242ac150002;94989c6b-872a-11eb-9419-42010a840019 | ||
CONS_030-2;e3f33ac7-906e-11eb-a875-0242ac150002;94989cd0-872a-11eb-9419-42010a840019 |
Oops, something went wrong.