Skip to content

Commit 6e73616

Browse files
committed
Switch from ESLint to Oxfmt and Oxlint
1 parent c0c4525 commit 6e73616

42 files changed

Lines changed: 2240 additions & 4250 deletions

Some content is hidden

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

.editorconfig

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
# editorconfig.org
2-
1+
; top-most EditorConfig file
32
root = true
43

4+
; Unix-style newlines
55
[*]
66
charset = utf-8
7-
end_of_line = lf
8-
indent_size = 2
9-
indent_style = space
7+
end_of_line = LF
108
insert_final_newline = true
119
trim_trailing_whitespace = true
10+
11+
[*.{php,html,twig}]
12+
indent_style = space
13+
indent_size = 4
14+
15+
[*.md]
16+
max_line_length = 80
17+
18+
[COMMIT_EDITMSG]
19+
max_line_length = 0

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/ci.yml

Lines changed: 123 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,138 @@
11
name: CI
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
push:
5+
branches:
6+
- main
77

8-
pull_request:
9-
branches:
10-
- main
8+
pull_request:
9+
branches:
10+
- main
1111

1212
# Cancel any in-progress run for the same ref (branch/PR) when a new commit is pushed.
1313
concurrency:
14-
group: ${{ github.workflow }}-${{ github.ref }}
15-
cancel-in-progress: true
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
1616

1717
permissions: {}
1818

1919
jobs:
20-
lint:
21-
runs-on: ubuntu-latest
22-
permissions:
23-
contents: read
24-
steps:
25-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
26-
with:
27-
persist-credentials: false
28-
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
29-
- name: Set node
30-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
31-
with:
32-
node-version-file: .nvmrc
33-
cache: pnpm
34-
cache-dependency-path: pnpm-lock.yaml
35-
- name: Install
36-
run: pnpm install --frozen-lockfile
37-
- name: Lint
38-
run: pnpm run lint
20+
lint:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
steps:
25+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
26+
with:
27+
persist-credentials: false
28+
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
29+
- name: Set node
30+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
31+
with:
32+
node-version-file: .nvmrc
33+
cache: pnpm
34+
cache-dependency-path: pnpm-lock.yaml
35+
- name: Install
36+
run: pnpm install --frozen-lockfile
37+
- name: Lint
38+
run: pnpm run lint
3939

40-
test:
41-
runs-on: ${{ matrix.os }}
42-
permissions:
43-
contents: read
44-
strategy:
45-
fail-fast: false
46-
matrix:
47-
os: [ubuntu-latest, windows-latest, macos-latest]
48-
steps:
49-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
50-
with:
51-
persist-credentials: false
52-
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
53-
- name: Set node
54-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
55-
with:
56-
node-version-file: .nvmrc
57-
cache: pnpm
58-
cache-dependency-path: pnpm-lock.yaml
59-
- name: Install
60-
run: pnpm install --frozen-lockfile
61-
- name: Build
62-
run: pnpm build
63-
- name: Test
64-
run: pnpm test
40+
test:
41+
runs-on: ${{ matrix.os }}
42+
permissions:
43+
contents: read
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
os: [ubuntu-latest, windows-latest, macos-latest]
48+
steps:
49+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
50+
with:
51+
persist-credentials: false
52+
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
53+
- name: Set node
54+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
55+
with:
56+
node-version-file: .nvmrc
57+
cache: pnpm
58+
cache-dependency-path: pnpm-lock.yaml
59+
- name: Install
60+
run: pnpm install --frozen-lockfile
61+
- name: Build
62+
run: pnpm build
63+
- name: Test
64+
run: pnpm test
6565

66-
php:
67-
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}${{ matrix.dependency-version == 'lowest' && ' lowest' || '' }} on ${{ matrix.os || 'ubuntu-latest' }}
68-
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
69-
permissions:
70-
contents: read
71-
strategy:
72-
fail-fast: false
73-
matrix:
74-
include:
75-
# Symfony 7.4 LTS on the lowest supported PHP, resolving the lowest allowed dependencies.
76-
- php-version: '8.4'
77-
symfony-version: 7.4.*
78-
dependency-version: lowest
79-
- php-version: '8.4'
80-
symfony-version: 8.0.*
81-
- php-version: '8.5'
82-
symfony-version: 7.4.*
83-
- php-version: '8.5'
84-
symfony-version: 8.0.*
66+
php:
67+
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}${{ matrix.dependency-version == 'lowest' && ' lowest' || '' }} on ${{ matrix.os || 'ubuntu-latest' }}
68+
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
69+
permissions:
70+
contents: read
71+
strategy:
72+
fail-fast: false
73+
matrix:
74+
include:
75+
# Symfony 7.4 LTS on the lowest supported PHP, resolving the lowest allowed dependencies.
76+
- php-version: '8.4'
77+
symfony-version: 7.4.*
78+
dependency-version: lowest
79+
- php-version: '8.4'
80+
symfony-version: 8.0.*
81+
- php-version: '8.5'
82+
symfony-version: 7.4.*
83+
- php-version: '8.5'
84+
symfony-version: 8.0.*
8585

86-
# Windows
87-
- php-version: '8.4'
88-
symfony-version: 7.4.*
89-
os: windows-latest
90-
- php-version: '8.5'
91-
symfony-version: 8.1.*
92-
os: windows-latest
93-
env:
94-
# symfony/flex (installed as a global tool below) reads SYMFONY_REQUIRE and forces every
95-
# symfony/* package to this version during the Composer resolution.
96-
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
97-
steps:
98-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
99-
with:
100-
persist-credentials: false
101-
- name: Setup PHP
102-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
103-
with:
104-
php-version: ${{ matrix.php-version }}
105-
tools: flex
106-
- name: Install dependencies
107-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
108-
with:
109-
dependency-versions: ${{ matrix.dependency-version == 'lowest' && 'lowest' || 'highest' }}
110-
composer-options: --prefer-dist
111-
custom-cache-suffix: ${{ matrix.symfony-version }}
112-
- name: PHPUnit
113-
run: vendor/bin/phpunit
86+
# Windows
87+
- php-version: '8.4'
88+
symfony-version: 7.4.*
89+
os: windows-latest
90+
- php-version: '8.5'
91+
symfony-version: 8.1.*
92+
os: windows-latest
93+
env:
94+
# symfony/flex (installed as a global tool below) reads SYMFONY_REQUIRE and forces every
95+
# symfony/* package to this version during the Composer resolution.
96+
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
97+
steps:
98+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
99+
with:
100+
persist-credentials: false
101+
- name: Setup PHP
102+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
103+
with:
104+
php-version: ${{ matrix.php-version }}
105+
tools: flex
106+
- name: Install dependencies
107+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
108+
with:
109+
dependency-versions: ${{ matrix.dependency-version == 'lowest' && 'lowest' || 'highest' }}
110+
composer-options: --prefer-dist
111+
custom-cache-suffix: ${{ matrix.symfony-version }}
112+
- name: PHPUnit
113+
run: vendor/bin/phpunit
114114

115-
php-qa:
116-
runs-on: ubuntu-latest
117-
permissions:
118-
contents: read
119-
steps:
120-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
121-
with:
122-
persist-credentials: false
123-
- name: Setup PHP
124-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
125-
with:
126-
php-version: '8.4'
127-
tools: composer:v2
128-
- name: Validate composer.json
129-
run: composer validate --strict
130-
- name: Install dependencies
131-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
132-
with:
133-
dependency-versions: highest
134-
composer-options: --prefer-dist
135-
- name: PHPStan
136-
run: vendor/bin/phpstan analyse
137-
- name: PHP-CS-Fixer
138-
run: vendor/bin/php-cs-fixer fix --dry-run --diff
115+
php-qa:
116+
runs-on: ubuntu-latest
117+
permissions:
118+
contents: read
119+
steps:
120+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
121+
with:
122+
persist-credentials: false
123+
- name: Setup PHP
124+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
125+
with:
126+
php-version: '8.4'
127+
tools: composer:v2
128+
- name: Validate composer.json
129+
run: composer validate --strict
130+
- name: Install dependencies
131+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
132+
with:
133+
dependency-versions: highest
134+
composer-options: --prefer-dist
135+
- name: PHPStan
136+
run: vendor/bin/phpstan analyse
137+
- name: PHP-CS-Fixer
138+
run: vendor/bin/php-cs-fixer fix --dry-run --diff

.github/workflows/fabbot.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: Fabbot
22

33
on:
4-
pull_request:
4+
pull_request:
55

66
permissions: {}
77

88
jobs:
9-
call-fabbot:
10-
name: Fabbot
11-
permissions:
12-
contents: read
13-
uses: symfony-tools/fabbot/.github/workflows/fabbot.yml@ad55ed5ac95aaa9794c60473178a007b342a73b4 # main
14-
with:
15-
package: Reprise
16-
check_license: true
9+
call-fabbot:
10+
name: Fabbot
11+
permissions:
12+
contents: read
13+
uses: symfony-tools/fabbot/.github/workflows/fabbot.yml@ad55ed5ac95aaa9794c60473178a007b342a73b4 # main
14+
with:
15+
package: Reprise
16+
check_license: true

.oxfmtrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"ignorePatterns": [
4+
"**/composer.json",
5+
"**/vendor",
6+
"**/package.json",
7+
"**/node_modules",
8+
".agents/skills",
9+
".github/PULL_REQUEST_TEMPLATE.md",
10+
"playground/**",
11+
"assets/dist/**",
12+
"assets/test/fixtures/**",
13+
"docs/**"
14+
],
15+
"printWidth": 120,
16+
"tabWidth": 4,
17+
"trailingComma": "es5",
18+
"bracketSameLine": true,
19+
"singleQuote": true
20+
}

.oxlintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["eslint", "typescript", "unicorn", "node"],
4+
"categories": {},
5+
"rules": {},
6+
"env": {
7+
"builtin": true
8+
},
9+
"globals": {},
10+
"ignorePatterns": [
11+
"**/composer.json",
12+
"**/vendor",
13+
"**/package.json",
14+
"**/node_modules",
15+
".agents/skills",
16+
".github/PULL_REQUEST_TEMPLATE.md",
17+
"playground/**",
18+
"assets/test/fixtures/**",
19+
"docs/**"
20+
]
21+
}

AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ unplugin still earns its place for Vite and (upcoming) the Stimulus virtual modu
5050
Encore's real value to Symfony is two JSON files written into `outputPath`, consumed by WebpackEncoreBundle's Twig helpers (`encore_entry_script_tags()`, `encore_entry_link_tags()`, `asset()`). Generating these in Encore-compatible format is the primary work:
5151

5252
- **`entrypoints.json`** — maps each entry name to its asset URLs grouped by type, in load order (runtime chunks before app chunks). Optional `integrity` section for SRI hashes.
53-
```json
54-
{ "entrypoints": { "app": { "js": ["/build/runtime.js", "/build/app.js"], "css": ["/build/app.css"] } } }
55-
```
53+
```json
54+
{ "entrypoints": { "app": { "js": ["/build/runtime.js", "/build/app.js"], "css": ["/build/app.css"] } } }
55+
```
5656
- **`manifest.json`** — maps logical filename -> versioned/hashed URL, for cache-busting. Keys are prefixed with `manifestKeyPrefix` (defaults to `publicPath` minus leading slash). When `publicPath` is an absolute CDN URL (contains `://`), `manifestKeyPrefix` must be set explicitly. Encore enforces this by throwing (`../webpack-encore/lib/config/path-util.ts`, `validatePublicPathAndManifestKeyPrefix`); **porting that guard is still TODO** — the current factory does not throw and would use the absolute URL as the key prefix. The `publicPath === null` branch in `assets/src/index.ts` is likewise dead (`publicPath` always defaults to `build/`).
5757

5858
### Dev server (build mode vs serve mode)

0 commit comments

Comments
 (0)