Skip to content

Commit

Permalink
Merge pull request #258 from AOEpeople/security/update-packages
Browse files Browse the repository at this point in the history
update packages
  • Loading branch information
hacksch authored Oct 12, 2022
2 parents 5979b0c + 73a746b commit 503cb09
Show file tree
Hide file tree
Showing 10 changed files with 619 additions and 539 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"symfony/twig-bundle": "^4.4",
"symfony/validator": "^4.4",
"symfony/yaml": "^4.4",
"twig/twig": "^2.12"
"twig/twig": "^2.12",
"lcobucci/jwt": "^4.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.3",
Expand Down
1,121 changes: 592 additions & 529 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use App\Mealz\UserBundle\Entity\Profile;
use DateTime;
use DOMElement;
use DomNode;
use DOMNode;
use Exception;
use Symfony\Component\DomCrawler\Crawler;

Expand Down Expand Up @@ -175,7 +175,7 @@ public function testDisplayUsersOrderedByLastnameAndFirstname(): void
*
* @return float
*/
protected function getFloatFromNode(DomNode $node)
protected function getFloatFromNode(DOMNode $node)
{
$res = $node->textContent;
$res = str_replace(',', '', $res);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function ($node, $i) {
$transactionAmount += (float) trim(substr($transaction, 1, strpos($transaction, '')));
}

$this->assertEquals($currentBalance, $previousBalance - $participationAmount + $transactionAmount);
$calculatedBalance = round($previousBalance - $participationAmount + $transactionAmount, 2);
$this->assertEquals($currentBalance, $calculatedBalance);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function testTransactionsSummedUpByLastMonth(): void
$usersTotalAmount = floatval($userData[$firstTransaction->getProfile()->getUsername()]['amount']);

// calculate sum of amount for tempTransactions
$assumedTotalAmount = $this->getAssumedTotalAmountForTransactionsFromLastMonth($tempTransactions);
$assumedTotalAmount = round($this->getAssumedTotalAmountForTransactionsFromLastMonth($tempTransactions), 2);

// compare both amounts
$this->assertEquals($usersTotalAmount, $assumedTotalAmount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ protected function setUp(): void

/* @var EntityManagerInterface $entityManager */
$entityManager = $this->getDoctrine()->getManager();
$price = (float) self::$kernel->getContainer()->getParameter('mealz.meal.combined.price');
/* https://stackoverflow.com/questions/73209831/unitenum-cannot-be-cast-to-string */
$price = self::$kernel->getContainer()->getParameter('mealz.meal.combined.price');
$price = is_float($price) ? $price : 0;

$dishRepo = static::$container->get(DishRepository::class);
$this->cms = new CombinedMealService($price, $entityManager, $dishRepo);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ protected function setUp(): void
$this->slotRepo,
));

$price = (float) self::$kernel->getContainer()->getParameter('mealz.meal.combined.price');
/* https://stackoverflow.com/questions/73209831/unitenum-cannot-be-cast-to-string */
$price = self::$kernel->getContainer()->getParameter('mealz.meal.combined.price');
$price = is_float($price) ? $price : 0;

$dishRepo = static::$container->get(DishRepository::class);
$this->cms = new CombinedMealService($price, $this->entityManager, $dishRepo);

Expand Down
5 changes: 4 additions & 1 deletion src/Mealz/MealBundle/Tests/Service/OfferServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ protected function setUp(): void
new LoadUsers(static::$container->get('security.user_password_encoder.generic')),
]);

$price = (float) self::$kernel->getContainer()->getParameter('mealz.meal.combined.price');
/* https://stackoverflow.com/questions/73209831/unitenum-cannot-be-cast-to-string */
$price = self::$kernel->getContainer()->getParameter('mealz.meal.combined.price');
$price = is_float($price) ? $price : 0;

$dishRepo = static::$container->get(DishRepository::class);
$this->cms = new CombinedMealService($price, $this->entityManager, $dishRepo);
$this->offerService = new OfferService($this->participantRepo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ protected function setUp(): void
$this->slotRepo
));

$price = (float) self::$kernel->getContainer()->getParameter('mealz.meal.combined.price');
/* https://stackoverflow.com/questions/73209831/unitenum-cannot-be-cast-to-string */
$price = self::$kernel->getContainer()->getParameter('mealz.meal.combined.price');
$price = is_float($price) ? $price : 0;

$dishRepo = static::$container->get(DishRepository::class);
$this->cms = new CombinedMealService($price, $this->entityManager, $dishRepo);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ protected function setUp(): void
$this->slotRepo
));

$price = (float) self::$kernel->getContainer()->getParameter('mealz.meal.combined.price');
/* https://stackoverflow.com/questions/73209831/unitenum-cannot-be-cast-to-string */
$price = self::$kernel->getContainer()->getParameter('mealz.meal.combined.price');
$price = is_float($price) ? $price : 0;

$dishRepo = static::$container->get(DishRepository::class);
$this->cms = new CombinedMealService($price, $this->entityManager, $dishRepo);
}
Expand Down

0 comments on commit 503cb09

Please sign in to comment.