Skip to content

Commit 5512c77

Browse files
committed
docs: prepare release 1.2.2
Align with Nowo bundle standards (PHPStan FrankenPHP, GH automation, docs).
1 parent ce31007 commit 5512c77

22 files changed

Lines changed: 398 additions & 34 deletions

.github/copilot-instructions.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## AI contribution guidelines (Nowo Symfony bundle)
2+
3+
Use this when suggesting code, tests, documentation, or CI changes for this repository.
4+
5+
### Scope
6+
7+
- This is a **Symfony bundle** published under `nowo-tech/*` on Packagist (`nowo-tech/ckeditor5-editor-bundle`).
8+
- Respect the **PHP** and **Symfony** version ranges declared in `composer.json`.
9+
- Prefer **PHP 8 attributes** for configuration and metadata. Do not introduce `doctrine/annotations` for new code.
10+
11+
### Code
12+
13+
- Follow **PSR-12** and project conventions in `.php-cs-fixer.dist.php` (including `declare_strict_types`).
14+
- Use **strict comparison** (`===`) where appropriate.
15+
- Keep changes **minimal** and consistent with existing patterns in `src/` and `tests/`.
16+
- Align with `composer cs-check`, `composer phpstan`, and `composer test` expectations.
17+
- Frontend assets: kebab-case TypeScript filenames under `src/Resources/assets/src/`; English JSDoc on exported helpers; rebuild with `pnpm run build` when sources change.
18+
19+
### Git
20+
21+
- **Never** add `Co-authored-by: Cursor` or similar Cursor agent trailers to commit messages (REQ-GIT-001).
22+
23+
### Documentation
24+
25+
- User-facing documentation is **English** under `docs/` per Nowo bundle standards.
26+
- Only `README.md` at repository root (no extra root markdown files).
27+
28+
### Tests
29+
30+
- Add or update tests for new behaviour; keep coverage in line with README and CI (PHP 100% on `src/`; Vitest on `logger.ts`).

.github/dependabot.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Dependabot configuration for automated dependency updates
2+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: "composer"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"
10+
day: "monday"
11+
time: "09:00"
12+
timezone: "Europe/Madrid"
13+
open-pull-requests-limit: 5
14+
reviewers:
15+
- "HecFranco"
16+
labels:
17+
- "dependencies"
18+
- "php"
19+
groups:
20+
symfony:
21+
patterns:
22+
- "symfony/*"
23+
phpstan:
24+
patterns:
25+
- "phpstan/*"
26+
commit-message:
27+
prefix: "chore(deps):"
28+
29+
- package-ecosystem: "github-actions"
30+
directory: "/"
31+
schedule:
32+
interval: "weekly"
33+
day: "monday"
34+
time: "09:00"
35+
timezone: "Europe/Madrid"
36+
open-pull-requests-limit: 3
37+
reviewers:
38+
- "HecFranco"
39+
labels:
40+
- "dependencies"
41+
- "github-actions"
42+
commit-message:
43+
prefix: "chore(ci):"
44+
45+
- package-ecosystem: "npm"
46+
directory: "/"
47+
schedule:
48+
interval: "weekly"
49+
day: "monday"
50+
time: "09:00"
51+
timezone: "Europe/Madrid"
52+
open-pull-requests-limit: 3
53+
reviewers:
54+
- "HecFranco"
55+
labels:
56+
- "dependencies"
57+
- "javascript"
58+
commit-message:
59+
prefix: "chore(deps):"

.github/workflows/pr-lint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: GitHub PR Lint
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- reopened
9+
- synchronize
10+
11+
jobs:
12+
semantic-pr:
13+
name: Validate semantic PR title
14+
runs-on: ubuntu-latest
15+
permissions:
16+
pull-requests: read
17+
steps:
18+
- name: Semantic PR title
19+
uses: amannn/action-semantic-pull-request@v6
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/stale.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Stale Issues and Pull Requests
2+
3+
on:
4+
schedule:
5+
- cron: "30 1 * * *"
6+
7+
jobs:
8+
close-issues:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
pull-requests: write
13+
steps:
14+
- uses: actions/stale@v10
15+
with:
16+
days-before-stale: 60
17+
days-before-close: 60
18+
stale-issue-label: "stale"
19+
stale-pr-label: "stale"
20+
exempt-issue-labels: "WIP,Do Not Close"
21+
exempt-pr-labels: "Do Not Close,need review"
22+
stale-issue-message: "This issue has been marked as stale because it has not had any activity for 60 days. Remove stale label or comment to prevent this from being closed in 60 days."
23+
close-issue-message: "This issue was closed because it has been inactive for 60 days since being marked as stale."
24+
stale-pr-message: "This PR has been marked as stale because it has not had any activity for 60 days. Remove stale label or comment to prevent this from being closed in 60 days."
25+
close-pr-message: "This PR was closed because it has been inactive for 60 days since being marked as stale."
26+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.php-cs-fixer.dist.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@
7979
'modernize_types_casting' => true,
8080
'no_short_bool_cast' => true,
8181
'explicit_string_variable' => true,
82-
'fully_qualified_strict_types' => true,
82+
'fully_qualified_strict_types' => [
83+
// Convert \Foo\Bar to use Foo\Bar; + Bar (instanceof, new, types, ::class, etc.).
84+
'import_symbols' => true,
85+
],
8386
'global_namespace_import' => [
8487
'import_classes' => true,
8588
'import_constants' => true,

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
77
Symfony bundle: **`Ckeditor5EditorType`** stores HTML in a textarea while **CKEditor 5 classic** (GPL open-source plugins only) runs in the browser. YAML profiles (FOS-style), **Vite** IIFE build (`ckeditor5-editor.js`) under `src/Resources/public/`.
88

9-
**FrankenPHP:** Demo runtime is selected with **`FRANKENPHP_MODE`** (`worker` default, or `classic` for per-request PHP / hot-reload). See [docs/DEMO-FRANKENPHP.md](docs/DEMO-FRANKENPHP.md).
9+
![FrankenPHP Friendly Worker Mode](docs/images/frankenphp-friendly.png)
10+
11+
This bundle is **FrankenPHP worker mode friendly**.
12+
13+
**FrankenPHP demos:** runtime is selected with **`FRANKENPHP_MODE`** (`worker` default, or `classic` for per-request PHP / hot-reload). See [docs/DEMO-FRANKENPHP.md](docs/DEMO-FRANKENPHP.md).
1014

1115
## Features
1216

@@ -103,10 +107,10 @@ Presets include **`standard`**, **`simple`**, **`minimal`**, **`emoji`**, **`typ
103107

104108
## Tests and coverage
105109

106-
| Layer | Target / notes |
107-
| ----- | ---------------- |
108-
| **PHP** | **100%** statement coverage on bundle `src/` (PHPUnit + Clover); enforced by `scripts/verify-clover-100.php`. Run `composer test-coverage` or `make test-coverage`. |
109-
| **TypeScript** | Vitest thresholds on `src/Resources/assets/src/logger.ts` (see `vitest.config.ts`). Run `pnpm run test:coverage` or `make test-ts`. |
110+
- Tests: PHPUnit (unit + integration) and Vitest (`logger.ts`). Run `make test` / `composer test` and `make test-ts`.
111+
- PHP: **100%**
112+
- TS/JS: **100%** (Vitest on `src/Resources/assets/src/logger.ts`; see `vitest.config.ts`)
113+
- Python: N/A
110114

111115
CI runs PHPUnit (matrix **PHP 8.2–8.5** × **Symfony 7.0 / 7.4 / 8.0 / 8.1**), PHPStan, PHP-CS-Fixer dry-run, and Vitest coverage on pushes and pull requests.
112116

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
},
4949
"require-dev": {
5050
"friendsofphp/php-cs-fixer": "^3.0",
51+
"nowo-tech/phpstan-frankenphp": "^1.0",
5152
"phpstan/extension-installer": "^1.0",
5253
"phpstan/phpstan": "^2.0",
5354
"phpstan/phpstan-phpunit": "^2.0",

composer.lock

Lines changed: 87 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/symfony8/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ coverage.xml
4242
*.tgz
4343
*.rar
4444
*.7z
45+
46+
# pnpm local store (never commit)
47+
/.pnpm-store

demo/symfony8/composer.lock

Lines changed: 10 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)