Skip to content

Commit f86f192

Browse files
committed
Release 1.2.7: fix default widget icon rendering in Twig
Remove invalid ux_icon is defined check; Twig defined only applies to variables. Update CHANGELOG, UPGRADING, and template test.
1 parent 37f38bd commit f86f192

5 files changed

Lines changed: 18 additions & 7 deletions

File tree

docs/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## Table of contents
99

1010
- [[Unreleased]](#unreleased)
11+
- [[1.2.7] - 2026-06-18](#127---2026-06-18)
1112
- [[1.2.6] - 2026-06-18](#126---2026-06-18)
1213
- [[1.2.5] - 2026-06-18](#125---2026-06-18)
1314
- [[1.2.4] - 2026-06-18](#124---2026-06-18)
@@ -21,6 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2122

2223
## [Unreleased]
2324

25+
## [1.2.7] - 2026-06-18
26+
27+
### Fixed
28+
29+
- **Default widget icon rendering**: the template no longer checks `ux_icon is defined`. In Twig, `defined` applies to variables, not functions, so that condition was always false and icons were never rendered (dev showed `[icons missing]` even when `icons_available` was true and `symfony/ux-icons` was installed). Icons are now rendered when `icons_available` is true.
30+
2431
## [1.2.6] - 2026-06-18
2532

2633
### Fixed

docs/RELEASE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
1. Update [CHANGELOG.md](CHANGELOG.md): move entries from `[Unreleased]` to a new `[X.Y.Z] - YYYY-MM-DD` section. (This project does not store version in `composer.json`; Packagist uses the git tag.)
44
2. Update [UPGRADING.md](UPGRADING.md) if the release has upgrade notes.
55
3. Run pre-release checks: `make release-check` (cs-fix, cs-check, rector-dry, phpstan, test-coverage, and optionally demo healthchecks).
6-
4. Commit all changes, create an annotated tag (e.g. `v1.2.6`), and push branch and tag. The release workflow will create the GitHub Release with the changelog.
6+
4. Commit all changes, create an annotated tag (e.g. `v1.2.7`), and push branch and tag. The release workflow will create the GitHub Release with the changelog.
77
5. Publish the package to Packagist if applicable (usually automatic when the tag is pushed).
88

9-
## Example for v1.2.6
9+
## Example for v1.2.7
1010

1111
```bash
1212
git add -A
1313
git status # review
14-
git commit -m "Release 1.2.6: fix UX Icons 3.x runtime detection"
15-
git tag -a v1.2.6 -m "Release 1.2.6"
14+
git commit -m "Release 1.2.7: fix default widget icon rendering in Twig"
15+
git tag -a v1.2.7 -m "Release 1.2.7"
1616
git push origin main
17-
git push origin v1.2.6
17+
git push origin v1.2.7
1818
```

docs/UPGRADING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This document describes how to upgrade between major versions of Password Toggle
44

55
## 1.x
66

7+
### 1.2.7
8+
9+
- **Icons still missing after 1.2.6:** upgrade to **1.2.7** if `[icons missing]` appears in dev while `icons_available` should be true (packages installed, cache cleared). The default widget incorrectly used `ux_icon is defined`, which Twig never satisfies for functions. No config changes; run `php bin/console cache:clear` after updating.
10+
711
### 1.2.6
812

913
- **False `[icons missing]` in dev:** upgrade from **1.2.5** if the toggle works but dev still shows `[icons missing]` while `symfony/ux-icons` and `symfony/http-client` are installed. This release fixes `IconSupportChecker` for UX Icons 3.x (`UXIconRuntime`). Then run `php bin/console cache:clear` (icons are usually already locked via `ux:icons:lock`).

src/Resources/views/Form/toggle_password_widget.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
this.click();
5151
}
5252
">
53-
{%- if icons_available and ux_icon is defined -%}
53+
{%- if icons_available -%}
5454
{%- if visible_icon is defined and visible_icon -%}
5555
{{ ux_icon(visible_icon|default('tabler:eye-off'), {class: 'icon-hidden icon-base ti tabler'}) }}
5656
{%- endif -%}

tests/Unit/Twig/TogglePasswordWidgetTemplateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function testTemplateContainsGracefulIconFallback(): void
1717

1818
$this->assertIsString($content);
1919
$this->assertStringContainsString('icons_available', $content);
20-
$this->assertStringContainsString('ux_icon is defined', $content);
20+
$this->assertStringNotContainsString('ux_icon is defined', $content);
2121
$this->assertStringContainsString('password-toggle-icon-missing', $content);
2222
}
2323
}

0 commit comments

Comments
 (0)