Skip to content

Commit 882b2f6

Browse files
Kocalsmnandre
andauthored
Apply suggestions from code review
Co-authored-by: Simon André <[email protected]>
1 parent 7487341 commit 882b2f6

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/Typed/README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# Symfony UX Typed
22

3-
**Deprecated: This package has been deprecated in 2.x and will be removed in the next major version.**
3+
> [!WARNING]
4+
> **Deprecated**: This package has been **deprecated** in 2.x and will be removed in the next major version.
45
5-
To keep the same functionality in your Symfony application, you can follow these migration steps:
6+
To keep the same functionality in your Symfony application, follow these migration steps:
67

78
1. Install the `typed.js` library:
89

910
```bash
10-
# If you are using Symfony AssetMapper:
11+
# If using Symfony AssetMapper:
1112
php bin/console importmap:require typed.js
1213

13-
# If you are using NPM (e.g.: with Webpack Encore):
14+
# If using NPM (e.g.: with Webpack Encore):
1415
npm install typed.js
1516
```
1617

17-
2. Add the following code to your template:
18+
2. Add the following code to your app:
1819

1920
<details><summary><code>assets/controllers/typed_controller.js</code></summary>
2021

@@ -79,7 +80,7 @@ export default class extends Controller {
7980

8081
</details>
8182

82-
3. And finally, replace the `symfony--ux-typed` occurrences in your templates with `typed`, for example:
83+
3. Replace the `symfony--ux-typed` occurrences in your templates with `typed`, for example:
8384

8485
```diff
8586
{% set strings = [
@@ -104,7 +105,11 @@ export default class extends Controller {
104105
+ data-typed-strings-value="{{ strings|json_encode|e('html_attr') }}"
105106
></span>
106107
```
107-
---
108+
109+
4. Remove symfony/ux-typed from your dependencies
110+
111+
```bash
112+
composer remove symfony/ux-typed
108113

109114
Symfony UX Typed is a Symfony bundle integrating [Typed](https://github.com/mattboldt/typed.js/blob/master/README.md) in
110115
Symfony applications. It is part of [the Symfony UX initiative](https://ux.symfony.com/).

0 commit comments

Comments
 (0)