Skip to content

build: replace Webpack Encore and AssetMapper with Symfony Reprise - #154

Merged
turegjorup merged 4 commits into
developfrom
feature/symfony-reprise
Sep 30, 2026
Merged

turegjorup merged 4 commits into
developfrom
feature/symfony-reprise

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

Link to ticket

TODO: no ticket linked yet — please add before review.

Description

Replace Webpack Encore, which is in maintenance mode, with Symfony Reprise and Vite, and remove the unused AssetMapper.

  • symfony/reprise replaces symfony/webpack-encore-bundle, and vite.config.js replaces webpack.config.js. Vite builds the same two entries to public/build: admin (assets/admin.js, which imports assets/styles/admin.css) and the CSS-only api-docs.
  • EasyAdmin loads the admin entry with addRepriseEntry('admin') (EasyAdmin docs), and the API docs template uses reprise_entry_link_tags('api-docs').
  • package.json drops Webpack, Babel, core-js and the Stimulus packages (no Stimulus controllers exist) for vite and @symfony/reprise. yarn build, yarn watch and the coding standards scripts keep their names.
  • reprise.yaml turns strict_mode off in test, as the Encore config did, so tests run without a front-end build. In prod it renders nothing rather than a 500 when entrypoints.json is missing.
  • AssetMapper goes: symfony/asset-mapper, importmap.php, its config and the importmap:install script. It only built the skeleton assets/app.js, but EasyAdmin rendered its import map on every admin page. The unused templates/base.html.twig goes too, and styles/app.css is now styles/admin.css.
  • The release build drops asset-map:compile; it still runs yarn install and yarn build and ships public/build. The prod Woodpecker playbook deploys that archive and is unchanged.

tom-select is kept: its only user is the type field of the deprecated service certificate form, which is out of the menu but still reachable.

Staging

.woodpecker/stg.yml deploys with git pull and composer install and has never built front-end assets, with Encore either, and the server compose has no node service. Unchanged here.

Verification

docker compose run --rm node yarn install
docker compose run --rm node yarn build
docker compose exec phpfpm bin/console cache:clear

Checked in the browser: the admin loads /build/admin-*.js and .css on list, detail and form pages with the ITK styling, the copy button works, tom-select starts on a new service, and Swagger UI, ReDoc and Scalar load /build/api-docs-*.css. No import map is rendered any more.

Checklist

  • My code is covered by test cases.
  • My code passes our test (all our tests).
  • My code passes our static analysis suite.
  • My code passes our continuous integration process.

Vite builds the admin and api-docs entries through @symfony/reprise, and
EasyAdmin loads the admin entry with addRepriseEntry(). AssetMapper only
built the unused assets/app.js, but EasyAdmin rendered its import map on
every admin page. The unused base.html.twig goes with it, and the admin
stylesheet is now styles/admin.css.
@turegjorup turegjorup self-assigned this Sep 30, 2026
@github-actions

Copy link
Copy Markdown

API Specification - Non-breaking changes

No changelog changes

@codecov-commenter

codecov-commenter commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.55%. Comparing base (367bf43) to head (27d7dd2).
⚠️ Report is 10 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #154      +/-   ##
=============================================
- Coverage      64.58%   64.55%   -0.03%     
+ Complexity      1270     1269       -1     
=============================================
  Files            167      167              
  Lines           3942     3939       -3     
=============================================
- Hits            2546     2543       -3     
  Misses          1396     1396              
Flag Coverage Δ
unittests 64.55% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@turegjorup
turegjorup merged commit 4691246 into develop Sep 30, 2026
20 checks passed
@turegjorup
turegjorup deleted the feature/symfony-reprise branch September 30, 2026 21:41
@turegjorup turegjorup mentioned this pull request Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants