Skip to content

Commit

Permalink
Updated to PHP 8.2.27 an Symfony 7.2.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentmuller committed Jan 29, 2025
1 parent bd7035c commit 7c4d7cb
Show file tree
Hide file tree
Showing 8 changed files with 257 additions and 250 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Ce programme est distribué avec une [licence propriétaire](LICENSE.md) et une
## Versions

[![Application](https://img.shields.io/badge/Application-3.0.0-blue)](https://github.com/laurentmuller/calculation)
[![Symfony](https://img.shields.io/badge/Symfony-7.2.2-informational?logo=symfony)](https://symfony.com)
[![PHP](https://img.shields.io/badge/PHP-8.2.24-informational?logo=php)](https://www.php.net)
[![Symfony](https://img.shields.io/badge/Symfony-7.2.3-informational?logo=symfony)](https://symfony.com)
[![PHP](https://img.shields.io/badge/PHP-8.2.27-informational?logo=php)](https://www.php.net)
[![MySQL](https://img.shields.io/badge/MySQL-5.7.32-informational?logo=mysql)](https://www.mysql.com)
[![Apache](https://img.shields.io/badge/Apache-2.4.51-informational?logo=apache)](https://httpd.apache.org)
[![PhpStorm](https://img.shields.io/badge/PhpStorm-2024.3-informational?logo=phpstorm)](https://www.jetbrains.com/phpstorm)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
},
"config": {
"platform": {
"php": "8.2.24"
"php": "8.2.27"
},
"optimize-autoloader": true,
"preferred-install": {
Expand Down
362 changes: 182 additions & 180 deletions composer.lock

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions public/js/application/calculation_edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,9 @@ const Application = {
$totalPanel.fadeOut();
}
if (response.adjust && !$.isUndefined(response.user_margin) && !isNaN(response.user_margin)) {
$('#calculation_userMargin').intVal(response.user_margin * 100).selectFocus();
const value = Math.round(response.user_margin * 100);
$('#calculation_userMargin').data('value', value)
.intVal(value).selectFocus();
}
if (response.overall_below) {
$buttonAdjust.toggleDisabled(false).removeClass('cursor-default');
Expand Down Expand Up @@ -1664,9 +1666,14 @@ $(function () {

// user margin
const $margin = $('#calculation_userMargin');
$margin.on('input', function () {
$margin.data('value', $margin.intVal()).on('input', function () {
$margin.updateTimer(function () {
Application.updateTotals(false);
const oldValue = $margin.data('value');
const newValue = $margin.intVal();
if (oldValue !== newValue) {
$margin.data('value', newValue);
Application.updateTotals(false);
}
}, 250);
});

Expand Down
3 changes: 1 addition & 2 deletions src/Twig/TokenParser/SwitchTokenParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public function parse(Token $token): SwitchNode
$nodes = ['value' => $expressionParser->parseExpression()];

$stream->expect(Token::BLOCK_END_TYPE);
while (Token::TEXT_TYPE === $stream->getCurrent()->getType()
&& '' === \trim((string) $stream->getCurrent()->getValue())) {
while ($stream->test(Token::TEXT_TYPE) && '' === \trim((string) $stream->getCurrent()->getValue())) {
$stream->next();
}
$stream->expect(Token::BLOCK_START_TYPE);
Expand Down
3 changes: 1 addition & 2 deletions templates/test/tree_view.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,13 @@
<span class="form-label cursor-default">Position</span>
<div class="dropdown dropdown-position">
{% set current = user_service.messagePosition %}
{% set positions = enum('App\\Enums\\MessagePosition').sorted() %}
<button type="button" class="btn-position form-control d-flex align-items-center dropdown-toggle" data-value="{{ current.value }}" data-bs-toggle="dropdown" aria-expanded="false">
<span class="position-icon me-2"><i class="{{ current.icon }}" style="--fa-rotate-angle: {{ current.angle }}deg;"></i></span>
<span class="position-text flex-fill text-start">{{- current|trans -}}</span>
</button>
<table class="dropdown-menu w-auto table table-borderless mb-0 px-2">
<tr>
{% for position in positions %}
{% for position in enum('App\\Enums\\MessagePosition').sorted() %}
<td>
{% set id = 'btn-check-dropdown-' ~ position.value %}
<div class="form-check ps-0">
Expand Down
Loading

0 comments on commit 7c4d7cb

Please sign in to comment.