Skip to content

Commit e9ef473

Browse files
authored
Major Update to Statamic 6 (#130)
* new constraints & normalize * alpha * Forma is not needed anymore * Convert to Pest (#131) * Use addon settings (#132) * Autoload addon components (#135) * tidy (#136) * Statamic issue has been fixed * broken for `Values` objects * proper issue * clearer this way, but leave the `__isset` so folks can use `empty) * Need this way so it works on non-multi-day events * Move tests around (#137) * Convert fieldsets/code to use Timezone Dictionary field (#139) * Just Say "No" To Mutability (#140) * heck w/ mutability * Update to latest Spatie iCalendar Generator package * Only Carbon v3 now * remove location_field * it’s settings now * whoops * simplify * remove location_field * keep all configured collections
1 parent a7a737e commit e9ef473

Some content is hidden

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

43 files changed

+2318
-4940
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,11 @@ jobs:
99
runs-on: ${{ matrix.os }}
1010
strategy:
1111
matrix:
12-
os: [ubuntu-latest]
13-
php: [8.2, 8.3, 8.4]
12+
php: [8.3, 8.4]
1413
laravel: [11.*, 12.*]
14+
stability: [prefer-lowest, prefer-stable]
15+
os: [ubuntu-latest]
1516
dependency-version: [prefer-stable]
16-
exclude:
17-
- php: 8.1
18-
laravel: 11.*
19-
- php: 8.1
20-
laravel: 12.*
21-
- php: 8.4
22-
laravel: 10.*
2317
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ubuntu-latest
2418
steps:
2519
- name: Checkout code
@@ -39,8 +33,7 @@ jobs:
3933
coverage: none
4034

4135
- name: Install dependencies
42-
run: |
43-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
36+
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
4437

4538
- name: Execute tests
46-
run: vendor/bin/phpunit -c phpunit.xml
39+
run: vendor/bin/pest

composer.json

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
11
{
22
"name": "transformstudios/events",
3-
"type": "statamic-addon",
4-
"license": "proprietary",
53
"description": "Statamic addon to create & manage events",
4+
"license": "proprietary",
5+
"type": "statamic-addon",
66
"authors": [
77
{
88
"name": "Erin Dalzell",
99
"email": "erin@transformstudios.com",
1010
"homepage": "https://transformstudios.com"
1111
}
1212
],
13+
"require": {
14+
"php": "^8.3",
15+
"rlanvin/php-rrule": "^2.3.1",
16+
"spatie/calendar-links": "^1.0",
17+
"spatie/icalendar-generator": "^3.2.1",
18+
"statamic/cms": "^6.0"
19+
},
20+
"require-dev": {
21+
"orchestra/testbench": "^9.2 || ^10.0",
22+
"pestphp/pest": "^4.0",
23+
"spatie/laravel-ray": "^1.35",
24+
"spatie/test-time": "^1.2"
25+
},
1326
"autoload": {
1427
"psr-4": {
15-
"TransformStudios\\Events\\": "src"
28+
"TransformStudios\\Events\\": "src",
29+
"TransformStudios\\Events\\Tests\\": "tests"
1630
},
1731
"files": [
1832
"src/helpers.php"
@@ -23,41 +37,24 @@
2337
"TransformStudios\\Events\\Tests\\": "tests"
2438
}
2539
},
26-
"extra": {
27-
"statamic": {
28-
"name": "Events",
29-
"description": "Statamic addon to create & manage events"
40+
"config": {
41+
"allow-plugins": {
42+
"pestphp/pest-plugin": true,
43+
"pixelfear/composer-dist-plugin": true
3044
},
45+
"optimize-autoloader": true,
46+
"preferred-install": "dist",
47+
"sort-packages": true
48+
},
49+
"extra": {
3150
"laravel": {
3251
"providers": [
3352
"TransformStudios\\Events\\ServiceProvider"
3453
]
54+
},
55+
"statamic": {
56+
"description": "Statamic addon to create & manage events",
57+
"name": "Events"
3558
}
36-
},
37-
"require": {
38-
"php": "^8.2",
39-
"edalzell/forma": "^2.0 || ^3.0",
40-
"nesbot/carbon": "^2.0 || ^3.0",
41-
"rlanvin/php-rrule": "^2.3.1",
42-
"spatie/calendar-links": "^1.0",
43-
"spatie/icalendar-generator": "^2.3.3",
44-
"statamic/cms": "^4.5 || ^5.0"
45-
},
46-
"require-dev": {
47-
"mockery/mockery": "^1.3.1",
48-
"nunomaduro/collision": "^6.0 || ^7.0 || ^8.0",
49-
"phpunit/phpunit": "^9.0 || ^10.0 || ^11.0",
50-
"orchestra/testbench": "^7.0 || ^8.0 || ^9.0",
51-
"spatie/laravel-ray": "^1.35",
52-
"spatie/test-time": "^1.2"
53-
},
54-
"config": {
55-
"optimize-autoloader": true,
56-
"preferred-install": "dist",
57-
"sort-packages": true,
58-
"allow-plugins": {
59-
"pixelfear/composer-dist-plugin": true
60-
}
61-
},
62-
"repositories": []
59+
}
6360
}

config/events.php

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

resources/blueprints/config.yaml

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

resources/blueprints/settings.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
tabs:
2+
main:
3+
display: Main
4+
sections:
5+
-
6+
fields:
7+
-
8+
handle: collections
9+
field:
10+
type: grid
11+
display: Collections
12+
sortable: false
13+
add_row: 'Add Collection'
14+
full_width_setting: true
15+
fields:
16+
-
17+
handle: collection
18+
field:
19+
type: collections
20+
display: Collection
21+
width: 50
22+
mode: select
23+
max_items: 1
24+
default:
25+
-
26+
collection: events
27+
-
28+
handle: timezone
29+
field:
30+
mode: select
31+
max_items: 1
32+
type: timezones
33+
display: Timezone
34+
full_width_setting: true
35+
default: 'UTC'

resources/fieldsets/event.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,11 @@ fields:
1717
-
1818
handle: timezone
1919
field:
20+
dictionary: timezones
2021
max_items: 1
21-
clearable: false
22-
searchable: true
23-
taggable: false
24-
push_tags: false
25-
cast_booleans: false
22+
default: UTC
23+
type: dictionary
2624
display: Timezone
27-
type: timezones
28-
mode: typeahead
29-
width: 33
3025
-
3126
handle: all_day
3227
field:

0 commit comments

Comments
 (0)