From 5db78bfa1aa4050d2e0864aacc0dfa4238575878 Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Wed, 11 Feb 2026 22:32:43 +0300 Subject: [PATCH 1/3] feat: Add `builds next` option --- admin/starter/builds | 27 ++++++++++--------- user_guide_src/source/changelogs/v4.7.1.rst | 6 +++++ .../installation/installing_composer.rst | 15 ++++++----- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/admin/starter/builds b/admin/starter/builds index cc2ca0851ac7..f156b6944cfd 100755 --- a/admin/starter/builds +++ b/admin/starter/builds @@ -1,7 +1,9 @@ #!/usr/bin/env php `. + ************ Deprecations ************ diff --git a/user_guide_src/source/installation/installing_composer.rst b/user_guide_src/source/installation/installing_composer.rst index 00a978547fb8..ab24aeffadea 100644 --- a/user_guide_src/source/installation/installing_composer.rst +++ b/user_guide_src/source/installation/installing_composer.rst @@ -158,6 +158,8 @@ Folders in your project after set up: - app, public, tests, writable - vendor/codeigniter4/framework/system +.. _switch-to-dev-version: + Latest Dev ---------- @@ -169,6 +171,9 @@ The `development user guide `_ is Note that this differs from the released user guide, and will pertain to the develop branch explicitly. +.. note:: You should not rely on the version of the framework in your project + - the development code may contain an incorrect number. + Update for Latest Dev ^^^^^^^^^^^^^^^^^^^^^ @@ -188,15 +193,11 @@ files if necessary. Next Minor Version ^^^^^^^^^^^^^^^^^^ -If you want to use the next minor version branch, after using the ``builds`` command -edit **composer.json** manually. +If you want to use the next minor version branch: -If you try the ``4.8`` branch, change the version to ``4.8.x-dev``:: +.. code-block:: console - "require": { - "php": "^8.2", - "codeigniter4/codeigniter4": "4.8.x-dev" - }, + php builds next And run ``composer update`` to sync your vendor folder with the latest target build. Then, check the Upgrading Guide From f5634b90d6f12f1dcf20265cb18e7dd50f741369 Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Thu, 12 Feb 2026 12:35:21 +0300 Subject: [PATCH 2/3] fix: Add release changes for `builds` --- admin/RELEASE.md | 4 ++++ admin/prepare-release.php | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/admin/RELEASE.md b/admin/RELEASE.md index 647720f7ca2c..ce7705ac2349 100644 --- a/admin/RELEASE.md +++ b/admin/RELEASE.md @@ -124,6 +124,10 @@ the existing content. * Set the date to format `Release Date: January 31, 2021` * Update **phpdoc.dist.xml** with the new `CodeIgniter v4.x API` and `` + * Update **admin/starter/builds**: + * Set `define('LATEST_RELEASE', '^4.x')` + * Set `define('NEXT_MINOR', '^4.y-dev')`. + * If the major version changes, you need to manually change to `define('NEXT_MINOR', '^5.0-dev')`. * Commit the changes with `Prep for 4.x.x release` * [ ] Create a new PR from `release-4.x.x` to `develop`: * Title: `Prep for 4.x.x release` diff --git a/admin/prepare-release.php b/admin/prepare-release.php index 5d66a43b8c86..386adc76e670 100644 --- a/admin/prepare-release.php +++ b/admin/prepare-release.php @@ -24,6 +24,9 @@ function replace_file_content(string $path, string $pattern, string $replace): v $versionParts = explode('.', $version); $minor = $versionParts[0] . '.' . $versionParts[1]; +// Note: Major version will change someday (4.x..5.x) - update manually. +$nextVersion = $versionParts[0] . '.' . $versionParts[1] + 1; + // Creates a branch for release. system('git switch develop'); system('git branch -D release-' . $version); @@ -68,6 +71,18 @@ function replace_file_content(string $path, string $pattern, string $replace): v "Release Date: {$date}", ); +// Update appstarter/builds script +replace_file_content( + './admin/starter/builds', + '/define\(\'LATEST_RELEASE\', \'.*?\'\);/mu', + "define('LATEST_RELEASE', '^{$minor}');", +); +replace_file_content( + './admin/starter/builds', + '/define\(\'NEXT_MINOR\', \'.*?\'\);/mu', + "define('NEXT_MINOR', '^{$nextVersion}-dev');", +); + // Commits system('git add -u'); system('git commit -m "Prep for ' . $version . ' release"'); From 9e5bda75f15ef0b9c6714806b2e2963ac9222c24 Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Thu, 12 Feb 2026 22:59:55 +0300 Subject: [PATCH 3/3] fix: Apply suggestions --- admin/RELEASE.md | 4 ++-- admin/prepare-release.php | 4 ++-- admin/starter/builds | 2 +- user_guide_src/source/changelogs/v4.7.1.rst | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/admin/RELEASE.md b/admin/RELEASE.md index ce7705ac2349..4116520297e9 100644 --- a/admin/RELEASE.md +++ b/admin/RELEASE.md @@ -126,8 +126,8 @@ the existing content. and `` * Update **admin/starter/builds**: * Set `define('LATEST_RELEASE', '^4.x')` - * Set `define('NEXT_MINOR', '^4.y-dev')`. - * If the major version changes, you need to manually change to `define('NEXT_MINOR', '^5.0-dev')`. + * Set `define('NEXT_MINOR', '4.y-dev')`. + * If the major version changes, you need to manually change to `define('NEXT_MINOR', '5.0-dev')`. * Commit the changes with `Prep for 4.x.x release` * [ ] Create a new PR from `release-4.x.x` to `develop`: * Title: `Prep for 4.x.x release` diff --git a/admin/prepare-release.php b/admin/prepare-release.php index 386adc76e670..3817396f065f 100644 --- a/admin/prepare-release.php +++ b/admin/prepare-release.php @@ -25,7 +25,7 @@ function replace_file_content(string $path, string $pattern, string $replace): v $minor = $versionParts[0] . '.' . $versionParts[1]; // Note: Major version will change someday (4.x..5.x) - update manually. -$nextVersion = $versionParts[0] . '.' . $versionParts[1] + 1; +$nextMinor = $versionParts[0] . '.' . $versionParts[1] + 1; // Creates a branch for release. system('git switch develop'); @@ -80,7 +80,7 @@ function replace_file_content(string $path, string $pattern, string $replace): v replace_file_content( './admin/starter/builds', '/define\(\'NEXT_MINOR\', \'.*?\'\);/mu', - "define('NEXT_MINOR', '^{$nextVersion}-dev');", + "define('NEXT_MINOR', '{$nextMinor}-dev');", ); // Commits diff --git a/admin/starter/builds b/admin/starter/builds index f156b6944cfd..330f684ffbbf 100755 --- a/admin/starter/builds +++ b/admin/starter/builds @@ -3,7 +3,7 @@ define('LATEST_RELEASE', '^4.7'); define('DEVELOP_BRANCH', 'dev-develop'); -define('NEXT_MINOR', '^4.8-dev'); +define('NEXT_MINOR', '4.8-dev'); define('GITHUB_URL', 'https://github.com/codeigniter4/codeigniter4'); /* diff --git a/user_guide_src/source/changelogs/v4.7.1.rst b/user_guide_src/source/changelogs/v4.7.1.rst index 4cc8a1a2087b..824ddaa35f35 100644 --- a/user_guide_src/source/changelogs/v4.7.1.rst +++ b/user_guide_src/source/changelogs/v4.7.1.rst @@ -27,8 +27,8 @@ Changes Others ====== -- **builds:** In the ``builds`` script (for ``codeigniter4/appstarter``), the ``next`` option has been added - to switch ``4.7.x`` to the next minor version ``4.8-dev``. See :ref:`Latest Dev`. +- **builds:** In the ``builds`` script (for ``codeigniter4/appstarter``), the ``next`` argument has been added + to switch ``4.7.x`` to the next minor version ``4.8.x-dev``. See :ref:`Latest Dev`. ************ Deprecations