Skip to content

Commit 24df5e8

Browse files
authored
Merge pull request #106 from advoor/update-cis
refactor: update CI and switch some tooling to Laravel ecosystem
2 parents 6d1df43 + 627e829 commit 24df5e8

27 files changed

+191
-10526
lines changed

.github/workflows/auto-format-code.yml

+8-11
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
2727

2828
- name: Setup NodeJS
29-
uses: actions/setup-node@v3
29+
uses: actions/setup-node@v4
3030
with:
3131
node-version: lts/*
3232
cache: 'npm'
@@ -37,20 +37,17 @@ jobs:
3737
- name: Setup PHP
3838
uses: shivammathur/setup-php@v2
3939
with:
40-
php-version: '8.1'
40+
php-version: '8.3'
4141
extensions: exif,json,mbstring
4242
coverage: none
4343

4444
- name: Configure local Laravel Nova dummy package
4545
run: |
4646
composer config repositories.0 path ./tests/Fixtures/nova
47-
git update-index --assume-unchanged composer.json composer.lock
47+
git update-index --assume-unchanged composer.json
4848
4949
- name: Install Composer dependencies
50-
uses: ramsey/composer-install@v2
51-
with:
52-
composer-options: "--ignore-platform-req=php"
53-
dependency-versions: highest # No lockfile is present, so locked (the default) isn't possible
50+
uses: ramsey/composer-install@v3
5451

5552
- name: Lint code
5653
run: |
@@ -72,8 +69,8 @@ jobs:
7269
exit 1
7370
7471
- name: Commit changes (push only)
75-
if: ${{ github.event_name == 'push' }}
76-
uses: stefanzweifel/git-auto-commit-action@v4.16.0
72+
if: github.event_name == 'push'
73+
uses: stefanzweifel/git-auto-commit-action@v5
7774
with:
78-
commit_message: Fixed code style using PHP-CS-Fixer
75+
commit_message:' chore: fixed code formatting issues'
7976

.github/workflows/test.yml .github/workflows/test-code.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
php:
1919
- '8.2'
2020
- '8.3'
21+
- nightly
2122

2223
laravel:
2324
- '10.0'
@@ -28,10 +29,15 @@ jobs:
2829
testbench: '8.0'
2930
- laravel: '11.0'
3031
testbench: '9.0'
32+
- php: 8.3
33+
laravel: '11.0'
34+
stable: true
35+
- php: nightly
36+
experimental: true
3137

3238
steps:
3339
- name: Checkout
34-
uses: actions/checkout@v3
40+
uses: actions/checkout@v4
3541

3642
- name: Setup PHP
3743
uses: shivammathur/setup-php@v2
@@ -49,9 +55,9 @@ jobs:
4955
run: composer config repositories.0 path ./tests/Fixtures/nova
5056

5157
- name: Install Composer dependencies
52-
uses: ramsey/composer-install@v2
58+
uses: ramsey/composer-install@v3
5359
with:
54-
dependency-versions: highest # We're installing additional packages, and cannot use the lockfile
60+
composer-options: "--ignore-platform-req=php"
5561

5662
- name: Run unit tests with coverage and printer
5763
id: phpunit
@@ -62,7 +68,7 @@ jobs:
6268
--coverage-clover ./coverage-clover.xml
6369
6470
- name: Report test results
65-
if: ${{ success() || failure() }}
71+
if: success() || failure()
6672
uses: mikepenz/action-junit-report@v4
6773
with:
6874
report_paths: ./report-junit.xml
@@ -74,8 +80,8 @@ jobs:
7480
PHPUnit version: `${{ steps.phpunit.outputs.phpunit_version }}`
7581
7682
- name: Determine coverage
77-
uses: slavcodev/coverage-monitor-action@1.8.0
78-
if: ${{ github.event_name == 'pull_request' && matrix.stable == true }}
83+
uses: slavcodev/coverage-monitor-action@1.9.0
84+
if: github.event_name == 'pull_request' && matrix.stable == true
7985
continue-on-error: true
8086
with:
8187
github_token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
.DS_Store
66
Thumbs.db
77
.php-cs-fixer.cache
8+
/composer.lock

.php-cs-fixer.dist.php

-32
This file was deleted.

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- Added `EditorJsThumbnailCreated` event that triggers when a thumbnail is generated. Via #98 by @woeler.
1212
- Added Laravel 11 support. Via #104 by @woeler.
1313
- Dropped Laravel 9 support. Via #104 by @woeler.
14+
- Updated GitHub Actions to Node v20, via #106 by @roelofr.
15+
- Updated auto-formatter to use PHP 8.3, via #106 by @roelofr.
1416

1517
## [3.3.0]
1618

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
[![Latest Version on Github](https://img.shields.io/github/release/advoor/nova-editor-js.svg?style=flat-square)](https://packagist.org/packages/advoor/nova-editor-js)
44
[![Total Downloads](https://img.shields.io/packagist/dt/advoor/nova-editor-js.svg?style=flat-square)](https://packagist.org/packages/advoor/nova-editor-js)
55

6-
A Laravel Nova implementation of [Editor.js](https://github.com/codex-team/editor.js) by [@advoor](https://github.com/advoor).
6+
A Laravel Nova implementation of [Editor.js](https://github.com/codex-team/editor.js)
7+
by [@advoor](https://github.com/advoor).
78

89
## Installation
910

@@ -26,6 +27,7 @@ Please use the below table to find which versions are suitable for your installa
2627

2728
| Package version | Nova Version | Laravel Version | PHP version |
2829
| --------------- | ------------ | --------------- | ----------- |
30+
| `4.x` | 4.x | 10.x - 11.x | 8.2+ |
2931
| `3.x` | 4.x | 8.x - 10.x | 8.1+ |
3032
| `2.x` | 2.x - 3.x | 5.x - 8.x | 5.6 - 7.4 |
3133

@@ -117,7 +119,8 @@ From the config, you can define the following editor settings:
117119

118120
- `placeholder` ([docs][placeholder-docs]) - The placeholder to show in an empty editor
119121
- `defaultBlock` ([docs][defaultblock-docs]) - The block that's used by default
120-
- `autofocus` ([docs][autofocus-docs]) - If the editor should auto-focus, only use if you never have multiple editors on a page and after considering the
122+
- `autofocus` ([docs][autofocus-docs]) - If the editor should auto-focus, only use if you never have multiple editors on
123+
a page and after considering the
121124
[accessibility implications][autofocus-accessibility]
122125
- `rtl` ([docs][rtl-docs]) - Set to true to enable right-to-left mode, for languages like Arabic and Hebrew
123126

@@ -149,4 +152,5 @@ content. It does not have an entry in the "Add" menu.
149152

150153
### Registering custom components
151154

152-
Please refer to the [extending Nova EditorJS](./EXTENDING.md) guide on instructions on how to register custom components.
155+
Please refer to the [extending Nova EditorJS](./EXTENDING.md) guide on instructions on how to register custom
156+
components.

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"spatie/image": "^3.0"
2222
},
2323
"require-dev": {
24-
"friendsofphp/php-cs-fixer": "^3.9",
24+
"laravel/pint": "^1.15",
2525
"orchestra/testbench": "^8.0 || ^9.0",
2626
"php-parallel-lint/php-parallel-lint": "^1.3"
2727
},
@@ -44,7 +44,7 @@
4444
"parallel-lint --exclude .git --exclude vendor ."
4545
],
4646
"format": [
47-
"php-cs-fixer fix"
47+
"pint"
4848
]
4949
},
5050
"scripts-descriptions": {

0 commit comments

Comments
 (0)