From 707a417cbee2b9e760af30ff28e3327c65e8bc56 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 15:24:52 -0300 Subject: [PATCH 01/14] Require PHP 8.5 --- .github/workflows/tests.yml | 4 ++-- .gitlab-ci.yml | 2 +- composer.json | 2 +- docker-compose.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 468ec77..37340e6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 10 - name: PHP 8.3 + name: PHP 8.5 steps: - name: Checkout @@ -20,7 +20,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.3 + php-version: 8.5 tools: composer coverage: xdebug diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 79714d2..9fcddee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ --- -image: registry.gitlab.com/aplus-framework/images/base:4 +image: registry.gitlab.com/aplus-framework/images/base:6 include: - template: Security/SAST.gitlab-ci.yml diff --git a/composer.json b/composer.json index eb50a6c..9da53bf 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ } ], "require": { - "php": ">=8.3", + "php": ">=8.5", "aplus/autoload": "^3.0.1", "aplus/cache": "^4.1.0", "aplus/cli": "^3.0.1", diff --git a/docker-compose.yml b/docker-compose.yml index 06118b1..91eea37 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3" services: package: - image: registry.gitlab.com/aplus-framework/images/package:4 + image: registry.gitlab.com/aplus-framework/images/package:6 container_name: package-framework working_dir: /package volumes: From aade400adbb49118d60e75e434f65643a834124d Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 15:25:11 -0300 Subject: [PATCH 02/14] Gitignore .phpunit.cache --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 592d95b..d6a2742 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ build/ raw-tests/ vendor/ .php-cs-fixer.cache +.phpunit.cache .phpunit.result.cache composer.lock composer.phar From 58d649f0bdd3eddebcd69c0d7a22ba1861eba981 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 15:25:40 -0300 Subject: [PATCH 03/14] Remove parentheses --- .php-cs-fixer.dist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index e7d7245..6ff808f 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -10,7 +10,7 @@ use Framework\CodingStandard\Config; use Framework\CodingStandard\Finder; -return (new Config())->setDefaultHeaderComment( +return new Config()->setDefaultHeaderComment( 'Aplus Framework', 'Natan Felles ' )->setFinder( From ebfd7870db56202abbe6beb1b361f7ce389db6cd Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 15:26:43 -0300 Subject: [PATCH 04/14] Remove obsolete attribute 'version' --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 91eea37..b7fe0f3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3" services: package: image: registry.gitlab.com/aplus-framework/images/package:6 From 0406e671e416f4bae2c27208a200ef7f8147e9bb Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 15:27:30 -0300 Subject: [PATCH 05/14] Run jobs on Ubuntu 24.04 --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 37340e6..896f158 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ on: jobs: tests: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 timeout-minutes: 10 name: PHP 8.5 @@ -57,7 +57,7 @@ jobs: php-coveralls --coverage_clover=build/logs/clover.xml -v tests-latest: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 timeout-minutes: 10 name: PHP Latest From c1386bb88471ec318ce0e724cce0a3e033994686 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 15:28:09 -0300 Subject: [PATCH 06/14] Use Checkout v6 --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 896f158..3c21ac5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -64,7 +64,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup PHP uses: shivammathur/setup-php@v2 with: From 3e4f9ec314e3d269be897587ada2eaa40d1fdc7a Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 15:35:24 -0300 Subject: [PATCH 07/14] Upgrade required packages --- composer.json | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/composer.json b/composer.json index 9da53bf..969856c 100644 --- a/composer.json +++ b/composer.json @@ -30,34 +30,34 @@ ], "require": { "php": ">=8.5", - "aplus/autoload": "^3.0.1", - "aplus/cache": "^4.1.0", - "aplus/cli": "^3.0.1", - "aplus/config": "^4.0.1", - "aplus/crypto": "^2.0.1", - "aplus/database": "^4.1.2", - "aplus/database-extra": "^4.0.1", - "aplus/date": "^3.0.1", - "aplus/debug": "^4.1.2", - "aplus/dev-commands": "^2.0.2", - "aplus/email": "^4.0.1", - "aplus/events": "^2.0.0", - "aplus/factories": "^2.0.1", - "aplus/helpers": "^4.0.1", - "aplus/http": "^6.2.0", - "aplus/http-client": "^5.0.1", - "aplus/image": "^3.0.1", - "aplus/language": "^4.0.1", - "aplus/log": "^4.1.0", - "aplus/mvc": "^4.1.0", - "aplus/pagination": "^4.0.1", - "aplus/routing": "^4.0.1", - "aplus/session": "^4.0.1", - "aplus/validation": "^3.1.1" + "aplus/autoload": "^4.0", + "aplus/cache": "^5.0", + "aplus/cli": "^4.0", + "aplus/config": "^5.0", + "aplus/crypto": "^3.0", + "aplus/database": "^5.0", + "aplus/database-extra": "^5.0", + "aplus/date": "^4.0", + "aplus/debug": "^5.0", + "aplus/dev-commands": "^3.0", + "aplus/email": "^5.0", + "aplus/events": "^3.0", + "aplus/factories": "^3.0", + "aplus/helpers": "^5.0", + "aplus/http": "^7.0", + "aplus/http-client": "^6.0", + "aplus/image": "^4.0", + "aplus/language": "^5.0", + "aplus/log": "^5.0", + "aplus/mvc": "^5.0", + "aplus/pagination": "^5.0", + "aplus/routing": "^5.0", + "aplus/session": "^5.0", + "aplus/validation": "^4.0" }, "require-dev": { "ext-xdebug": "*", - "aplus/coding-standard": "^2.8.0", + "aplus/coding-standard": "^3.0", "ergebnis/composer-normalize": "^2.44", "phpmd/phpmd": "^2.15", "phpstan/phpstan": "^1.12", From c63f41cb2e565f210880f819babaa01a9189686c Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 15:38:43 -0300 Subject: [PATCH 08/14] Add note --- autoload.php | 1 + preload.php | 1 + 2 files changed, 2 insertions(+) diff --git a/autoload.php b/autoload.php index 4d50449..f2dbef2 100644 --- a/autoload.php +++ b/autoload.php @@ -7,6 +7,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +// NOTE: This file is designed to work in a global installation with Composer or similar. require __DIR__ . '/../autoload/src/Autoloader.php'; use Framework\Autoload\Autoloader; diff --git a/preload.php b/preload.php index 4096e91..c2eb131 100644 --- a/preload.php +++ b/preload.php @@ -7,6 +7,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +// NOTE: This file is designed to work in a global installation with Composer or similar. require __DIR__ . '/../autoload/src/Preloader.php'; use Framework\Autoload\Preloader; From a9c54546e80da0a303b14227bafcebf8d2d900e3 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 15:45:46 -0300 Subject: [PATCH 09/14] Remove parentheses --- autoload.php | 2 +- preload.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload.php b/autoload.php index f2dbef2..7fc96ff 100644 --- a/autoload.php +++ b/autoload.php @@ -14,7 +14,7 @@ $aplusDir = dirname(__DIR__) . \DIRECTORY_SEPARATOR; -return (new Autoloader())->setClasses([ +return new Autoloader()->setClasses([ 'Aplus' => __DIR__ . '/src/Aplus.php', ])->setNamespaces([ 'Framework\Autoload' => $aplusDir . 'autoload/src', diff --git a/preload.php b/preload.php index c2eb131..df68f55 100644 --- a/preload.php +++ b/preload.php @@ -12,7 +12,7 @@ use Framework\Autoload\Preloader; -$files = (new Preloader())->load(); +$files = new Preloader()->load(); echo 'Preloading Aplus Framework: ' . \PHP_EOL; foreach ($files as $index => $file) { echo ++$index . ') ' . $file . \PHP_EOL; From 3386d1c08c5c244175e0aa120b9d23fcce31ca4f Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 15:52:28 -0300 Subject: [PATCH 10/14] Update preload script --- preload.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/preload.php b/preload.php index df68f55..81b654c 100644 --- a/preload.php +++ b/preload.php @@ -12,9 +12,14 @@ use Framework\Autoload\Preloader; +new Preloader()->load(); + +/* +// Commenting prevents the echo from appearing in the server logs. $files = new Preloader()->load(); echo 'Preloading Aplus Framework: ' . \PHP_EOL; foreach ($files as $index => $file) { echo ++$index . ') ' . $file . \PHP_EOL; } echo 'Total of ' . count($files) . ' preloaded files.' . \PHP_EOL . \PHP_EOL; +*/ From d5d179eacf176d911773560941fd6a6942e012c3 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 15:59:33 -0300 Subject: [PATCH 11/14] Update Aplus::VERSION --- src/Aplus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Aplus.php b/src/Aplus.php index 22bb33f..bafdcbb 100644 --- a/src/Aplus.php +++ b/src/Aplus.php @@ -17,5 +17,5 @@ final class Aplus /** * The Aplus version. */ - public const string VERSION = '25.1.0'; + public const string VERSION = '26.0.0'; } From a37f72a147951ba9eab86ed6a1b61e1db47ef1e8 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 16:05:16 -0300 Subject: [PATCH 12/14] Remove parentheses --- guide/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/index.rst b/guide/index.rst index 6c298e9..a269c08 100644 --- a/guide/index.rst +++ b/guide/index.rst @@ -123,7 +123,7 @@ Let's see an example autoloading in the ``index.php`` file: App::setService('autoloader', $autoloader); - (new App())->run(); + new App()->run(); The Autoloader instance was reused, setting the directory to the ``App`` namespace and also set as a service in the MVC @@ -197,7 +197,7 @@ Let's look at a basic file for responding to HTTP requests: runHttp(); + new App()->runHttp(); And that's it! From 1f91b3c093336bbbf8cb6eaa3ee1cb93d8b859d9 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 16:12:03 -0300 Subject: [PATCH 13/14] Update PHP version --- guide/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/index.rst b/guide/index.rst index a269c08..c72d115 100644 --- a/guide/index.rst +++ b/guide/index.rst @@ -146,7 +146,7 @@ PHP-FPM In production, it is very common to use **FastCGI Process Manager**. The ``php.ini`` file of `PHP-FPM `_ -on Debian-based distributions is located at ``/etc/php/8.1/fpm/php.ini``. +on Debian-based distributions is located at ``/etc/php/8.5/fpm/php.ini``. To enable preloading enter the path of the preload file and the username, which is normally ``www-data``: @@ -160,7 +160,7 @@ Then restart the PHP-FPM service: .. code-block:: - sudo systemctl restart php8.1-fpm.service + sudo systemctl restart php8.5-fpm.service And that's it! Loaded classes. We can use them directly as if they were part of the PHP core! From 7a980ee00da1a41ff1b617b405c62c4a28e5276e Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 22 Apr 2026 16:15:43 -0300 Subject: [PATCH 14/14] Update issues link --- guide/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/index.rst b/guide/index.rst index c72d115..67c05fd 100644 --- a/guide/index.rst +++ b/guide/index.rst @@ -211,5 +211,5 @@ The more you use it, the more you will learn. .. note:: Did you find something wrong? Be sure to let us know about it with an - `issue `_. + `issue `_. Thank you!