hecq-et-lesort/README.md

31 lines
769 B
Markdown
Raw Normal View History

# Setup the project
2026-04-28 14:52:55 +02:00
Requirements: PHP 8.4+, Composer, Node.js/npm.
2026-04-28 14:52:55 +02:00
## Install the dependencies
2026-04-28 14:52:55 +02:00
```bash
composer install
npm install
```
2026-04-28 14:52:55 +02:00
## Start the local server
2026-04-28 14:52:55 +02:00
```bash
npm run serve
```
2026-04-28 14:52:55 +02:00
Opens [localhost:3000](http://localhost:3000) (BrowserSync + PHP server on port 8000).
2026-04-28 14:52:55 +02:00
## PHP code style
2026-04-28 14:52:55 +02:00
The project uses [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) to format PHP code (PSR-12, single quotes, `=>` alignment).
2026-04-28 14:52:55 +02:00
**Format on save with VS Code / VS Codium:** install the [`junstyle.php-cs-fixer`](https://marketplace.visualstudio.com/items?itemName=junstyle.php-cs-fixer) extension. The workspace config (`.vscode/settings.json`) automatically points to `vendor/bin/php-cs-fixer`.
2026-04-28 14:52:55 +02:00
**Run manually:**
2026-04-28 14:52:55 +02:00
```bash
./vendor/bin/php-cs-fixer fix
```