Skip to content

Commit 3ccc677

Browse files
[9.x] Statamic 6 (#658)
Co-authored-by: duncanmcclean <duncanmcclean@users.noreply.github.com>
1 parent 58a033e commit 3ccc677

Some content is hidden

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

52 files changed

+2848
-1508
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Lint PHP code style issues
1+
name: Lint code style issues
22

33
on:
44
pull_request:
55
paths:
66
- '**.php'
77

88
jobs:
9-
lint-php-code-styling:
9+
lint-code-styling:
1010
runs-on: ubuntu-latest
1111

1212
steps:

.github/workflows/pint-fix.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
php: [8.2, 8.3, 8.4]
16-
laravel: [10.*, 11.*, 12.*]
15+
php: [8.3, 8.4]
16+
laravel: [11.*, 12.*]
1717
stability: [prefer-lowest, prefer-stable]
1818
os: [ubuntu-latest]
19-
exclude:
20-
- php: 8.4
21-
laravel: 10.*
2219

2320
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
2421

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
.idea
77
vendor
88
node_modules
9-
package-lock.json
109
tests/__fixtures__/users/.yaml
1110
composer.lock
1211

.prettierrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

composer.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@
3939
}
4040
},
4141
"require": {
42-
"php": "^8.2",
42+
"php": "^8.3",
4343
"ajthinking/archetype": "^1.0.3 || ^2.0",
44-
"laravel/framework": "^10.25.0 || ^11.3 || ^12.0",
44+
"laravel/framework": "^11.3 || ^12.0",
4545
"pixelfear/composer-dist-plugin": "^0.1.5",
4646
"spatie/ignition": "^1.15",
4747
"spatie/invade": "^2.1",
48-
"statamic/cms": "^5.41",
48+
"statamic/cms": "dev-master",
4949
"stillat/proteus": "^4.0"
5050
},
5151
"require-dev": {
5252
"laravel/pint": "^1.0",
53-
"orchestra/testbench": "^8.28 || ^9.6.1 || ^10.0",
53+
"spatie/test-time": "^1.2",
54+
"orchestra/testbench": "^9.2 || ^10.0",
5455
"phpunit/phpunit": "^10.5.35 || ^11.0",
55-
"spatie/laravel-ray": "^1.40",
56-
"spatie/test-time": "^1.2"
56+
"spatie/laravel-ray": "^1.40"
5757
},
5858
"config": {
5959
"optimize-autoloader": true,
@@ -63,5 +63,6 @@
6363
"pixelfear/composer-dist-plugin": true,
6464
"composer/package-versions-deprecated": true
6565
}
66-
}
66+
},
67+
"minimum-stability": "dev"
6768
}

docs/control-panel.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,29 @@ class YourModel extends Model
180180
}
181181
}
182182
```
183+
184+
## Widget
185+
186+
Runway provides a widget, allowing you to display a list of models from a resource on the Control Panel dashboard. You can configure it in `config/statamic/cp.php`:
187+
188+
```php
189+
// config/statamic/cp.php
190+
191+
'widgets' => [
192+
'getting_started',
193+
[ // [tl! focus:start]
194+
'type' => 'runway_resource',
195+
'resource' => 'product',
196+
'limit' => 10,
197+
], // [tl! focus:end]
198+
],
199+
200+
### Options
201+
202+
* `resource`: The resource's handle **(required)**.
203+
* `width`: Width of dashboard area as a percentage. Accepts `25`, `33`, `50`, `66`, `75` and `100`.
204+
* `sites`: Determines the sites in which this widget should be displayed.
205+
* `limit`: Limit number of entries. Defaults to `5`.
206+
* `sort`: Sort and order by field name. E.g. `''title:desc''`. Defaults to the resources''s settings.
207+
* `fields`: An array of field handles to be displayed as columns in the widget.
208+
* `title`: The title of the widget. Defaults to the resource name.

docs/upgrade-guides/v8-to-v9.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@ php artisan view:clear
3333

3434
## High impact changes
3535

36+
### PHP and Laravel support
37+
**Affects apps using PHP < 8.2 or Laravel < 11.**
3638

37-
## Low impact changes
39+
* The minimum version of PHP is now 8.2.
40+
* The minimum version of Laravel is now 11.
3841

42+
We highly recommend upgrading all the way to Laravel 12 and PHP 8.4.
3943

4044
## Previous upgrade guides
4145

lang/en/fieldtypes.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
return [
4+
5+
'relationship' => [
6+
'config' => [
7+
'resource' => 'Specify the Runway Resource to be used for this field.',
8+
'relationship_name' => 'The name of the Eloquent Relationship this field should use. When left empty, Runway will attempt to guess it based on the field handle.',
9+
'create' => 'Allow creation of new models.',
10+
'with' => 'Specify any relationship which should be eager loaded when this field is augmented.',
11+
'title_format' => 'Configure the title format used for displaying results in the fieldtype. You can use Antlers to pull in model data.',
12+
'search_index' => 'An appropriate search index will be used automatically where possible, but you may define an explicit one.',
13+
'query_scopes' => 'Select which query fields should be applied when retrieving selectable models.',
14+
],
15+
],
16+
17+
'has_many' => [
18+
'config' => [
19+
'reorderable' => 'Can the models be reordered?',
20+
'order_column' => 'Which column should be used to keep track of the order?',
21+
],
22+
],
23+
24+
];

0 commit comments

Comments
 (0)