Skip to content

Commit e1aa0c3

Browse files
committed
fix: Compose V2 Makefiles and prepare release 1.3.1
Prefer docker compose with V1 fallback, make monorepo update-deps includes optional, and document the patch in CHANGELOG/UPGRADING.
1 parent 2671a81 commit e1aa0c3

5 files changed

Lines changed: 55 additions & 26 deletions

File tree

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
.PHONY: help up down build shell install test test-coverage coverage-php-percent cs-check cs-fix qa clean assets assets-build assets-watch test-ts ensure-up rector rector-dry phpstan release-check release-check-demos composer-sync update validate validate-translations check-no-cursor-coauthor check-open-prs demo-smoke strip-cursor-coauthor-from-history setup-hooks
33

44
COMPOSE_FILE ?= docker-compose.yml
5-
COMPOSE ?= docker-compose -f $(COMPOSE_FILE)
5+
# Prefer Compose V2 plugin (GitHub Actions / modern Docker Desktop); fall back to docker-compose V1 (REQ-MAKE-010).
6+
COMPOSE_BIN ?= $(shell docker compose version >/dev/null 2>&1 && echo "docker compose" || echo "docker-compose")
7+
COMPOSE ?= $(COMPOSE_BIN) -f $(COMPOSE_FILE)
68
SERVICE_PHP ?= php
79

810
help:
@@ -130,4 +132,5 @@ validate: ensure-up
130132

131133
# REQ-MAKE-008: update-deps (REQ-MAKE-008)
132134
BUNDLE_ROOT := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
133-
include $(BUNDLE_ROOT)/../.scripts/Makefile.update-deps.mk
135+
# Optional: monorepo helper absent on standalone GitHub Actions checkout (REQ-MAKE-009).
136+
-include $(BUNDLE_ROOT)/../.scripts/Makefile.update-deps.mk

demo/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Makefile for CKEditor 5 Editor Bundle Demo
22
# Each demo has its own docker-compose.yml and can be run independently
33

4+
# Prefer Compose V2 plugin (GitHub Actions / modern Docker Desktop); fall back to docker-compose V1 (REQ-MAKE-010).
5+
COMPOSE ?= $(shell docker compose version >/dev/null 2>&1 && echo "docker compose" || echo "docker-compose")
6+
47
DEMOS := symfony8
58

69
.PHONY: help clean test-all test-coverage-all verify-all release-check release-verify demo-smoke
@@ -73,7 +76,7 @@ endef
7376

7477
define logs-target-template
7578
logs-$(1):
76-
@cd $(1) && docker-compose logs -f
79+
@cd $(1) && $(COMPOSE) logs -f
7780
endef
7881

7982
define test-target-template
@@ -187,4 +190,5 @@ clean:
187190

188191
# REQ-MAKE-008: update-deps-all (REQ-MAKE-008)
189192
BUNDLE_ROOT := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..)
190-
include $(BUNDLE_ROOT)/../.scripts/Makefile.demo-aggregate-update-deps.mk
193+
# Optional: monorepo helper absent on standalone GitHub Actions checkout (REQ-MAKE-009).
194+
-include $(BUNDLE_ROOT)/../.scripts/Makefile.demo-aggregate-update-deps.mk

demo/symfony8/Makefile

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
# Makefile for Symfony 8.0 Demo (Tiptap Editor Bundle)
1+
# Makefile for Symfony 8 Demo (CKEditor 5 Editor Bundle)
22
# Run from this directory: make up, make install, etc.
33

4+
# Prefer Compose V2 plugin (GitHub Actions / modern Docker Desktop); fall back to docker-compose V1 (REQ-MAKE-010).
5+
COMPOSE ?= $(shell docker compose version >/dev/null 2>&1 && echo "docker compose" || echo "docker-compose")
6+
47
.PHONY: help up down build install shell logs test test-coverage cache-clear link-bundle update-bundle ensure-up restart
58

69
help:
@@ -23,65 +26,66 @@ help:
2326
up:
2427
@if [ ! -f .env ]; then cp .env.example .env 2>/dev/null || true; fi
2528
@echo "Installing dependencies (one-off container)..."
26-
@docker-compose run --rm -T --entrypoint composer -e COMPOSER_MEMORY_LIMIT=-1 php install --no-interaction --no-scripts
29+
@$(COMPOSE) run --rm -T --entrypoint composer -e COMPOSER_MEMORY_LIMIT=-1 php install --no-interaction --no-scripts
2730
@echo "Warming cache and installing assets..."
28-
@docker-compose run --rm -T --entrypoint php php -d memory_limit=256M bin/console cache:clear
29-
@docker-compose run --rm -T --entrypoint php php bin/console assets:install public
31+
@$(COMPOSE) run --rm -T --entrypoint php php -d memory_limit=256M bin/console cache:clear
32+
@$(COMPOSE) run --rm -T --entrypoint php php bin/console assets:install public
3033
@echo "Starting server..."
31-
docker-compose up -d
34+
$(COMPOSE) up -d
3235
@echo "Waiting for app to respond..."
3336
@PORT=$$(grep -E '^PORT=' .env 2>/dev/null | cut -d= -f2); PORT=$${PORT:-8021}; \
3437
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do \
3538
curl -s -o /dev/null -w "%{http_code}" "http://127.0.0.1:$$PORT/" 2>/dev/null | grep -qE '^[23]' && echo "Demo started at: http://localhost:$$PORT"; exit 0; \
3639
echo " waiting... $$i/15"; sleep 2; \
3740
done; \
38-
echo "App did not respond in time. Check: docker-compose logs php"; exit 1
41+
echo "App did not respond in time. Check: $(COMPOSE) logs php"; exit 1
3942

4043
down:
41-
docker-compose down
44+
$(COMPOSE) down
4245

4346
restart: ensure-up
44-
docker-compose restart
47+
$(COMPOSE) restart
4548

4649
build:
47-
docker-compose build --no-cache
50+
$(COMPOSE) build --no-cache
4851

4952
ensure-up:
50-
@if ! docker-compose exec -T php true 2>/dev/null; then \
53+
@if ! $(COMPOSE) exec -T php true 2>/dev/null; then \
5154
echo "Starting container..."; \
52-
docker-compose up -d; \
55+
$(COMPOSE) up -d; \
5356
sleep 3; \
5457
fi
5558

5659
install: ensure-up
57-
docker-compose exec -T -e COMPOSER_MEMORY_LIMIT=-1 php composer install --no-interaction
60+
$(COMPOSE) exec -T -e COMPOSER_MEMORY_LIMIT=-1 php composer install --no-interaction
5861

5962
shell: ensure-up
60-
docker-compose exec php sh
63+
$(COMPOSE) exec php sh
6164

6265
logs:
63-
docker-compose logs -f
66+
$(COMPOSE) logs -f
6467

6568
test: ensure-up
66-
docker-compose exec -e APP_ENV=test php composer test
69+
$(COMPOSE) exec -e APP_ENV=test php composer test
6770

6871
test-coverage: ensure-up
69-
docker-compose exec php composer test-coverage
72+
$(COMPOSE) exec php composer test-coverage
7073

7174
cache-clear: ensure-up
72-
docker-compose exec php php bin/console cache:clear
75+
$(COMPOSE) exec php php bin/console cache:clear
7376

7477
link-bundle: ensure-up
75-
docker-compose exec php sh -c "rm -rf vendor/nowo-tech/ckeditor5-editor-bundle && ln -s /var/ckeditor5-editor-bundle vendor/nowo-tech/ckeditor5-editor-bundle && php bin/console cache:clear"
78+
$(COMPOSE) exec php sh -c "rm -rf vendor/nowo-tech/ckeditor5-editor-bundle && ln -s /var/ckeditor5-editor-bundle vendor/nowo-tech/ckeditor5-editor-bundle && php bin/console cache:clear"
7679
@echo "Bundle linked to mounted source. Reload the page in the browser."
7780

7881
update-bundle: ensure-up
79-
docker-compose exec php composer update nowo-tech/ckeditor5-editor-bundle --no-interaction
80-
docker-compose exec php php bin/console cache:clear --env=dev
82+
$(COMPOSE) exec php composer update nowo-tech/ckeditor5-editor-bundle --no-interaction
83+
$(COMPOSE) exec php php bin/console cache:clear --env=dev
8184
@echo "Bundle updated. Reload the page in the browser."
8285

8386

8487
# REQ-MAKE-008: update-deps (REQ-MAKE-008)
8588
BUNDLE_ROOT := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/../..)
8689
SERVICE_PHP := php
87-
include $(BUNDLE_ROOT)/../.scripts/Makefile.demo-update-deps.mk
90+
# Optional: monorepo helper absent on standalone GitHub Actions checkout (REQ-MAKE-009).
91+
-include $(BUNDLE_ROOT)/../.scripts/Makefile.demo-update-deps.mk

docs/CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.3.1] - 2026-07-29
11+
12+
### Changed
13+
14+
- **REQ-MAKE-010:** Makefiles prefer `docker compose` (V2) with fallback to `docker-compose` (V1).
15+
- **REQ-MAKE-009:** monorepo `update-deps` includes are optional (`-include`) so standalone CI checkouts do not fail.
16+
1017
## [1.3.0] - 2026-07-28
1118

1219
### Added
@@ -162,7 +169,8 @@ First semver release (documented stable line, CI and Packagist aligned with tag
162169
- PHPUnit: integration suite + unit test for `upload_url` CSRF branch (**100%** PHP Clover on `src/`).
163170
- PHP-CS-Fixer finder excludes generated integration fixture cache and `tests/Fixtures/app/config/reference.php`.
164171

165-
[Unreleased]: https://github.com/nowo-tech/Ckeditor5EditorBundle/compare/v1.3.0...HEAD
172+
[Unreleased]: https://github.com/nowo-tech/Ckeditor5EditorBundle/compare/v1.3.1...HEAD
173+
[1.3.1]: https://github.com/nowo-tech/Ckeditor5EditorBundle/compare/v1.3.0...v1.3.1
166174
[1.3.0]: https://github.com/nowo-tech/Ckeditor5EditorBundle/compare/v1.2.3...v1.3.0
167175
[1.2.3]: https://github.com/nowo-tech/Ckeditor5EditorBundle/compare/v1.2.2...v1.2.3
168176
[1.2.2]: https://github.com/nowo-tech/Ckeditor5EditorBundle/compare/v1.2.1...v1.2.2

docs/UPGRADING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Table of contents
44

55
- [General](#general)
6+
- [To 1.3.1 from 1.3.0](#to-131-from-130)
67
- [To 1.3.0 from 1.2.3](#to-130-from-123)
78
- [To 1.0.0 (first Git / Packagist semver tag)](#to-100-first-git-packagist-semver-tag)
89
- [To 1.0.1 from 1.0.0](#to-101-from-100)
@@ -27,6 +28,15 @@
2728
- Pin versions in `composer.json` (e.g. `^1.0`) instead of relying only on `dev-main` for production apps.
2829
- After upgrading, run `php bin/console cache:clear` and `php bin/console assets:install public` so Twig and published bundle assets stay in sync.
2930

31+
## To 1.3.1 from 1.3.0
32+
33+
Patch release: Makefile Compose V2 preference and optional monorepo `update-deps` includes. No bundle API, YAML, or runtime behaviour changes for applications.
34+
35+
- **Composer:** `composer update nowo-tech/ckeditor5-editor-bundle` only if you pin an exact patch (e.g. `1.3.0`); with `^1.0` or `^1.3`, **1.3.1** is included on update.
36+
- **Contributors / demos:** Makefiles use `docker compose` when available (fallback `docker-compose`). Standalone clones no longer require `bundles/.scripts` for `make` to load.
37+
38+
See [`CHANGELOG.md`](CHANGELOG.md) (section **1.3.1**).
39+
3040
## To 1.3.0 from 1.2.3
3141

3242
Minor release: public backed enum `EditorTheme` for chrome palette values, plus Nowo standards (deprecations helper, PHPStan baseline, pnpm-only frontend, demo PHP 8.5). YAML `theme` string values are unchanged.

0 commit comments

Comments
 (0)