Skip to content

Commit 1f35e73

Browse files
authored
Merge branch 'symfony:2.x' into fix_2701
2 parents 91c03aa + eb9d397 commit 1f35e73

File tree

292 files changed

+9561
-203
lines changed

Some content is hidden

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

292 files changed

+9561
-203
lines changed
+28
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/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-autocomplete:2.23.0
1414
npm add @symfony/[email protected]
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/Chartjs/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-chartjs:2.23.0
1414
npm add @symfony/[email protected]
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/Cropperjs/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-cropperjs:2.23.0
1414
npm add @symfony/[email protected]
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/Dropzone/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-dropzone:2.23.0
1414
npm add @symfony/[email protected]
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/LazyImage/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-lazy-image:2.23.0
1414
npm add @symfony/[email protected]
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-lazy-image/current/index.html)

src/LiveComponent/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-live-component:2.23.0
1414
npm add @symfony/[email protected]
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-live-component/current/index.html)

src/Map/src/Bridge/Google/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-google-map:2.23.0
1414
npm add @symfony/[email protected]
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://github.com/symfony/ux/tree/2.x/src/Map/src/Bridge/Google)

src/Map/src/Bridge/Leaflet/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-leaflet-map:2.23.0
1414
npm add @symfony/[email protected]
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://github.com/symfony/ux/tree/2.x/src/Map/src/Bridge/Google)

src/Notify/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-notify:2.23.0
1414
npm add @symfony/[email protected]
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-notify/current/index.html)

src/React/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-react:2.23.0
1414
npm add @symfony/[email protected]
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-react/current/index.html)

src/StimulusBundle/assets/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
JavaScript assets of the [symfony/stimulus-bundle](https://packagist.org/packages/symfony/stimulus-bundle) PHP package.
44

5-
This package is private and is not intended to be published on npm or installed.
5+
## Installation
66

7-
If you're looking for a npm package to integrate Stimulus in your Symfony application, you may be looking for the [`@symfony/stimulus-bridge`](https://www.npmjs.com/package/@symfony/stimulus-bridge) package.
7+
Due to compatibility issues with JSDelivr causing the package not to work as expected, the package is not yet released on NPM.
8+
Read more at [symfony/ux#2708](https://github.com/symfony/ux/issues/2708).
89

910
## Resources
1011

src/StimulusBundle/assets/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@symfony/stimulus-bundle",
33
"description": "Integration of @hotwired/stimulus into Symfony",
4+
"private": true,
45
"license": "MIT",
56
"version": "2.24.0",
67
"keywords": [

src/Svelte/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-svelte:2.23.0
1414
npm add @symfony/[email protected]
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-svelte/current/index.html)

src/Swup/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-swup:2.23.0
1414
npm add @symfony/[email protected]
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-swup/current/index.html)

src/TogglePassword/assets/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ composer require symfony/ux-toggle-password:2.23.0
1414
npm add @symfony/[email protected]
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-toggle-password/current/index.html)

src/Toolkit/.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/.git* export-ignore
2+
/.symfony.bundle.yaml export-ignore
3+
/phpunit.xml.dist export-ignore
4+
/doc export-ignore
5+
/tests export-ignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Please do not submit any Pull Requests here. They will be closed.
2+
---
3+
4+
Please submit your PR here instead:
5+
https://github.com/symfony/ux
6+
7+
This repository is what we call a "subtree split": a read-only subset of that main repository.
8+
We're looking forward to your PR there!
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Close Pull Request
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
jobs:
8+
run:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: superbrothers/close-pull-request@v3
12+
with:
13+
comment: |
14+
Thanks for your Pull Request! We love contributions.
15+
16+
However, you should instead open your PR on the main repository:
17+
https://github.com/symfony/ux
18+
19+
This repository is what we call a "subtree split": a read-only subset of that main repository.
20+
We're looking forward to your PR there!

src/Toolkit/.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
vendor
2+
composer.lock
3+
.phpunit.result.cache
4+
var
5+
.twig-cs-fixer.cache
6+
tests/ui/output
7+
tests/ui/screens

src/Toolkit/.symfony.bundle.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
branches: ["2.x"]
2+
maintained_branches: ["2.x"]
3+
doc_dir: "doc"

src/Toolkit/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CHANGELOG
2+
3+
## 2.25
4+
5+
- Package added

src/Toolkit/LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2025-present Fabien Potencier
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

src/Toolkit/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Symfony UX Toolkit
2+
3+
**EXPERIMENTAL** This component is currently experimental and is
4+
likely to change, or even change drastically.
5+
6+
Symfony UX Toolkit provides a set of ready-to-use UI components for Symfony applications.
7+
8+
**This repository is a READ-ONLY sub-tree split**. See
9+
https://github.com/symfony/ux to create issues or submit pull requests.
10+
11+
## Resources
12+
13+
- [Documentation](https://symfony.com/bundles/ux-toolkit/current/index.html)
14+
- [Report issues](https://github.com/symfony/ux/issues) and
15+
[send Pull Requests](https://github.com/symfony/ux/pulls)
16+
in the [main Symfony UX repository](https://github.com/symfony/ux)

src/Toolkit/bin/ux-toolkit-kit-create

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/*
5+
* This file is part of the Symfony package.
6+
*
7+
* (c) Fabien Potencier <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
12+
13+
if ('cli' !== \PHP_SAPI) {
14+
throw new Exception('This script must be run from the command line.');
15+
}
16+
17+
use Symfony\Component\Console\Application;
18+
use Symfony\Component\Filesystem\Filesystem;
19+
use Symfony\UX\Toolkit\Command\CreateKitCommand;
20+
21+
function includeIfExists(string $file): bool
22+
{
23+
return file_exists($file) && include $file;
24+
}
25+
26+
if (
27+
!includeIfExists(__DIR__ . '/../../../autoload.php') &&
28+
!includeIfExists(__DIR__ . '/../vendor/autoload.php')
29+
) {
30+
fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL);
31+
exit(1);
32+
}
33+
34+
if (!class_exists(Application::class)) {
35+
fwrite(STDERR, 'You need the "symfony/console" component in order to run the UX Toolkit kit linter.'.PHP_EOL);
36+
exit(1);
37+
}
38+
39+
$filesystem = new Filesystem();
40+
41+
(new Application())->add($command = new CreateKitCommand($filesystem))
42+
->getApplication()
43+
->setDefaultCommand($command->getName(), true)
44+
->run()
45+
;

src/Toolkit/bin/ux-toolkit-kit-debug

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/*
5+
* This file is part of the Symfony package.
6+
*
7+
* (c) Fabien Potencier <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
12+
13+
if ('cli' !== \PHP_SAPI) {
14+
throw new Exception('This script must be run from the command line.');
15+
}
16+
17+
use Symfony\Component\Console\Application;
18+
use Symfony\Component\Filesystem\Filesystem;
19+
use Symfony\Component\HttpClient\HttpClient;
20+
use Symfony\Contracts\Service\ServiceLocatorTrait;
21+
use Symfony\Contracts\Service\ServiceProviderInterface;
22+
use Symfony\UX\Toolkit\Command\DebugKitCommand;
23+
use Symfony\UX\Toolkit\Kit\KitSynchronizer;
24+
use Symfony\UX\Toolkit\Kit\KitFactory;
25+
use Symfony\UX\Toolkit\Registry\GitHubRegistry;
26+
use Symfony\UX\Toolkit\Registry\LocalRegistry;
27+
use Symfony\UX\Toolkit\Registry\RegistryFactory;
28+
use Symfony\UX\Toolkit\Registry\Type;
29+
30+
function includeIfExists(string $file): bool
31+
{
32+
return file_exists($file) && include $file;
33+
}
34+
35+
if (
36+
!includeIfExists(__DIR__ . '/../../../autoload.php') &&
37+
!includeIfExists(__DIR__ . '/../vendor/autoload.php')
38+
) {
39+
fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL);
40+
exit(1);
41+
}
42+
43+
if (!class_exists(Application::class)) {
44+
fwrite(STDERR, 'You need the "symfony/console" component in order to run the UX Toolkit kit linter.'.PHP_EOL);
45+
exit(1);
46+
}
47+
48+
$filesystem = new Filesystem();
49+
$kitFactory = new KitFactory($filesystem, new KitSynchronizer($filesystem));
50+
51+
(new Application())->add($command = new DebugKitCommand($kitFactory))
52+
->getApplication()
53+
->setDefaultCommand($command->getName(), true)
54+
->run()
55+
;

0 commit comments

Comments
 (0)