Skip to content

Commit 90a298f

Browse files
lmsssrtab
authored andcommitted
Updated Twig version. Force value attribute in all select options.
1 parent 28d6cb7 commit 90a298f

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [3.0.2] - 2024-06-14
8+
### Added
9+
- `Twig` minimal version supported setted to `>=1.44.7`.
10+
- Fixed select_option.html. Always ensure that the value is included in the option tag.
11+
712
## [3.0.0] - 2022-11-23
813
### Added
914
- Added support for php8 removing package `fleshgrinder/format` from project. This package is no longer needed, its functionality has been replaced by native php code.

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"require": {
2121
"php": ">=7.0.0",
22-
"twig/twig": ">=1.35"
22+
"twig/twig": ">=1.44.7"
2323
},
2424
"require-dev": {
2525
"php-coveralls/php-coveralls": "^1.0",
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<option {% if value is not empty %}value="{{value|e}}"{% endif %}{% include 'attrs.html' with attrs %}>{{label|e}}</option>
1+
<option value="{% if value is not empty %}{{value|e}}{% endif %}"{% include 'attrs.html' with attrs %}>{{label|e}}</option>

tests/unit/Widgets/SelectTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function testRenderOptionWithouValue()
6161
]);
6262

6363
$expected = '<select id="id_name" name="name">' .
64-
'<option></option>' .
64+
'<option value=""></option>' .
6565
'<option value="option2">option2</option>' .
6666
'<option value="option3" selected="selected">option3</option>' .
6767
'</select>';

0 commit comments

Comments
 (0)