Skip to content

Commit f761127

Browse files
committed
Merge branch '2.x' into modifier-prop-name
2 parents 09b1d86 + d4c48be commit f761127

File tree

427 files changed

+10796
-620
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

427 files changed

+10796
-620
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
; top-most EditorConfig file
2+
root = true
3+
4+
; Unix-style newlines
5+
[*]
6+
charset = utf-8
7+
end_of_line = LF
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.{php,html,twig}]
12+
indent_style = space
13+
indent_size = 4

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* text=auto eol=lf
12
/.yarn/** linguist-vendored
23
/.yarn/releases/* binary
34
/.yarn/plugins/**/* binary

.github/workflows/release-on-npm.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release on NPM
33
on:
44
push:
55
tags:
6-
- 'v*.*.*'
6+
- 'v2.*.*'
77

88
jobs:
99
release:
@@ -32,7 +32,7 @@ jobs:
3232
- run: yarn --immutable
3333

3434
- name: Update version of JS packages
35-
run: yarn workspaces foreach -A version --immediate "${{ env.VERSION }}"
35+
run: yarn workspaces foreach -pA exec "npm version ${{ env.VERSION }} --no-git-tag-version --no-workspaces-update"
3636

3737
- name: Commit changes
3838
run: |

.github/workflows/test.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
- name: Check if JS dist files are current
4343
run: |
44-
if [[ -n $(git status --porcelain) ]]; then
44+
if ! git diff --quiet; then
4545
echo "The Git workspace is unclean! Changes detected:"
4646
git status --porcelain
4747
git diff
@@ -84,12 +84,6 @@ jobs:
8484
minimum-stability: 'dev'
8585
- php-version: '8.3'
8686
minimum-stability: 'dev'
87-
- component: Map # does not support PHP 8.1
88-
php-version: '8.1'
89-
- component: Map/src/Bridge/Google # does not support PHP 8.1
90-
php-version: '8.1'
91-
- component: Map/src/Bridge/Leaflet # does not support PHP 8.1
92-
php-version: '8.1'
9387
- component: Swup # has no tests
9488
- component: Turbo # has its own workflow (test-turbo.yml)
9589
- component: Typed # has no tests
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Toolkit Kits
2+
3+
on:
4+
push:
5+
paths:
6+
- 'src/Toolkit/kits/**'
7+
pull_request:
8+
paths:
9+
- 'src/Toolkit/kits/**'
10+
11+
jobs:
12+
kits-cs:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: 8.3
20+
21+
- name: Install composer packages
22+
uses: ramsey/composer-install@v3
23+
with:
24+
working-directory: src/Toolkit
25+
26+
- name: Check kits code style
27+
run: php vendor/bin/twig-cs-fixer check kits
28+
working-directory: src/Toolkit

src/Autocomplete/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.25.0
4+
5+
- Escape `querySelector` dynamic selector with `CSS.escape()` #2663
6+
37
## 2.23.0
48

59
- Deprecate `ExtraLazyChoiceLoader` in favor of `Symfony\Component\Form\ChoiceList\Loader\LazyChoiceLoader`

src/Autocomplete/assets/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-autocomplete:2.23.0
1414
npm add @symfony/ux-autocomplete@2.23.0
1515
```
1616

17+
**Tip:** Your `package.json` file will be automatically modified by [Flex](https://github.com/symfony/flex) when installing or upgrading a PHP package. To prevent this behavior, ensure to **use at least Flex 1.22.0 or 2.5.0**, and run `composer config extra.symfony.flex.synchronize_package_json false`.
18+
1719
## Resources
1820

1921
- [Documentation](https://symfony.com/bundles/ux-autocomplete/current/index.html)

src/Autocomplete/assets/dist/controller.js

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
import { Controller } from '@hotwired/stimulus';
22
import TomSelect from 'tom-select';
33

4-
/******************************************************************************
5-
Copyright (c) Microsoft Corporation.
6-
7-
Permission to use, copy, modify, and/or distribute this software for any
8-
purpose with or without fee is hereby granted.
9-
10-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16-
PERFORMANCE OF THIS SOFTWARE.
17-
***************************************************************************** */
18-
/* global Reflect, Promise, SuppressedError, Symbol */
19-
20-
21-
function __classPrivateFieldGet(receiver, state, kind, f) {
22-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
23-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
24-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
25-
}
26-
27-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
28-
var e = new Error(message);
29-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
4+
/******************************************************************************
5+
Copyright (c) Microsoft Corporation.
6+
7+
Permission to use, copy, modify, and/or distribute this software for any
8+
purpose with or without fee is hereby granted.
9+
10+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16+
PERFORMANCE OF THIS SOFTWARE.
17+
***************************************************************************** */
18+
/* global Reflect, Promise, SuppressedError, Symbol */
19+
20+
21+
function __classPrivateFieldGet(receiver, state, kind, f) {
22+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
23+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
24+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
25+
}
26+
27+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
28+
var e = new Error(message);
29+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
3030
};
3131

3232
var _default_1_instances, _default_1_getCommonConfig, _default_1_createAutocomplete, _default_1_createAutocompleteWithHtmlContents, _default_1_createAutocompleteWithRemoteData, _default_1_stripTags, _default_1_mergeObjects, _default_1_createTomSelect;
@@ -270,7 +270,7 @@ _default_1_instances = new WeakSet(), _default_1_getCommonConfig = function _def
270270
let orderedOption = null;
271271
for (const [, tomSelectOption] of Object.entries(this.tomSelect.options)) {
272272
if (tomSelectOption.$order === optionOrder) {
273-
orderedOption = parentElement.querySelector(`:scope > option[value="${tomSelectOption[this.tomSelect.settings.valueField]}"]`);
273+
orderedOption = parentElement.querySelector(`:scope > option[value="${CSS.escape(tomSelectOption[this.tomSelect.settings.valueField])}"]`);
274274
break;
275275
}
276276
}

src/Autocomplete/assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@symfony/ux-autocomplete",
33
"description": "JavaScript Autocomplete functionality for Symfony",
44
"license": "MIT",
5-
"version": "2.23.0",
5+
"version": "2.24.0",
66
"keywords": [
77
"symfony-ux"
88
],

src/Autocomplete/assets/src/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export default class extends Controller {
192192
for (const [, tomSelectOption] of Object.entries(this.tomSelect.options)) {
193193
if (tomSelectOption.$order === optionOrder) {
194194
orderedOption = parentElement.querySelector(
195-
`:scope > option[value="${tomSelectOption[this.tomSelect.settings.valueField]}"]`
195+
`:scope > option[value="${CSS.escape(tomSelectOption[this.tomSelect.settings.valueField])}"]`
196196
);
197197

198198
break;

src/Chartjs/assets/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-chartjs:2.23.0
1414
npm add @symfony/ux-chartjs@2.23.0
1515
```
1616

17+
**Tip:** Your `package.json` file will be automatically modified by [Flex](https://github.com/symfony/flex) when installing or upgrading a PHP package. To prevent this behavior, ensure to **use at least Flex 1.22.0 or 2.5.0**, and run `composer config extra.symfony.flex.synchronize_package_json false`.
18+
1719
## Resources
1820

1921
- [Documentation](https://symfony.com/bundles/ux-chartjs/current/index.html)

src/Chartjs/assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@symfony/ux-chartjs",
33
"description": "Chart.js integration for Symfony",
44
"license": "MIT",
5-
"version": "2.23.0",
5+
"version": "2.24.0",
66
"keywords": [
77
"symfony-ux"
88
],

src/Cropperjs/assets/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-cropperjs:2.23.0
1414
npm add @symfony/ux-cropperjs@2.23.0
1515
```
1616

17+
**Tip:** Your `package.json` file will be automatically modified by [Flex](https://github.com/symfony/flex) when installing or upgrading a PHP package. To prevent this behavior, ensure to **use at least Flex 1.22.0 or 2.5.0**, and run `composer config extra.symfony.flex.synchronize_package_json false`.
18+
1719
## Resources
1820

1921
- [Documentation](https://symfony.com/bundles/ux-cropperjs/current/index.html)

src/Cropperjs/assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@symfony/ux-cropperjs",
33
"description": "Cropper.js integration for Symfony",
44
"license": "MIT",
5-
"version": "2.23.0",
5+
"version": "2.24.0",
66
"keywords": [
77
"symfony-ux"
88
],

src/Dropzone/assets/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-dropzone:2.23.0
1414
npm add @symfony/ux-dropzone@2.23.0
1515
```
1616

17+
**Tip:** Your `package.json` file will be automatically modified by [Flex](https://github.com/symfony/flex) when installing or upgrading a PHP package. To prevent this behavior, ensure to **use at least Flex 1.22.0 or 2.5.0**, and run `composer config extra.symfony.flex.synchronize_package_json false`.
18+
1719
## Resources
1820

1921
- [Documentation](https://symfony.com/bundles/ux-dropzone/current/index.html)

src/Dropzone/assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@symfony/ux-dropzone",
33
"description": "File input dropzones for Symfony Forms",
44
"license": "MIT",
5-
"version": "2.23.0",
5+
"version": "2.24.0",
66
"keywords": [
77
"symfony-ux"
88
],

src/Icons/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# CHANGELOG
22

3+
## 2.25.0
4+
5+
- Improve DX when `symfony/http-client` is not installed.
6+
7+
## 2.24.0
8+
9+
- Add `xmlns` attribute to icons downloaded with Iconify, to correctly render icons browser as an external file, in SVG editors, and in files explorers or text editors previews.
10+
It **may breaks your pipeline** if you assert on `ux_icon()` or `<twig:ux:icon>` output in your tests, and forgot [to lock your icons](https://symfony.com/bundles/ux-icons/current/index.html#locking-on-demand-icons).
11+
We recommend you to **lock** your icons **before** upgrading to UX Icons 2.24. We also suggest you to to **force-lock** your icons **after** upgrading to UX Icons 2.24, to add the attribute `xmlns` to your icons already downloaded from Iconify.
12+
313
## 2.20.0
414

515
- Add `aliases` configuration option to define icon alternative names.

src/Icons/config/iconify.php

Lines changed: 0 additions & 56 deletions
This file was deleted.

src/Icons/config/services.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
1313

14+
use Symfony\UX\Icons\Command\ImportIconCommand;
15+
use Symfony\UX\Icons\Command\LockIconsCommand;
16+
use Symfony\UX\Icons\Command\SearchIconCommand;
1417
use Symfony\UX\Icons\Command\WarmCacheCommand;
1518
use Symfony\UX\Icons\IconCacheWarmer;
19+
use Symfony\UX\Icons\Iconify;
1620
use Symfony\UX\Icons\IconRenderer;
1721
use Symfony\UX\Icons\IconRendererInterface;
1822
use Symfony\UX\Icons\Registry\CacheIconRegistry;
1923
use Symfony\UX\Icons\Registry\ChainIconRegistry;
24+
use Symfony\UX\Icons\Registry\IconifyOnDemandRegistry;
2025
use Symfony\UX\Icons\Registry\LocalSvgIconRegistry;
2126
use Symfony\UX\Icons\Twig\IconFinder;
2227
use Symfony\UX\Icons\Twig\UXIconExtension;
@@ -86,5 +91,39 @@
8691
service('.ux_icons.cache_warmer'),
8792
])
8893
->tag('console.command')
94+
95+
->set('.ux_icons.iconify', Iconify::class)
96+
->args([
97+
service('.ux_icons.cache'),
98+
abstract_arg('endpoint'),
99+
service('http_client')->nullOnInvalid(),
100+
])
101+
102+
->set('.ux_icons.iconify_on_demand_registry', IconifyOnDemandRegistry::class)
103+
->args([
104+
service('.ux_icons.iconify'),
105+
])
106+
->tag('ux_icons.registry', ['priority' => -10])
107+
108+
->set('.ux_icons.command.import', ImportIconCommand::class)
109+
->args([
110+
service('.ux_icons.iconify'),
111+
service('.ux_icons.local_svg_icon_registry'),
112+
])
113+
->tag('console.command')
114+
115+
->set('.ux_icons.command.lock', LockIconsCommand::class)
116+
->args([
117+
service('.ux_icons.iconify'),
118+
service('.ux_icons.local_svg_icon_registry'),
119+
service('.ux_icons.icon_finder'),
120+
])
121+
->tag('console.command')
122+
123+
->set('.ux_icons.command.search', SearchIconCommand::class)
124+
->args([
125+
service('.ux_icons.iconify'),
126+
])
127+
->tag('console.command')
89128
;
90129
};

0 commit comments

Comments
 (0)