Skip to content

Commit

Permalink
[Bug] - Fix un bug sur le cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Xusifob committed Feb 3, 2025
1 parent 53ec258 commit a972892
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions docker/apache/Dockerfile.deployed
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ RUN php bin/console doctrine:migrations:sync-metadata-storage --env=test
RUN php bin/console doctrine:migrations:version --add --all --no-interaction --env=test
RUN php bin/console doctrine:fixtures:load --env=test --no-interaction
RUN chmod 777 /var/test_db.sqlite
RUN chmod 777 /var/www/html/var
2 changes: 2 additions & 0 deletions src/DataFixtures/LoadRPPS.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public function load(ObjectManager $manager): void
$rpps->setAddress($faker->streetAddress());
$rpps->setCity($faker->city());
$rpps->setZipcode($faker->postcode());
$rpps->setLatitude($faker->latitude());
$rpps->setLongitude($faker->longitude());
}
$rpps->setSpecialty($this->getLegacySpecialties()[$i]);

Expand Down
9 changes: 1 addition & 8 deletions src/Service/RPPSService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
use App\Entity\City;
use App\Entity\RPPS;
use App\Entity\Specialty;
use Doctrine\Common\DataFixtures\Executor\ORMExecutor;
use Doctrine\DBAL\Connection;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\NonUniqueResultException;
use Exception;
use Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\HttpKernel\KernelInterface;

Expand Down Expand Up @@ -91,14 +89,9 @@ public function loadTestData(): void

$this->output->writeln('Existing data successfully deleted');

$loader = new ContainerAwareLoader($this->kernel->getContainer());

$fixture = new LoadRPPS();
$fixture->importId = $this->getImportId();
$loader->addFixture($fixture);

$executor = new ORMExecutor($this->em);
$executor->execute($loader->getFixtures(), true);
$fixture->load($this->em);

$this->output->writeln('Test data successfully loaded');
}
Expand Down

0 comments on commit a972892

Please sign in to comment.