Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
8480334
Laravel 10 changes
wverhoogt Apr 3, 2024
b56be78
update composer for laravel-11
mjauvin Apr 3, 2024
a506d96
update to laravel 11 in modules composer.json files
mjauvin Apr 3, 2024
18cd000
add temporary alias to fix PHPUnit class naming
mjauvin Apr 3, 2024
1b3bae8
update test php versions
mjauvin Apr 4, 2024
51c97a3
update library versions temporarily
mjauvin Apr 4, 2024
83660ff
adjust test for Laravel 11 changes
mjauvin Apr 4, 2024
c79f260
remove minimum-stability from composer.json and add config.hashing.re…
mjauvin Apr 4, 2024
2d8795d
add phpunit; update dms/phpunit-arraysubset-asserts version
mjauvin Apr 15, 2024
726825d
migrate phpunit.xml files
mjauvin Apr 15, 2024
23770c9
dependency test
mjauvin Apr 15, 2024
66778f7
revert to wip-laravel-11 branch for now
mjauvin Apr 15, 2024
b5ecc38
add SQLite minimum requirement to winter:install
mjauvin Apr 16, 2024
13e5120
use version_compare() method
mjauvin Apr 16, 2024
9fa1cf1
remove phpunit alias; fix deprecation warnings in tests
mjauvin Apr 16, 2024
f098458
test library switcher
mjauvin Apr 16, 2024
d46c368
Revert "test library switcher"
mjauvin Apr 16, 2024
f943343
verify SQLite db version requirement in UpdateManager::update()
mjauvin Apr 16, 2024
924d57e
force twig version 3.8.x until we fix the issue introduced in 3.9.x
mjauvin Apr 16, 2024
2953731
expand tabs
mjauvin Apr 16, 2024
eb2dc00
Merge branch 'develop' into wip-laravel-11
mjauvin May 14, 2024
4076d17
Merge branch 'develop' into wip-laravel-11
mjauvin Jul 3, 2024
8c38ed7
Merge branch 'develop' into wip-laravel-11
mjauvin Jul 3, 2024
4ba55dc
use latest 3.x twig
mjauvin Sep 15, 2024
e099f7f
remove twig dependency, already in storm
mjauvin Sep 15, 2024
e9b4a0a
Merge branch 'develop' into wip-laravel-11
jaxwilko Sep 20, 2024
ea440b8
Merge branch 'develop' into wip-laravel-11
LukeTowers Sep 26, 2024
c6e1209
Merge branch 'develop' into wip-laravel-11
mjauvin Oct 5, 2024
de72b46
Merge branch 'develop' into merge-develop
mjauvin Oct 21, 2024
059c4c5
Merge branch 'develop' into wip-laravel-11
mjauvin Nov 13, 2024
98a1530
Merge branch 'develop' into wip-laravel-11
LukeTowers Mar 10, 2025
ca882b4
Merge branch 'wip/1.3' into wip-laravel-11
LukeTowers Jun 12, 2025
471f73d
Merge pull request #1094 from wintercms/wip-laravel-11
LukeTowers Jun 12, 2025
285cc1f
Fix branch name
Jul 20, 2025
6628fae
Merge branch 'develop' into wip/1.3
LukeTowers Jul 20, 2025
a0077f6
Fix support for symfony/console 7.2+ by removing our definition for t…
LukeTowers Jul 20, 2025
24661f8
Remove unused import
LukeTowers Jul 20, 2025
6cb6aaf
Target Laravel 12
LukeTowers Jul 21, 2025
b4d7642
Use WIP testing dependencies for now
LukeTowers Jul 21, 2025
b5ff66c
Merge branch 'develop' into wip/1.3
LukeTowers Jul 24, 2025
909dced
Use composer token in actions
LukeTowers Jul 24, 2025
88d294e
Fixes to tests
LukeTowers Jul 24, 2025
e07cdc1
More PHPUnit fixes
LukeTowers Jul 24, 2025
7c92f36
Merge branch 'develop' into wip/1.3
LukeTowers Jul 24, 2025
16b668d
Apply Github token through Setup PHP action, change concurrency settings
bennothommo Jul 24, 2025
ec09b56
Although documented, the "github-token" doesn't exist yet. Cleanup.
bennothommo Jul 24, 2025
4ac01e8
Fix issue caused by symfony polluting the environment
LukeTowers Jul 25, 2025
6fcddee
Ensure parent tearDown is called
LukeTowers Jul 25, 2025
3da0830
Fix CMS ComponentManagerTest
LukeTowers Jul 25, 2025
2912048
Code style fixes
LukeTowers Jul 25, 2025
626a4dd
Use PHP 8.4 for devcontainer
bennothommo Jul 26, 2025
c41c070
Fix tests
LukeTowers Jul 26, 2025
030837d
Merge branch 'wip/1.3' of https://github.com/wintercms/winter into wi…
LukeTowers Jul 26, 2025
c4cc026
Update .github/workflows/tests.yml
LukeTowers Jul 26, 2025
2a61061
Remove support for PHPUnit < 11
LukeTowers Jul 26, 2025
c63ed88
Merge branch 'wip/1.3' of https://github.com/wintercms/winter into wi…
LukeTowers Jul 26, 2025
8093c30
L12 changes to config/app.php
LukeTowers Jul 28, 2025
7513797
Support testing all plugins or all modules
LukeTowers Jul 28, 2025
64c1a41
use Arr::first method directly
mjauvin Sep 9, 2025
497d518
remove useless callback
mjauvin Sep 9, 2025
8a28edf
Merge branch 'develop' into wip/1.3
LukeTowers Oct 15, 2025
83ff1cb
Delete .devcontainer/Dockerfile
LukeTowers Oct 15, 2025
63f2a3e
Merge branch 'develop' into wip/1.3
LukeTowers Nov 19, 2025
58057d0
Allow running winter:test with no options
LukeTowers Nov 19, 2025
01e2052
Add env calls to app.locale, fallback_locale, faker_locale (#1434)
damsfx Jan 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,16 @@ jobs:
name: Update manifest
runs-on: ubuntu-latest
env:
phpVersion: "8.4"
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
key: winter-cms-cache-develop
GITHUB_TOKEN: ${{ secrets.COMPOSER_GITHUB_TOKEN }}
steps:
- name: Checkout changes
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.phpVersion }}
extensions: ${{ env.extensions }}
php-version: 8.4
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip

- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-scripts
Expand Down
82 changes: 11 additions & 71 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,59 +21,30 @@ jobs:
runs-on: ${{ matrix.operatingSystem }}
name: ${{ matrix.operatingSystem }} / JavaScript
env:
nodeVersion: 16
phpVersion: '8.2'
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
key: winter-cms-cache-develop
GITHUB_TOKEN: ${{ secrets.COMPOSER_GITHUB_TOKEN }}
steps:
- name: Checkout changes
uses: actions/checkout@v3

- name: Setup extension cache
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ env.phpVersion }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v3
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.phpVersion }}
extensions: ${{ env.extensions }}
php-version: 8.2
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip

- name: Install Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.nodeVersion }}
node-version: 16

- name: Switch library dependency (develop)
if: github.ref == 'refs/heads/develop' || github.base_ref == 'develop'
run: php ./.github/workflows/utilities/library-switcher "dev-develop as 1.2"
run: php ./.github/workflows/utilities/library-switcher "dev-wip/1.3 as 1.3"

- name: Switch library dependency (1.2)
if: github.head_ref == '1.2' || github.ref == 'refs/heads/1.2' || github.base_ref == '1.2'
run: php ./.github/workflows/utilities/library-switcher "1.2.x-dev as 1.2"

- name: Setup dependency cache
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-scripts

Expand All @@ -95,41 +66,25 @@ jobs:
max-parallel: 8
matrix:
operatingSystem: [ubuntu-latest, windows-latest]
phpVersion: ['8.1', '8.2', '8.3', '8.4']
phpVersion: ['8.2', '8.3', '8.4']
fail-fast: false
runs-on: ${{ matrix.operatingSystem }}
name: ${{ matrix.operatingSystem }} / PHP ${{ matrix.phpVersion }}
env:
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
key: winter-cms-cache-develop
GITHUB_TOKEN: ${{ secrets.COMPOSER_GITHUB_TOKEN }}
steps:
- name: Checkout changes
uses: actions/checkout@v3

- name: Setup extension cache
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.phpVersion }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v3
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.phpVersion }}
extensions: ${{ env.extensions }}
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip

- name: Switch library dependency (develop)
if: github.ref == 'refs/heads/develop' || github.base_ref == 'develop'
run: php ./.github/workflows/utilities/library-switcher "dev-develop as 1.2"
run: php ./.github/workflows/utilities/library-switcher "dev-wip/1.3 as 1.3"

- name: Switch library dependency (1.0)
if: github.head_ref == '1.0' || github.ref == 'refs/heads/1.0' || github.base_ref == '1.0'
Expand All @@ -143,17 +98,6 @@ jobs:
if: github.head_ref == '1.2' || github.ref == 'refs/heads/1.2' || github.base_ref == '1.2'
run: php ./.github/workflows/utilities/library-switcher "1.2.x-dev as 1.2"

- name: Setup dependency cache
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-scripts

Expand All @@ -165,10 +109,6 @@ jobs:
- name: Run post-update Composer scripts
run: php artisan package:discover

- name: Setup problem matchers for PHPUnit
if: matrix.phpVersion == '8.1'
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Run Linting and Tests
run: |
composer lint
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ composer.lock
selenium.php
/bootstrap/compiled.php
.phpunit.result.cache
.phpunit.cache

# Hosting ignores
php_errors.log
Expand All @@ -26,6 +27,7 @@ nbproject
.vscode
!.devcontainer/.vscode
_ide_helper.php
*.code-workspace

# Other ignores
.DS_Store
Expand Down
23 changes: 14 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,28 @@
"source": "https://github.com/wintercms/winter"
},
"require": {
"php": ">=8.1",
"winter/storm": "dev-develop as 1.2",
"winter/wn-system-module": "dev-develop",
"winter/wn-backend-module": "dev-develop",
"winter/wn-cms-module": "dev-develop",
"laravel/framework": "^9.1",
"php": "^8.2",
"winter/storm": "dev-wip/1.3 as 1.3",
"winter/wn-system-module": "dev-wip/1.3",
"winter/wn-backend-module": "dev-wip/1.3",
"winter/wn-cms-module": "dev-wip/1.3",
"laravel/framework": "^12.0",
"wikimedia/composer-merge-plugin": "~2.1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5.8",
"phpunit/phpunit": "^11.0",
"mockery/mockery": "^1.4.4",
"fakerphp/faker": "^1.9.2",
"squizlabs/php_codesniffer": "^3.2",
"php-parallel-lint/php-parallel-lint": "^1.0",
"dms/phpunit-arraysubset-asserts": "^0.1.0|^0.2.1"
"dms/phpunit-arraysubset-asserts": "dev-add-phpunit-11-support"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/pieterocp/phpunit-arraysubset-asserts"
}
],
"scripts": {
"post-create-project-cmd": [
"@php artisan winter:install",
Expand All @@ -65,7 +71,6 @@
"phpcs --colors -nq --report=\"full\" --extensions=\"php\""
]
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"merge-plugin": {
Expand Down
59 changes: 39 additions & 20 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@

return [

/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/

'name' => env('APP_NAME', 'Winter CMS'),

/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
|
*/

'env' => env('APP_ENV', 'production'),

/*
|--------------------------------------------------------------------------
| Application Debug Mode
Expand All @@ -20,20 +46,7 @@
|
*/

'debug' => env('APP_DEBUG', true),

/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/

'name' => env('APP_NAME', 'Winter CMS'),
'debug' => (bool) env('APP_DEBUG', true),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify the default debug value in production.

Casting to boolean is correct, but the default value is true. In production environments, this should typically default to false to avoid exposing sensitive information. Consider if the default should be false instead of true for security best practices.


🌐 Web query:

What is the recommended default value for APP_DEBUG in Laravel 12 production environments?

💡 Result:

Set APP_DEBUG to false in production — e.g. APP_DEBUG=false. [1][2]

Sources:
[1] Laravel 12.x Configuration (Debug Mode).
[2] Laravel config example: 'debug' => env('APP_DEBUG', false).


Default APP_DEBUG to false in production
In config/app.php (line 49), change to:

'debug' => (bool) env('APP_DEBUG', false),

to prevent exposing sensitive information.

🤖 Prompt for AI Agents
In config/app.php around line 49, the APP_DEBUG default is currently true which
can leak sensitive info in production; change the env default to false by
updating the 'debug' line to use env('APP_DEBUG', false) so the application
defaults to non-debug mode unless explicitly enabled via environment.


/*
|--------------------------------------------------------------------------
Expand All @@ -42,7 +55,7 @@
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
| the application so that it's available within Artisan commands.
|
*/

Expand Down Expand Up @@ -183,7 +196,6 @@
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
|
| -------- STOP! --------
| Before you change this value, consider carefully if that is actually
| what you want to do. It is HIGHLY recommended that this is always set
Expand Down Expand Up @@ -225,7 +237,7 @@
|
*/

'locale' => 'en',
'locale' => env('APP_LOCALE', 'en'),

/*
|--------------------------------------------------------------------------
Expand All @@ -238,7 +250,7 @@
|
*/

'fallback_locale' => 'en',
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),

/*
|--------------------------------------------------------------------------
Expand All @@ -251,7 +263,7 @@
|
*/

'faker_locale' => 'en_US',
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),

/*
|--------------------------------------------------------------------------
Expand All @@ -264,9 +276,16 @@
|
*/

'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',

'key' => env('APP_KEY'),

'previous_keys' => [
...array_filter(
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
),
],

/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
Expand Down
13 changes: 13 additions & 0 deletions config/hashing.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,17 @@
'threads' => 1,
'time' => 4,
],

/*
|--------------------------------------------------------------------------
| Password Rehashing
|--------------------------------------------------------------------------
|
| Laravel 11 will automatically rehash your user's passwords during
| authentication if your hashing algorithm's "work factor" has been updated
| since the password was last hashed.
|
*/

'rehash_on_login' => false,
];
4 changes: 2 additions & 2 deletions modules/backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
}
],
"require": {
"php": ">=8.1",
"php": "^8.2",
"composer/installers": "~1.11.0",
"laravel/framework": "^9.1"
"laravel/framework": "^12.0"
},
"replace": {
"october/backend": "1.1.*"
Expand Down
7 changes: 3 additions & 4 deletions modules/backend/controllers/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
use Backend\Classes\Controller;
use Backend\Widgets\ReportContainer;

use Winter\Storm\Support\Arr;

/**
* Dashboard controller
*
Expand Down Expand Up @@ -72,10 +74,7 @@ protected function initReportContainer()
protected function checkPermissionRedirect()
{
if (!$this->user->hasAccess('backend.access_dashboard')) {
$true = function () {
return true;
};
if ($first = array_first(BackendMenu::listMainMenuItems(), $true)) {
if ($first = Arr::first(BackendMenu::listMainMenuItems())) {
return Redirect::intended($first->url);
}
return Backend::redirect('backend/users/myaccount');
Expand Down
Loading