Skip to content

Commit 4fe16a0

Browse files
authored
Merge branch 'area17:3.x' into 3.x
2 parents 816709a + 90da826 commit 4fe16a0

File tree

1,338 files changed

+65367
-57686
lines changed

Some content is hidden

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

1,338 files changed

+65367
-57686
lines changed

Diff for: .browserslistrc

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
> 1%
2-
last 2 versions
3-
not IE 11
1+
defaults

Diff for: .eslintrc.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ module.exports = {
55
},
66
extends: ['plugin:vue/essential', '@vue/standard', 'prettier'],
77
rules: {
8+
'no-unmodified-loop-condition': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
9+
'no-unused-vars': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
10+
'no-unreachable': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
811
// indent
912
indent: ['error', 2, { SwitchCase: 1 }],
1013
'vue/script-indent': [
11-
'error',
14+
process.env.NODE_ENV === 'production' ? 'error' : 'warn',
1215
2,
1316
{
1417
baseIndent: 1,
@@ -27,15 +30,15 @@ module.exports = {
2730
'no-console':
2831
process.env.NODE_ENV === 'production'
2932
? ['error', { allow: ['error'] }]
30-
: 'off'
33+
: 'warn'
3134
},
3235
overrides: [
3336
{
3437
files: ['*.vue'],
3538
rules: {
3639
indent: 'off',
3740
'vue/script-indent': [
38-
'error',
41+
process.env.NODE_ENV === 'production' ? 'error' : 'warn',
3942
2,
4043
{
4144
baseIndent: 1,
@@ -46,6 +49,6 @@ module.exports = {
4649
}
4750
],
4851
parserOptions: {
49-
parser: 'babel-eslint'
52+
parser: '@babel/eslint-parser'
5053
}
5154
}

Diff for: .gitattributes

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/tests export-ignore
2+
/phpunit.xml export-ignore
3+
/.github export-ignore
4+
/phpstan.neon export-ignore
5+
/phpstan-baseline.neon export-ignore
6+
/phpcs.xml export-ignore
7+
/docs export-ignore
8+
/docs-api export-ignore
9+
/examples/tests-* export-ignore

Diff for: .github/ISSUE_TEMPLATE/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ contact_links:
44
url: https://github.com/area17/twill/discussions
55
about: Ask questions and discuss with other community members
66
- name: Read the docs
7-
url: https://twill.io/docs/
7+
url: https://twillcms.com/docs/
88
about: Check out the Twill documentation for answers to common questions
99
- name: Chat with the community
10-
url: https://discord.link/twill
10+
url: https://discord.gg/cnWk7EFv8R
1111
about: Ask questions, get help and discuss new things you're building with the Twill community

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<!--
22
Thanks for opening a PR! Your contribution is much appreciated.
3-
Do you have any questions? Check out the contributing docs at https://github.com/area17/twill/blob/2.x/CONTRIBUTING.md,
4-
or ask in this Pull Request and a Twill maintainer will be happy to help :)
3+
Do you have any questions? Check out the contributing docs at https://github.com/area17/twill/blob/3.x/CONTRIBUTING.md, or ask in this Pull Request and a Twill maintainer will be happy to help :)
54
-->
65

76
## Description

Diff for: .github/clover.xml

+7,964
Large diffs are not rendered by default.

Diff for: .github/workflows/build.yml

-32
This file was deleted.

Diff for: .github/workflows/dispatch.yml

-15
This file was deleted.

Diff for: .github/workflows/docs.yml

-23
This file was deleted.

Diff for: .github/workflows/format.yml

-21
This file was deleted.

Diff for: .github/workflows/main.yml

+113-19
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,89 @@ jobs:
1313
- name: Checkout code
1414
uses: actions/checkout@v2
1515

16+
- name: Checking for prtodo's.
17+
run: |
18+
if grep --exclude-dir={.git,.github,vendor} -rE "PRtodo"; then
19+
exit 1
20+
else
21+
echo "All good"
22+
fi
23+
24+
- name: Checking for leftover "ray" usages.
25+
run: |
26+
if grep --exclude-dir={.git,.github,vendor} -rE "ray("; then
27+
exit 1
28+
else
29+
echo "All good"
30+
fi
31+
1632
- name: Setup PHP
1733
uses: shivammathur/setup-php@v2
1834
with:
19-
php-version: 8.0
35+
php-version: 8.3
2036
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
2137
coverage: none
2238

2339
- name: Install dependencies
2440
run: |
25-
composer require "laravel/framework:8.*" "doctrine/dbal:^3.0" --no-interaction --no-update
26-
composer update --prefer-stable --prefer-dist --no-interaction
41+
composer require "laravel/framework:11.*" --no-interaction --no-update
42+
composer install
2743
2844
- name: Execute tests
2945
run: vendor/bin/phpstan
3046

47+
- name: Check code style
48+
run: vendor/bin/phpcs
49+
3150
test:
51+
name: PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }} - DBAL ${{ matrix.dbal }}
52+
timeout-minutes: 30
3253
runs-on: ${{ matrix.os }}
54+
services:
55+
mysql:
56+
image: mysql:latest
57+
env:
58+
MYSQL_ALLOW_EMPTY_PASSWORD: false
59+
MYSQL_ROOT_PASSWORD: root
60+
MYSQL_DATABASE: twill_testing_3x
61+
ports:
62+
- 3306/tcp
63+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3364
strategy:
3465
fail-fast: false
3566
matrix:
3667
os: [ubuntu-latest]
37-
php: [8.1, 8.0]
38-
laravel: [9.*, 8.*]
39-
dbal: [^2.12, ^3.0]
68+
php: [8.3, 8.2, 8.1]
69+
laravel: [10.*, 11.*]
70+
dbal: [3.*, 4.*]
71+
exclude:
72+
- laravel: 10.*
73+
dbal: 4.*
74+
- laravel: 11.*
75+
php: 8.1
76+
- laravel: 11.*
77+
dbal: 3.*
4078
include:
41-
- laravel: 9.*
42-
testbench: 7.*
43-
- laravel: 8.*
44-
testbench: 6.*
45-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }}
79+
- laravel: 10.*
80+
testbench: 8.*
81+
- laravel: 11.*
82+
testbench: 9.*
4683

4784
steps:
85+
- name: Set timezone?
86+
uses: szenius/[email protected]
87+
with:
88+
timezoneLinux: "Europe/Paris"
89+
4890
- name: Checkout code
4991
uses: actions/checkout@v2
5092

5193
- name: Setup PHP
5294
uses: shivammathur/setup-php@v2
5395
with:
5496
php-version: ${{ matrix.php }}
55-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
56-
coverage: none
97+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, mysql
98+
coverage: xdebug
5799
env:
58100
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59101

@@ -69,14 +111,66 @@ jobs:
69111
- uses: actions/cache@v2
70112
with:
71113
path: ${{ steps.composer-cache.outputs.dir }}
72-
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') }}
73115
restore-keys: |
74-
${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-composer-
116+
${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ matrix.dbal }}-composer-
75117
76118
- name: Install dependencies
77119
run: |
78-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "doctrine/dbal:${{ matrix.dbal }}" --no-interaction --no-update -vvv
79-
composer install --prefer-dist --no-interaction -vvv
120+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "doctrine/dbal:${{ matrix.dbal }}" --no-interaction --no-update
121+
composer install --prefer-dist --no-interaction --no-plugins
80122
81-
- name: Execute tests
82-
run: vendor/bin/phpunit
123+
- name: Setup Node.js
124+
uses: actions/setup-node@v1
125+
with:
126+
node-version: '20.x'
127+
128+
- name: Build npm dependencies.
129+
run: |
130+
npm ci
131+
132+
- name: Create blocks dir
133+
run: |
134+
mkdir ./frontend/js/components/blocks/customs
135+
136+
- name: Build twill.
137+
run: ./vendor/bin/testbench twill:build --forTesting
138+
env:
139+
CACHE_STORE: array
140+
141+
- name: Upgrade Chrome
142+
uses: browser-actions/setup-chrome@latest
143+
144+
- name: Upgrade Chrome Driver
145+
run: ./vendor/bin/testbench dusk:chrome-driver --detect
146+
147+
- name: Prepare Testbench Dusk
148+
run: ./vendor/bin/testbench-dusk package:discover
149+
150+
- name: Execute all tests
151+
run: vendor/bin/phpunit --stop-on-error
152+
env:
153+
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
154+
155+
- uses: codecov/codecov-action@v2
156+
with:
157+
files: .github/clover.xml
158+
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
172+
with:
173+
name: screenshots-${{ matrix.os }}-${{ matrix.php }}-${{ env.REPLACED_LARAVEL }}-${{ env.REPLACED_DBAL }}
174+
path: |
175+
tests/Browser/screenshots/
176+
tests/Browser/console/

Diff for: .github/workflows/rebase.yml

-19
This file was deleted.

Diff for: .gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ frontend/js/components/customs/*
1010
!frontend/js/components/customs/.keep
1111
frontend/js/components/customs-vendor/*
1212
!frontend/js/components/customs-vendor/.keep
13+
frontend/icons-custom/*
14+
views/partials/icons/icons-custom-svg.blade.php
1315
.DS_Store
1416
public/
1517
tests/coverage
@@ -19,3 +21,9 @@ tests/storage
1921
.env.local
2022
.env.*.local
2123
composer.lock
24+
.github/clover.xml
25+
:memory:
26+
dist
27+
dist-backup
28+
.env
29+
mike.md

0 commit comments

Comments
 (0)