Skip to content

Commit dd5369b

Browse files
authored
Merge branch '3.x' into feat/exclude-callback
2 parents 1b0481f + cc26b32 commit dd5369b

File tree

98 files changed

+3428
-2481
lines changed

Some content is hidden

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

98 files changed

+3428
-2481
lines changed

.github/workflows/main.yml

Lines changed: 26 additions & 30 deletions
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,18 +65,17 @@ 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.*, 11.*]
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-
- laravel: 11.*
74-
php: 8.0
73+
dbal: 4.*
7574
- laravel: 11.*
7675
php: 8.1
76+
- laravel: 11.*
77+
dbal: 3.*
7778
include:
78-
- laravel: 9.*
79-
testbench: 7.*
8079
- laravel: 10.*
8180
testbench: 8.*
8281
- laravel: 11.*
@@ -112,28 +111,19 @@ jobs:
112111
- uses: actions/cache@v2
113112
with:
114113
path: ${{ steps.composer-cache.outputs.dir }}
115-
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') }}
116115
restore-keys: |
117-
${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-composer-
116+
${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ matrix.dbal }}-composer-
118117
119118
- name: Install dependencies
120119
run: |
121-
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
122121
composer install --prefer-dist --no-interaction --no-plugins
123122
124-
- name: Patch TestCase files for PHP < 8.1
125-
run: |
126-
if php -r 'exit(version_compare(PHP_VERSION, "8.1.0", "<") ? 0 : 1);'; then
127-
for file in tests/integration/TestCase.php tests/Browser/BrowserTestCase.php; do
128-
sed -i 's/protected function onNotSuccessfulTest(Throwable \$t): never/protected function onNotSuccessfulTest(Throwable \$t): void/' "$file";
129-
echo "Patched $file for PHP < 8.1";
130-
done
131-
fi
132-
133123
- name: Setup Node.js
134124
uses: actions/setup-node@v1
135125
with:
136-
node-version: '18.x'
126+
node-version: '20.x'
137127

138128
- name: Build npm dependencies.
139129
run: |
@@ -157,11 +147,6 @@ jobs:
157147
- name: Prepare Testbench Dusk
158148
run: ./vendor/bin/testbench-dusk package:discover
159149

160-
- name: Set PHPUnit config for Laravel 9
161-
if: matrix.laravel == '9.*'
162-
run: |
163-
cp phpunit-legacy.xml phpunit.xml
164-
165150
- name: Execute all tests
166151
run: vendor/bin/phpunit --stop-on-error
167152
env:
@@ -171,10 +156,21 @@ jobs:
171156
with:
172157
files: .github/clover.xml
173158

174-
- uses: actions/upload-artifact@v2
175-
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
176172
with:
177-
name: screenshots
173+
name: screenshots-${{ matrix.os }}-${{ matrix.php }}-${{ env.REPLACED_LARAVEL }}-${{ env.REPLACED_DBAL }}
178174
path: |
179175
tests/Browser/screenshots/
180176
tests/Browser/console/

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,59 @@
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+
558
## 3.2.1
659

760
### Fixed

UPGRADE.md

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"ext-pdo": "*",
2929
"astrotomic/laravel-translatable": "^v11.12",
3030
"cartalyst/tags": "^12.0 || ^13.0 || ^14.0",
31-
"doctrine/dbal": "^3.0",
31+
"doctrine/dbal": "^3.0 || ^4.0",
3232
"guzzlehttp/guzzle": "^7.0",
3333
"imgix/imgix-php": "^3.0",
3434
"kalnoy/nestedset": "^6.0",

config/twill.php

Lines changed: 1 addition & 1 deletion
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.

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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 0 additions & 25 deletions
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

Lines changed: 2 additions & 1 deletion
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-

docs/content/1_docs/6_relations/03_one-to-many.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ One to Many is one of the simpler relations to set up so let's get started:
1414

1515
As with any relation we need to set up a database. In this example we are using our portfolio example where we will have multiple links on a project.
1616

17-
We will set up 2 models, one is a Project model, you can do this using `php artisan twill:module Project`
17+
We will set up 2 models, one is a Project model, you can do this using `php artisan twill:make:module Project`
1818

19-
And afterwards a Link model: `php artisan twill:module Link`, As the Link model is used for our hasMany, we do not have to add it to the routes or navigation files, so you can ignore that suggestion.
19+
And afterwards a Link model: `php artisan twill:make:module Link`, As the Link model is used for our hasMany, we do not have to add it to the routes or navigation files, so you can ignore that suggestion.
2020

2121
In the **Link** migration we add a column to hold the `project_id` that we are creating it from.
2222

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

Lines changed: 1 addition & 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.0"`.
7+
We can do this using `composer require area17/twill:"^3.2"`.
88

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

0 commit comments

Comments
 (0)