Skip to content

Commit 019a135

Browse files
authored
Merge branch '3.x' into fix/2278
2 parents 0ad0510 + cc26b32 commit 019a135

File tree

140 files changed

+4052
-2748
lines changed

Some content is hidden

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

140 files changed

+4052
-2748
lines changed

.github/workflows/main.yml

+36-15
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: Install dependencies
4040
run: |
41-
composer require "laravel/framework:10.*" "doctrine/dbal:^3.0" --no-interaction --no-update
41+
composer require "laravel/framework:11.*" --no-interaction --no-update
4242
composer install
4343
4444
- name: Execute tests
@@ -48,7 +48,7 @@ jobs:
4848
run: vendor/bin/phpcs
4949

5050
test:
51-
name: PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }}
51+
name: PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }} - DBAL ${{ matrix.dbal }}
5252
timeout-minutes: 30
5353
runs-on: ${{ matrix.os }}
5454
services:
@@ -65,16 +65,21 @@ jobs:
6565
fail-fast: false
6666
matrix:
6767
os: [ubuntu-latest]
68-
php: [8.3, 8.2, 8.1, 8.0]
69-
laravel: [9.*, 10.*]
68+
php: [8.3, 8.2, 8.1]
69+
laravel: [10.*, 11.*]
70+
dbal: [3.*, 4.*]
7071
exclude:
7172
- laravel: 10.*
72-
php: 8.0
73+
dbal: 4.*
74+
- laravel: 11.*
75+
php: 8.1
76+
- laravel: 11.*
77+
dbal: 3.*
7378
include:
74-
- laravel: 9.*
75-
testbench: 7.*
7679
- laravel: 10.*
7780
testbench: 8.*
81+
- laravel: 11.*
82+
testbench: 9.*
7883

7984
steps:
8085
- name: Set timezone?
@@ -106,19 +111,19 @@ jobs:
106111
- uses: actions/cache@v2
107112
with:
108113
path: ${{ steps.composer-cache.outputs.dir }}
109-
key: ${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
114+
key: ${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ matrix.dbal }}-composer-${{ hashFiles('**/composer.lock') }}
110115
restore-keys: |
111-
${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-composer-
116+
${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ matrix.dbal }}-composer-
112117
113118
- name: Install dependencies
114119
run: |
115-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "doctrine/dbal:^3.0" --no-interaction --no-update
120+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "doctrine/dbal:${{ matrix.dbal }}" --no-interaction --no-update
116121
composer install --prefer-dist --no-interaction --no-plugins
117122
118123
- name: Setup Node.js
119124
uses: actions/setup-node@v1
120125
with:
121-
node-version: '18.x'
126+
node-version: '20.x'
122127

123128
- name: Build npm dependencies.
124129
run: |
@@ -130,26 +135,42 @@ jobs:
130135
131136
- name: Build twill.
132137
run: ./vendor/bin/testbench twill:build --forTesting
138+
env:
139+
CACHE_STORE: array
133140

134141
- name: Upgrade Chrome
135142
uses: browser-actions/setup-chrome@latest
136143

137144
- name: Upgrade Chrome Driver
138145
run: ./vendor/bin/testbench dusk:chrome-driver --detect
139146

147+
- name: Prepare Testbench Dusk
148+
run: ./vendor/bin/testbench-dusk package:discover
149+
140150
- name: Execute all tests
141-
run: vendor/bin/phpunit
151+
run: vendor/bin/phpunit --stop-on-error
142152
env:
143153
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
144154

145155
- uses: codecov/codecov-action@v2
146156
with:
147157
files: .github/clover.xml
148158

149-
- uses: actions/upload-artifact@v2
150-
if: always()
159+
- name: Replace asterisks in Laravel
160+
run: echo "REPLACED_LARAVEL=${MATRIX_LARAVEL//\*/_}" >> $GITHUB_ENV
161+
env:
162+
MATRIX_LARAVEL: ${{ matrix.laravel }}
163+
164+
- name: Replace asterisks in DBAL
165+
id: replace_dbal
166+
run: echo "REPLACED_DBAL=${MATRIX_DBAL//\*/_}" >> $GITHUB_ENV
167+
env:
168+
MATRIX_DBAL: ${{ matrix.dbal }}
169+
170+
- name: Upload artifact
171+
uses: actions/upload-artifact@v4
151172
with:
152-
name: screenshots
173+
name: screenshots-${{ matrix.os }}-${{ matrix.php }}-${{ env.REPLACED_LARAVEL }}-${{ env.REPLACED_DBAL }}
153174
path: |
154175
tests/Browser/screenshots/
155176
tests/Browser/console/

CHANGELOG.md

+59
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,65 @@
22

33
All notable changes to `twill` will be documented in this file.
44

5+
## 3.3.1
6+
7+
### Fixed
8+
- Fix dbal 4 conflict by [@ifox](https://github.com/ifox) in https://github.com/area17/twill/pull/2596
9+
10+
## 3.3.0
11+
12+
### Added
13+
14+
- Laravel 11 support by [@ifox](https://github.com/ifox) in https://github.com/area17/twill/pull/2473
15+
- Add support for `medias` fields in JSON repeaters by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2554
16+
- Add support for multiple JSON repeaters (of the same type) in one form by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2517
17+
- Add support for nested module on the dashboard by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2547
18+
- Add `connectedTo` for inline repeater and documentation about `connectedTo` by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2565
19+
- Add error reporting to block rendering by [@AidasK](https://github.com/AidasK) in https://github.com/area17/twill/pull/2580
20+
- Allow `buttonAsLink` option on inline repeaters by [@danieldevine](https://github.com/danieldevine) in https://github.com/area17/twill/pull/2522
21+
- Allow singular capsules on navigation by [@antonioribeiro](https://github.com/antonioribeiro) in https://github.com/area17/twill/pull/2572
22+
23+
### Fixed
24+
25+
- Tags in media library are not refreshed while updating & browsing images by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2523
26+
- Clicking cancel in the block editor deletes all the unsaved blocks by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2578
27+
- Allow single deletion in form builder inline repeater by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2504
28+
- Allow deleting media after records bulk destroy by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2519
29+
- Allow case-insensitive search for translated models for postgres by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2528
30+
- 404 error when restoring revision in nested modules by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2541
31+
- Fix alt text stripping accents and single quotes by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2514
32+
- Changing twill user password in admin to use the laravel algo by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2582
33+
- Undefined variable $formBuilder error when extending form layout in custom pages by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2577
34+
- Error with time-picker when `allowInput` is true by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2576
35+
- Don't delete and recreate existing `mediables` and `fileables` by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2567
36+
- Make `twillTrans` exportable so it can be used in config by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2563
37+
- Table builder `Browser` column overrides parent module field by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2506
38+
- Disable heading extension if it's not in the Tiptap toolbar by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2511
39+
- Relation field of datatable does not allow sorting by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2526
40+
- Default login redirect to admin url by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2569
41+
- Different datetime parsing for publish date on listing and edit screen by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2510
42+
- Fix created at is null in slug table by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2588
43+
44+
### Docs
45+
46+
- Fix typo by [@k-msalehi](https://github.com/k-msalehi) in https://github.com/area17/twill/pull/2564
47+
- Change `admin.` route to `twill.` by [@LucaRed](https://github.com/LucaRed) in https://github.com/area17/twill/pull/2585
48+
- Prettify instructions and add the capsules>list array keys to improve DX by [@antonioribeiro](https://github.com/antonioribeiro) in https://github.com/area17/twill/pull/2527
49+
- Update twill version during installation by [@Mavv3006](https://github.com/Mavv3006) in https://github.com/area17/twill/pull/2584
50+
51+
### Chores
52+
53+
- Refactor form services to avoid repeating code by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2553
54+
- Bump express from 4.18.2 to 4.19.2 by [@dependabot](https://github.com/dependabot) in https://github.com/area17/twill/pull/2560
55+
- Bump webpack-dev-middleware from 5.3.3 to 5.3.4 by [@dependabot](https://github.com/dependabot) in https://github.com/area17/twill/pull/2556
56+
- Bump follow-redirects from 1.15.5 to 1.15.6 by [@dependabot](https://github.com/dependabot) in https://github.com/area17/twill/pull/2545
57+
58+
## 3.2.1
59+
60+
### Fixed
61+
- Fix datatable and buckets filters error caused by Axios breaking changes in 0.28.0 by @zeezo887 in https://github.com/area17/twill/pull/2520
62+
63+
564
## 3.2.0
665

766
### Added

UPGRADE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ If you are relying on Quill.js specifics (like css classes), use `'type' => 'qui
5252
Previously `withVideo` was true by default, if you relied on this you have to update these media fields to
5353
`'withVideo' => true`.
5454

55-
#### SVG's are now no longer passing thorough glide
55+
#### SVG's are now no longer passing through glide
5656

5757
These are now rendered directly, you can change this by updating config `twill.glide.original_media_for_extensions` to an empty array `[]`
5858

composer.json

+13-14
Original file line numberDiff line numberDiff line change
@@ -27,38 +27,37 @@
2727
"ext-json": "*",
2828
"ext-pdo": "*",
2929
"astrotomic/laravel-translatable": "^v11.12",
30-
"cartalyst/tags": "^12.0|^13.0",
31-
"doctrine/dbal": "^3.0",
30+
"cartalyst/tags": "^12.0 || ^13.0 || ^14.0",
31+
"doctrine/dbal": "^3.0 || ^4.0",
3232
"guzzlehttp/guzzle": "^7.0",
3333
"imgix/imgix-php": "^3.0",
3434
"kalnoy/nestedset": "^6.0",
35-
"laravel/framework": "^9.0|^10.0",
35+
"laravel/framework": "^9.0 || ^10.0 || ^11.0",
3636
"laravel/socialite": "^5.3",
3737
"laravel/ui": "^4.0",
3838
"league/flysystem-aws-s3-v3": "^3.0",
39-
"league/glide-laravel": "^1.0",
39+
"league/glide-symfony": "^1.0 || ^2.0",
4040
"matthewbdaly/laravel-azure-storage": "^2.0",
4141
"myclabs/php-enum": "^1.5",
4242
"pragmarx/google2fa-qrcode": "^2.0",
4343
"spatie/laravel-activitylog": "^4.0",
44-
"spatie/laravel-analytics": "^4.0|^5.0",
44+
"spatie/laravel-analytics": "^4.0 || ^5.0",
4545
"spatie/once": "^3.0"
4646
},
4747
"require-dev": {
4848
"area17/phptorch": "dev-main",
4949
"chillerlan/php-qrcode": "~4.0",
5050
"friendsofphp/php-cs-fixer": "^3.0",
5151
"nette/php-generator": "^4.0.3",
52-
"nunomaduro/collision": "^6.0|^7.0|^8.0",
52+
"nunomaduro/collision": "^6.0 || ^7.0 || ^8.0",
5353
"nunomaduro/larastan": "^2.0",
54-
"orchestra/testbench": "^7.8|^8.0",
55-
"orchestra/testbench-dusk": "^7.8|^8.0",
56-
"phpunit/php-invoker": "^3.1",
57-
"phpunit/phpunit": "~9.0",
58-
"rector/rector": "^0.12.15",
54+
"orchestra/testbench": "^7.8 || ^8.0 || ^9.0",
55+
"orchestra/testbench-dusk": "^7.8 || ^8.0 || ^9.0",
56+
"phpunit/php-invoker": "^3.1 || ^4.0",
57+
"phpunit/phpunit": "~9.0 || ~10.0",
58+
"rector/rector": "^0.19.2 || ^1.0 ",
5959
"spatie/invade": "^1.1",
60-
"squizlabs/php_codesniffer": "*",
61-
"torchlight/torchlight-commonmark": "^0.5"
60+
"squizlabs/php_codesniffer": "*"
6261
},
6362
"autoload": {
6463
"psr-4": {
@@ -71,7 +70,7 @@
7170
"A17\\Twill\\Tests\\Integration\\": "tests/integration",
7271
"A17\\Twill\\Tests\\Browser\\": "tests/Browser",
7372
"A17\\Docs\\": "docs/generator",
74-
"App\\": "vendor/orchestra/testbench-core/laravel/app"
73+
"App\\": "vendor/orchestra/testbench-dusk/laravel/app"
7574
}
7675
},
7776
"scripts": {

config/twill.php

+10-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
/*
2727
|--------------------------------------------------------------------------
28-
| Application strict url handeling
28+
| Application strict url handling
2929
|--------------------------------------------------------------------------
3030
|
3131
| Setting this value to true will enable strict domain handling.
@@ -172,7 +172,7 @@
172172
|--------------------------------------------------------------------------
173173
|
174174
*/
175-
'auth_login_redirect_path' => '/',
175+
'auth_login_redirect_path' => null,
176176

177177
'templates_on_frontend_domain' => false,
178178

@@ -282,6 +282,14 @@
282282
*/
283283
'debug' => env('APP_DEBUG', false),
284284

285+
/*
286+
|--------------------------------------------------------------------------
287+
| This parameter will throw errors if some error occurs instead of failing
288+
| silently (eg. when rendering blocks)
289+
|--------------------------------------------------------------------------
290+
*/
291+
'strict' => env('TWILL_STRICT', false),
292+
285293
/*
286294
|--------------------------------------------------------------------------
287295
| Base classes for automatic generation of Modules and Capsules

docs/content/1_docs/2_getting-started/2_installation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The starter kit setup is a basic page builder. It comes with:
2121
You can install it in a Laravel application using:
2222

2323
```bash
24-
composer require area17/twill:"^3.0"
24+
composer require area17/twill:"^3.2"
2525
```
2626

2727
:::alert=type.warning:::
@@ -40,7 +40,7 @@ See [`examples/basic-page-builder`](https://github.com/area17/twill/tree/3.x/exa
4040
Twill package can be added to your application using Composer:
4141

4242
```bash
43-
composer require area17/twill:"^3.0"
43+
composer require area17/twill:"^3.2"
4444
```
4545

4646
:::alert=type.warning:::

docs/content/1_docs/2_getting-started/3_configuration.md

-25
Original file line numberDiff line numberDiff line change
@@ -79,31 +79,6 @@ return [
7979
];
8080
```
8181

82-
Twill registers its own exception handler in all controllers. If you need to customize it (to report errors on a 3rd party service like Sentry or Rollbar for example), you can opt-out from it in your `config/twill.php` file:
83-
84-
```php
85-
<?php
86-
87-
return [
88-
'bind_exception_handler' => false,
89-
];
90-
```
91-
92-
And then extend it from your own `app/Exceptions/Handler.php` class:
93-
94-
```php
95-
<?php
96-
97-
namespace App\Exceptions;
98-
99-
use A17\Twill\Exceptions\Handler as ExceptionHandler;
100-
use Exception;
101-
use Illuminate\Auth\AuthenticationException;
102-
103-
class Handler extends ExceptionHandler
104-
...
105-
```
106-
10782
If you would like to provide custom tables names, use the following configuration options:
10883

10984
```php

docs/content/1_docs/3_modules/5_controllers.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Below is a list of the methods and their purpose:
6363
- **setModuleName**('`yourModuleName`'): Set the name of the module you are working with.
6464
- **setFeatureField**('`fieldname`'): Set the field to use for featuring content.
6565
- **setSearchColumns**(`['title', 'year']`): Set the columns to search in.
66+
- **setSearchQuery**(`
67+
fn (Builder $q, string $search) => $q->orWhereHas('profile', fn (Builder $q) => $q->where('first_name', 'like', "$search%")->orWhere('last_name', 'like', "$search%"))`): For finer controller over the search
6668
- **setPermalinkBase**('`example`'): The static permalink base to your module. Defaults to `setModuleName` when empty.
6769
- **setTitleColumnKey**('`title`'): Sets the field to use as title, defaults to `title`.
6870
- **setModelName**('`Project`'): Usually not required, but in case customization is needed you can use this method to set
@@ -240,4 +242,3 @@ protected function formData($request)
240242
return [];
241243
}
242244
```
243-

0 commit comments

Comments
 (0)