Skip to content

Commit fc4c18b

Browse files
committed
[Docs][CI] Rebrand to Symfony Reprise and align with Symfony conventions
- Rename the project to "Symfony Reprise" in the README (the @symfony/reprise npm package name is unchanged). - Document the Symfony [Scope] commit-message convention in AGENTS.md, replacing the previous Conventional Commits style. - Drop the changelogithub release workflow and its mention in AGENTS.md: it relied on Conventional Commit prefixes and no longer fits the Symfony release flow. - Add a CONTRIBUTING guide and a pull request template, adapted from Symfony and Symfony UX to this repository's dual PHP-bundle + assets/ npm-package layout.
1 parent d1e2988 commit fc4c18b

5 files changed

Lines changed: 142 additions & 28 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
| Q | A
2+
| ------------- | ---
3+
| Bug fix? | yes/no
4+
| New feature? | yes/no
5+
| Deprecations? | yes/no
6+
| Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to open an issue if none exists, explain below instead -->
7+
| License | MIT
8+
9+
<!--
10+
Replace this notice with a description of your feature or bugfix.
11+
This helps reviewers and is a good starting point for the documentation.
12+
13+
Additionally (see https://symfony.com/releases):
14+
- Always add tests and ensure they pass.
15+
- For new features, provide some code snippets to help understand usage.
16+
- Features and deprecations must be submitted against the main branch.
17+
- Update or add documentation as required (we can help!).
18+
- Never break backward compatibility (see https://symfony.com/bc).
19+
-->

.github/workflows/release.yml

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

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ Read-only clones under `.references/` (git-ignored) show how mature unplugins ar
9393

9494
- ESM only, strict TypeScript, ES2017 target. Use the `node:` prefix for Node builtins.
9595
- New public options go in `assets/src/types.ts` with JSDoc; keep bundler adapters trivial.
96-
- Releases: `pnpm release` (`bumpp` + `pnpm publish`); changelog via `changelogithub` on tag push.
96+
- Commit messages: Symfony style `[<Scope>] <Short description>` — PascalCase scope, imperative mood, capitalized first word, no trailing period; combine scopes as `[A][B]` when a change spans several. E.g. `[Stimulus] Emit forward-slash local controller paths`, `[Docs] Frame Stimulus usage as the Encore experience`, `[CI] Cancel superseded runs with a concurrency group`. This is the convention used across Symfony UX and WebpackEncoreBundle — **not** Conventional Commits (no `feat:`/`fix:`/`chore:` prefixes).
97+
- Releases: the published npm package lives in `assets/` (`@symfony/reprise`); its `prepublishOnly` runs the `tsdown` build before publish.

CONTRIBUTING.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Contributing
2+
3+
Thank you for considering contributing to Symfony Reprise!
4+
5+
Symfony Reprise is an open source, community-driven project, and we are happy to receive contributions from the community.
6+
7+
> [!TIP]
8+
> It's a good idea to read [Symfony's Contribution Guide](https://symfony.com/doc/current/contributing/index.html) first.
9+
10+
## Reporting an issue
11+
12+
If you find a bug, have a feature request, or need help, please [open an issue](https://github.com/symfony/reprise/issues).
13+
14+
Please provide as much information as possible, and remember to follow our [Code of Conduct](https://symfony.com/doc/current/contributing/code_of_conduct/index.html) to keep the project welcoming for everyone.
15+
16+
## Contributing to the code
17+
18+
### Forking the repository
19+
20+
To contribute to Symfony Reprise, you need to [fork the **symfony/reprise** repository](https://github.com/symfony/reprise/fork) on GitHub.
21+
22+
```shell
23+
# With GitHub CLI https://cli.github.com/
24+
$ gh repo clone <USERNAME>/reprise reprise
25+
26+
# Using SSH
27+
$ git clone git@github.com:<USERNAME>/reprise.git reprise
28+
$ cd reprise
29+
$ git remote add upstream git@github.com:symfony/reprise.git
30+
```
31+
32+
### Setting up the development environment
33+
34+
- **PHP 8.4 or higher**
35+
- **Composer**
36+
- **Node.js 22 or higher**
37+
- **Corepack**
38+
- **pnpm 11.10 or higher**
39+
40+
```shell
41+
$ composer install
42+
$ corepack enable && pnpm install
43+
```
44+
45+
> [!IMPORTANT]
46+
> This repository has a dual structure: a PHP Symfony bundle (`symfony/reprise`) at the root, and an npm package (`@symfony/reprise`) in `assets/`, managed together as a pnpm workspace. Most changes touch only one side, but some (like adding a new option) touch both.
47+
48+
### Working with the PHP bundle
49+
50+
The PHP source lives in `src/`, tests in `tests/`. The bundle follows Symfony's PHP coding standards and the Backward Compatibility promise.
51+
52+
```shell
53+
# Run the test suite
54+
$ vendor/bin/phpunit
55+
56+
# Run static analysis
57+
$ vendor/bin/phpstan analyse
58+
59+
# Fix coding standards
60+
$ vendor/bin/php-cs-fixer fix
61+
```
62+
63+
### Working with the assets
64+
65+
The actual bundler plugin (the unplugin for Vite and Rsbuild) lives in `assets/`, written in TypeScript and built with [tsdown](https://tsdown.dev/). These commands run from the repository root:
66+
67+
```shell
68+
# Build the plugin
69+
$ pnpm build
70+
71+
# Watch and rebuild on change
72+
$ pnpm dev
73+
74+
# Run the test suite
75+
$ pnpm test
76+
77+
# Lint
78+
$ pnpm lint
79+
```
80+
81+
For manual end-to-end verification against a real Symfony backend, use the `playground/` app (a full Symfony 7 project that imports the plugin directly from `assets/`):
82+
83+
```shell
84+
$ npm -C playground run vite:dev
85+
$ npm -C playground run vite:build
86+
87+
$ npm -C playground run rsbuild:dev
88+
$ npm -C playground run rsbuild:build
89+
```
90+
91+
### Commit messages
92+
93+
Commit messages follow the same `[<Scope>] <Short description>` convention used across Symfony UX and WebpackEncoreBundle, not Conventional Commits. The scope is PascalCase, the description is imperative mood with a capitalized first word and no trailing period. Combine scopes as `[A][B]` when a change spans several areas.
94+
95+
```
96+
[Stimulus] Emit forward-slash local controller paths
97+
[Docs] Frame Stimulus usage as the Encore experience
98+
[CI] Cancel superseded runs with a concurrency group
99+
```
100+
101+
## Keeping your fork up to date
102+
103+
To reset your local `main` to match upstream:
104+
105+
```shell
106+
$ git checkout main && \
107+
git fetch upstream && \
108+
git reset --hard upstream/main && \
109+
git push origin main
110+
```
111+
112+
To rebase a feature branch on top of `upstream/main`:
113+
114+
```shell
115+
$ git checkout my-feature-branch && \
116+
git rebase upstream/main && \
117+
git push -u origin my-feature-branch
118+
```

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Reprise
1+
# Symfony Reprise
22

33
[![npm version](https://img.shields.io/npm/v/@symfony%2Freprise?color=crimson&label=)](https://www.npmjs.com/package/@symfony/reprise)
44
[![npm downloads](https://img.shields.io/npm/dm/@symfony%2Freprise?color=crimson&label=)](https://www.npmjs.com/package/@symfony/reprise)
55
[![license](https://img.shields.io/npm/l/@symfony%2Freprise?color=crimson&label=)](https://www.npmjs.com/package/@symfony/reprise)
66

7-
Webpack Encore gave Symfony first-class asset integration for Webpack. Reprise gives you the same integration for **Vite** and **Rsbuild**.
7+
Webpack Encore gave Symfony first-class asset integration for Webpack. Symfony Reprise gives you the same integration for **Vite** and **Rsbuild**.
88

99
## Features
1010

11-
⚡️Vite and 🦀Rsbuild already handle **Sass/Less/PostCSS**, **TypeScript**, **JSX/Vue/Svelte**, **code splitting**, **content hashing**, **source maps**, **minification** and **HMR** on their own, so Reprise doesn't reimplement any of that.
11+
⚡️Vite and 🦀Rsbuild already handle **Sass/Less/PostCSS**, **TypeScript**, **JSX/Vue/Svelte**, **code splitting**, **content hashing**, **source maps**, **minification** and **HMR** on their own, so Symfony Reprise doesn't reimplement any of that.
1212
It only covers the Symfony-side integration that bundlers don't provide out of the box:
1313

1414
- [x] Multiple entries

0 commit comments

Comments
 (0)