Skip to content

Commit 3d43e85

Browse files
committed
Upgrade to PHP 8.4
1 parent 733347c commit 3d43e85

18 files changed

Lines changed: 39 additions & 37 deletions

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Setup PHP
1515
uses: shivammathur/setup-php@v2
1616
with:
17-
php-version: 8.3
17+
php-version: 8.4
1818
tools: composer:v2
1919
coverage: xdebug
2020

CLAUDE.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
Berta is a file-based CMS (no database required for content storage). It has three distinct sub-applications that are developed and built independently:
88

9-
1. **`_api_app/`** — Laravel 12 API backend (PHP 8.2+)
9+
1. **`_api_app/`** — Laravel 12 API backend (PHP 8.4+)
1010
2. **`editor/`** — Angular 20 admin editor (TypeScript)
1111
3. **`engine/`** — Legacy PHP rendering engine with Gulp-built assets
1212

1313
## Development Commands
1414

1515
### Laravel API (`_api_app/`)
16+
1617
```bash
1718
cd _api_app
1819
composer install
@@ -24,6 +25,7 @@ npm run build # Build assets
2425
```
2526

2627
### Angular Editor (`editor/`)
28+
2729
```bash
2830
cd editor
2931
npm install
@@ -33,6 +35,7 @@ npm test # Karma/Jasmine unit tests
3335
```
3436

3537
### Legacy Engine Assets (root)
38+
3639
```bash
3740
npm install
3841
npm run dev # Gulp watch (compiles Sass for themes/templates)
@@ -50,18 +53,18 @@ npm run build # Gulp production build
5053

5154
### Key Directories
5255

53-
| Path | Purpose |
54-
|------|---------|
55-
| `_api_app/app/Sites/` | Site/section/entry management domain |
56-
| `_api_app/app/Shop/` | E-commerce plugin |
57-
| `_api_app/app/Plugins/` | Plugin system |
58-
| `_api_app/app/Configuration/` | App configuration classes |
59-
| `editor/src/` | Angular source (components, state, services) |
60-
| `engine/_classes/` | Legacy PHP classes for site rendering |
61-
| `engine/_lib/berta/` | CSS/JS assets bundled by Gulp |
62-
| `_themes/` | Site themes (capetown, jaipur, kyoto, madrid, etc.) |
63-
| `_templates/` | Email/system templates with SCSS |
64-
| `_plugin_shop/` | Shop plugin PHP files |
56+
| Path | Purpose |
57+
| ----------------------------- | --------------------------------------------------- |
58+
| `_api_app/app/Sites/` | Site/section/entry management domain |
59+
| `_api_app/app/Shop/` | E-commerce plugin |
60+
| `_api_app/app/Plugins/` | Plugin system |
61+
| `_api_app/app/Configuration/` | App configuration classes |
62+
| `editor/src/` | Angular source (components, state, services) |
63+
| `engine/_classes/` | Legacy PHP classes for site rendering |
64+
| `engine/_lib/berta/` | CSS/JS assets bundled by Gulp |
65+
| `_themes/` | Site themes (capetown, jaipur, kyoto, madrid, etc.) |
66+
| `_templates/` | Email/system templates with SCSS |
67+
| `_plugin_shop/` | Shop plugin PHP files |
6568

6669
### State Management (Angular)
6770

INSTALL/includes/check.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ function getStatus($isOk, $message, $failDesc = '', $isIndented = false, $isFata
2525
$testOutput .= '<p><strong>Is your website hosted on a suitable server?</strong></p>';
2626

2727
// php version ...
28-
$isOk = version_compare(PHP_VERSION, '8.2', '>=');
28+
$isOk = version_compare(PHP_VERSION, '8.4', '>=');
2929
$listOk &= $isOk;
3030
$listHasErrors |= ! $isOk;
31-
$testOutput .= getStatus($isOk, 'Supported PHP version', 'Berta needs PHP >= 8.2 support on server. Ask your server administrator to enable supported PHP version.');
31+
$testOutput .= getStatus($isOk, 'Supported PHP version', 'Berta needs PHP >= 8.4 support on server. Ask your server administrator to enable supported PHP version.');
3232

3333
// multibyte ...
3434
$isOk = function_exists('mb_ereg_replace') && function_exists('mb_strlen') && function_exists('mb_substr');

INSTALL/includes/first_visit_serverreqs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<div class="xMAlign-inner">
6464
<h2>Thank you for choosing Berta.me!</h2>
6565
<p>This server does not meet Berta's requirements.<br />
66-
Berta needs PHP >= 8.2 support on server.</p>
66+
Berta needs PHP >= 8.4 support on server.</p>
6767
</div>
6868
</div>
6969
</div>

_api_app/.cursor/rules/laravel-boost.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for
1111
## Foundational Context
1212
This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions.
1313

14-
- php - 8.2.29
14+
- php - 8.4
1515
- laravel/framework (LARAVEL) - v12
1616
- laravel/prompts (PROMPTS) - v0
1717
- laravel/sanctum (SANCTUM) - v4

_api_app/.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for
88
## Foundational Context
99
This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions.
1010

11-
- php - 8.2.29
11+
- php - 8.4
1212
- laravel/framework (LARAVEL) - v12
1313
- laravel/prompts (PROMPTS) - v0
1414
- laravel/sanctum (SANCTUM) - v4

_api_app/.junie/guidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for
88
## Foundational Context
99
This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions.
1010

11-
- php - 8.2.29
11+
- php - 8.4
1212
- laravel/framework (LARAVEL) - v12
1313
- laravel/prompts (PROMPTS) - v0
1414
- laravel/sanctum (SANCTUM) - v4

_api_app/app/Http/Middleware/Authenticate.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ public function __construct(Auth $auth)
2323
/**
2424
* Handle an incoming request.
2525
*
26-
* @param string|null $guard
2726
* @return mixed
2827
*/
29-
public function handle(Request $request, Closure $next, $guard = null)
28+
public function handle(Request $request, Closure $next, ?string $guard = null)
3029
{
3130
$apiPrefix = config('app.api_prefix');
3231
$isAPIRequest = strpos($request->getRequestUri(), '/' . $apiPrefix) === 0;

_api_app/app/Sites/Sections/Entries/SectionEntriesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function galleryCrop(Request $request)
145145
/**
146146
* This method is entry rendering example
147147
*/
148-
public function renderEntries($site, $section, Request $request, $id = null)
148+
public function renderEntries(string $site, string $section, Request $request, ?string $id = null)
149149
{
150150
$sectionEntriesDS = new SectionEntriesDataService($site, $section);
151151
$siteSectionsDS = new SiteSectionsDataService($site);

_api_app/app/Sites/Sections/SectionsMenuRenderService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private function getViewData(
176176
];
177177
}
178178

179-
private function getUrl($section, $site, $sections, $siteSettings, $isEditMode, $isPreviewMode, $tag = null)
179+
private function getUrl($section, $site, $sections, $siteSettings, $isEditMode, $isPreviewMode, ?string $tag = null)
180180
{
181181
$urlParts = [];
182182
$isExternalLink = isset($section['@attributes']['type']) && $section['@attributes']['type'] == 'external_link';

0 commit comments

Comments
 (0)