Skip to content

Commit 582c871

Browse files
authored
Merge branch '3.x' into move-to-glide-3
2 parents 9b85c09 + 6be35d5 commit 582c871

46 files changed

Lines changed: 1713 additions & 774 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v6
1515

1616
- name: Checking for prtodo's.
1717
run: |
@@ -87,12 +87,12 @@ jobs:
8787

8888
steps:
8989
- name: Set timezone?
90-
uses: szenius/set-timezone@v1.0
90+
uses: szenius/set-timezone@v2.0
9191
with:
92-
timezoneLinux: "Europe/Paris"
92+
timezoneLinux: 'Europe/Paris'
9393

9494
- name: Checkout code
95-
uses: actions/checkout@v2
95+
uses: actions/checkout@v6
9696

9797
- name: Setup PHP
9898
uses: shivammathur/setup-php@v2
@@ -111,8 +111,8 @@ jobs:
111111
- name: Get Composer Cache Directory
112112
id: composer-cache
113113
run: |
114-
echo "::set-output name=dir::$(composer config cache-files-dir)"
115-
- uses: actions/cache@v4
114+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
115+
- uses: actions/cache@v5
116116
with:
117117
path: ${{ steps.composer-cache.outputs.dir }}
118118
key: ${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ matrix.dbal }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -125,9 +125,9 @@ jobs:
125125
composer install --prefer-dist --no-interaction --no-plugins
126126
127127
- name: Setup Node.js
128-
uses: actions/setup-node@v1
128+
uses: actions/setup-node@v6
129129
with:
130-
node-version: '20.x'
130+
node-version: '24.x'
131131

132132
- name: Build npm dependencies.
133133
run: |
@@ -139,7 +139,7 @@ jobs:
139139
CACHE_STORE: array
140140

141141
- name: Upgrade Chrome
142-
uses: browser-actions/setup-chrome@latest
142+
uses: browser-actions/setup-chrome@v2
143143

144144
- name: Upgrade Chrome Driver
145145
run: ./vendor/bin/testbench dusk:chrome-driver --detect
@@ -148,13 +148,17 @@ jobs:
148148
run: ./vendor/bin/testbench-dusk package:discover
149149

150150
- name: Execute all tests
151-
run: vendor/bin/phpunit --stop-on-error
151+
run: vendor/bin/paratest --testsuite Unit,Integration --stop-on-error && vendor/bin/phpunit --testsuite Browser --stop-on-error --no-coverage
152152
env:
153+
DB_HOST: 127.0.0.1
153154
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
155+
DB_PASSWORD: root
154156

155-
- uses: codecov/codecov-action@v2
157+
- uses: codecov/codecov-action@v6
156158
with:
157159
files: .github/clover.xml
160+
env:
161+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
158162

159163
- name: Replace asterisks in Laravel
160164
run: echo "REPLACED_LARAVEL=${MATRIX_LARAVEL//\*/_}" >> $GITHUB_ENV
@@ -168,7 +172,7 @@ jobs:
168172
MATRIX_DBAL: ${{ matrix.dbal }}
169173

170174
- name: Upload artifact
171-
uses: actions/upload-artifact@v4
175+
uses: actions/upload-artifact@v7
172176
with:
173177
name: screenshots-${{ matrix.os }}-${{ matrix.php }}-${{ env.REPLACED_LARAVEL }}-${{ env.REPLACED_DBAL }}
174178
path: |

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414

1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v6
1818
with:
1919
ref: 3.x
20-
20+
2121
- name: Setup Node.js
22-
uses: actions/setup-node@v3
22+
uses: actions/setup-node@v6
2323
with:
2424
node-version: '20'
2525
cache: 'npm'
@@ -40,15 +40,15 @@ jobs:
4040
id: bump_version
4141
run: |
4242
npm version ${{ github.event.inputs.version_bump_type }} --no-git-tag-version
43-
echo "::set-output name=new_version::$(node -p "require('./package.json').version")"
44-
43+
echo "new_version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
44+
4545
- name: Update version in PHP file
4646
run: |
4747
NEW_VERSION="${{ steps.bump_version.outputs.new_version }}"
4848
sed -i "s/\(public const VERSION = '\)[^']*\(';\)/\1${NEW_VERSION}\2/" src/TwillServiceProvider.php
4949
5050
- name: Create Pull Request
51-
uses: peter-evans/create-pull-request@v5
51+
uses: peter-evans/create-pull-request@v8
5252
with:
5353
token: ${{ secrets.GITHUB_TOKEN }}
5454
commit-message: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public/
1717
tests/coverage
1818
tests/storage
1919
.phpunit.result.cache
20+
.phpunit.cache/
2021
.php-cs-fixer.cache
2122
.env.local
2223
.env.*.local

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For PHP auto-formatting on save, you can use the [phpcsfixer](https://marketplac
5555
},
5656
```
5757

58-
For PHP contextual linting, you can use the [phpcs](https://marketplace.visualstudio.com/items?itemName=ikappas.phpcs) extension and then install [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) globally.
58+
For PHP contextual linting, you can use the [phpcs](https://marketplace.visualstudio.com/items?itemName=ikappas.phpcs) extension and then install [PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) globally.
5959

6060
```
6161
composer global require "squizlabs/php_codesniffer=*"

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"doctrine/dbal": "^3.0 || ^4.0",
3232
"guzzlehttp/guzzle": "^7.0",
3333
"imgix/imgix-php": "^3.0",
34-
"kalnoy/nestedset": "^6.0",
34+
"kalnoy/nestedset": "^6.0 <6.0.7",
3535
"laravel/framework": "^9.0 || ^10.0 || ^11.0 || ^12.0",
3636
"laravel/socialite": "^5.3",
3737
"laravel/ui": "^4.0",
@@ -46,6 +46,7 @@
4646
},
4747
"require-dev": {
4848
"area17/phptorch": "dev-main",
49+
"brianium/paratest": "^6.0 | ^7.0",
4950
"chillerlan/php-qrcode": "~4.0",
5051
"friendsofphp/php-cs-fixer": "^3.0",
5152
"larastan/larastan": "^2.9 | ^3.0",
@@ -74,12 +75,14 @@
7475
}
7576
},
7677
"scripts": {
77-
"test:phpunit": "vendor/bin/phpunit",
78+
"test:phpunit": "vendor/bin/paratest --testsuite Unit,Integration --stop-on-error --no-coverage",
79+
"test:browser": "vendor/bin/phpunit --testsuite Browser --stop-on-error --no-coverage",
7880
"test:analyse": "php -d memory_limit=-1 vendor/bin/phpstan analyse",
7981
"test:syntax": "vendor/bin/php-cs-fixer --dry-run fix src",
8082
"test": [
8183
"@test:syntax",
82-
"@test:phpunit"
84+
"@test:phpunit",
85+
"@test:browser"
8386
],
8487
"post-autoload-dump": [
8588
"@php ./vendor/bin/testbench package:discover --ansi"

docs/content/2_guides/1_page-builder-with-blade/2_installing-laravel.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ If you have any questions about a step, let us know on our Discord and we will t
99

1010
## Install Laravel
1111

12-
For the installation of Laravel, we will use some steps from the [official documentation](https://laravel.com/docs/10.x).
12+
For the installation of Laravel, we will use some steps from the [official documentation](https://laravel.com/docs/12.x).
1313

1414
The official documentation is a goldmine of knowledge, if you ever have trouble understanding a concept, make sure to
1515
check it out!
@@ -41,7 +41,11 @@ While you are there, make sure that `APP_URL` matches your local url. For exampl
4141

4242
`APP_URL=http://laravel-twill.test`
4343

44-
If you do not have MySQL setup, you can use [SQLite](https://laravel.com/docs/10.x#databases-and-migrations) as well.
44+
If you are using the default `php artisan serve` command, the url will be `http://127.0.0.1:8000`.
45+
46+
> If your `APP_URL` is set to `http://localhost`, you might experience issues with image cropping. Changing it to `http://127.0.0.1:8000` (or your local IP) should fix this.
47+
48+
If you do not have MySQL setup, you can use [SQLite](https://laravel.com/docs/12.x/installation#databases-and-migrations) as well.
4549

4650
As mentioned before, the Laravel documentation is far more extensive about the setup procedure, if this guide went too quick, make sure to give those a read.
4751

docs/content/2_guides/1_page-builder-with-blade/3_installing-twill.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Twill is a standard Laravel package, that means, we only have to require it (and
44

55
So, before we get to the process of building our CMS, let's install Twill.
66

7-
We can do this using `composer require area17/twill:"^3.4"`.
7+
We can do this using `composer require area17/twill:"^3.5"`.
88

99
This will install Twill 3 alongside all other required packages.
1010

@@ -63,6 +63,10 @@ As you can see from the output, it:
6363
- Publishes the assets
6464
- Prompts you to create a super admin
6565

66+
Finally, run the `storage:link` command to create the symbolic link for the storage directory:
67+
68+
`php artisan storage:link`
69+
6670
Once you have filled everything in, we can refresh our browser. We now see a proper login screen:
6771

6872
<!-- <div class="max-w-lg mx-auto"></div> -->

examples/basic-page-builder/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"devDependencies": {
88
"@tailwindcss/typography": "^0.5.7",
99
"autoprefixer": "^10.4.12",
10-
"axios": "^0.27",
11-
"laravel-vite-plugin": "^0.6.0",
10+
"axios": "^1.15.0",
11+
"laravel-vite-plugin": "^3.0.1",
1212
"lodash": "^4.17.19",
1313
"postcss": "^8.4.18",
1414
"tailwindcss": "^3.2.1",
15-
"vite": "^3.0.0"
15+
"vite": "^8.0.8"
1616
}
1717
}

examples/tests-browsers/resources/views/site/bio.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div>This is a bio</div>
22

33
<div>
4-
@if ($writer = $item->writer->first())
4+
@if ($writer = $item->writer)
55
Writer: {{ $writer->title }}
66
@else
77
No writer

0 commit comments

Comments
 (0)