From 4480f7c8d27ee611e00055c89fd33bc9c6d6bbad Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Tue, 29 Sep 2026 12:34:39 -0400 Subject: [PATCH 1/2] docs: correct the release process --- RELEASING.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 8713e98..e6c8f90 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,6 +1,20 @@ Releasing ========= - 1. Run `VERSION=X.Y.Z make release` (where X.Y.Z is the new version). +Packagist learns about a new version from the tag and fetches the code from GitHub. +Nothing is uploaded, so there is no publish workflow and no credentials. - That's it! Composer will pick up the new tag and you can see the latest version at https://packagist.org/packages/segmentio/analytics-php. +1. Update `$SEGMENT_VERSION` in `lib/Version.php`. +2. In `HISTORY.md`, change the `Unreleased` heading to `X.Y.Z / YYYY-MM-DD`. +3. Open a PR and merge it to `master`. +4. Tag the merged commit — no `v` prefix: + + ``` + git tag X.Y.Z && git push origin X.Y.Z + ``` + +5. Confirm at https://packagist.org/packages/segmentio/analytics-php + +**Do not use `make release`.** It runs `git changelog -t`, which prepends a generated +changelog above the curated one, and its `printf` rewrites `lib/Version.php` from +scratch — dropping `declare(strict_types=1);` and switching to double quotes. From 551ae84cd460bf0f44ad837da76155a442623ef8 Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Tue, 29 Sep 2026 13:11:04 -0400 Subject: [PATCH 2/2] build: remove the make release target It rewrote lib/Version.php from scratch, losing declare(strict_types=1), and ran git changelog, which prepends a generated changelog above the curated one. Neither is wanted, and removing it drops the only dependency on git-extras. README pointed at it too; both it and RELEASING.md now describe the same process. --- Makefile | 8 +------- README.md | 2 +- RELEASING.md | 4 ---- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 3819410..2069a87 100644 --- a/Makefile +++ b/Makefile @@ -26,16 +26,10 @@ lint: dependencies printf "Please update PHP version to 5.5 or above for code formatting."; \ fi -release: - @printf "releasing ${VERSION}..." - @printf ' ./lib/Version.php - @git changelog -t ${VERSION} - @git release ${VERSION} - clean: rm -rf \ composer.phar \ vendor \ composer.lock -.PHONY: bootstrap release clean +.PHONY: bootstrap clean diff --git a/README.md b/README.md index 40d8a28..8ea284e 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Documentation is available at [segment.com/docs/sources/server/php](https://segm ## Releasing -Run `make release VERSION=`. It should automatically tag and release in composer +See [RELEASING.md](RELEASING.md). ## License diff --git a/RELEASING.md b/RELEASING.md index e6c8f90..1b8dba2 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -14,7 +14,3 @@ Nothing is uploaded, so there is no publish workflow and no credentials. ``` 5. Confirm at https://packagist.org/packages/segmentio/analytics-php - -**Do not use `make release`.** It runs `git changelog -t`, which prepends a generated -changelog above the curated one, and its `printf` rewrites `lib/Version.php` from -scratch — dropping `declare(strict_types=1);` and switching to double quotes.