Skip to content

Commit b112218

Browse files
authored
Merge pull request #25 from codebar-ag/feature-laravel-12
Feature Laravel 12
2 parents b86d1b0 + 2d4177e commit b112218

17 files changed

+144
-59
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_size = 4
6+
indent_style = space
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.gitattributes

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.github export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/art export-ignore
10+
/docs export-ignore
11+
/tests export-ignore
12+
/.editorconfig export-ignore
13+
/.php_cs.dist.php export-ignore
14+
/psalm.xml export-ignore
15+
/psalm.xml.dist export-ignore
16+
/testbench.yaml export-ignore
17+
/UPGRADING.md export-ignore
18+
/phpstan.neon.dist export-ignore
19+
/phpstan-baseline.neon export-ignore

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,45 @@
11
name: Bug Report
22
description: Report an Issue or Bug with the Package
33
title: "[Bug]: "
4-
labels: ["bug"]
4+
labels: [ "bug" ]
55
body:
66
- type: markdown
77
attributes:
8-
value: |
9-
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
8+
value: "|
9+
We're sorry to hear you have a problem. Can you help us solve it by providing the following details."
1010
- type: textarea
1111
id: what-happened
1212
attributes:
1313
label: What happened?
1414
description: What did you expect to happen?
15-
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
15+
placeholder: "I cannot currently do X thing because when I do, it breaks X thing."
1616
validations:
1717
required: true
1818
- type: input
1919
id: package-version
2020
attributes:
2121
label: Package Version
2222
description: What version of our Package are you running? Please be as specific as possible
23-
placeholder: 1.0.0
23+
placeholder: "12.0"
24+
value: "12.0"
2425
validations:
2526
required: true
2627
- type: input
2728
id: php-version
2829
attributes:
2930
label: PHP Version
3031
description: What version of PHP are you running? Please be as specific as possible
31-
placeholder: 8.3.0
32+
placeholder: "8.4.0"
33+
value: "8.4.0"
3234
validations:
3335
required: true
3436
- type: input
3537
id: laravel-version
3638
attributes:
3739
label: Laravel Version
3840
description: What version of Laravel are you running? Please be as specific as possible
39-
placeholder: 11.0.0
41+
placeholder: "12.0.0"
42+
value: "12.0.0"
4043
validations:
4144
required: true
4245
- type: dropdown

.github/workflows/dependabot-auto-merge.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: ${{ github.actor == 'dependabot[bot]' }}
1212
steps:
13-
13+
1414
- name: Dependabot metadata
1515
id: metadata
1616
uses: dependabot/fetch-metadata@v2.3.0
1717
with:
1818
github-token: "${{ secrets.GITHUB_TOKEN }}"
19-
19+
2020
- name: Auto-merge Dependabot PRs for semver-minor updates
2121
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
2222
run: gh pr merge --auto --merge "$PR_URL"
2323
env:
2424
PR_URL: ${{github.event.pull_request.html_url}}
2525
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26-
26+
2727
- name: Auto-merge Dependabot PRs for semver-patch updates
2828
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
2929
run: gh pr merge --auto --merge "$PR_URL"

.github/workflows/phpstan.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: PHPStan
22

33
on:
4-
pull_request:
5-
paths:
6-
- '**.php'
7-
- 'phpstan.neon.dist'
84
push:
95
paths:
106
- '**.php'
@@ -20,11 +16,11 @@ jobs:
2016
- name: Setup PHP
2117
uses: shivammathur/setup-php@v2
2218
with:
23-
php-version: '8.2'
19+
php-version: '8.4'
2420
coverage: none
2521

2622
- name: Install composer dependencies
2723
uses: ramsey/composer-install@v3
2824

2925
- name: Run PHPStan
30-
run: ./vendor/bin/phpstan analyse src --error-format=github
26+
run: ./vendor/bin/phpstan --error-format=github

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: release
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- main
9+
jobs:
10+
release:
11+
name: Release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: '0'
17+
- name: Bump version and push tag
18+
uses: anothrNick/github-tag-action@master
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
21+
WITH_V: true
22+
RELEASE_BRANCHES: main
23+
DEFAULT_BUMP: minor

.github/workflows/run-tests.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
fail-fast: true
14+
max-parallel: 1
1415
matrix:
15-
os: [ ubuntu-latest, windows-latest ]
16-
php: [ 8.2, 8.3 ]
17-
laravel: [ 11.* ]
16+
os: [ ubuntu-latest ]
17+
php: [ 8.2, 8.3, 8.4 ]
18+
laravel: [ 12.* ]
1819
stability: [ prefer-lowest, prefer-stable ]
1920

2021
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
@@ -43,8 +44,12 @@ jobs:
4344
- name: Execute tests
4445
run: cp phpunit.xml.dist phpunit.xml
4546

46-
- name: Migrate Config
47-
run: vendor/bin/pest --migrate-configuration
48-
4947
- name: Execute tests
5048
run: vendor/bin/pest
49+
50+
- name: Store Log Artifacts
51+
if: failure()
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: Store report artifacts
55+
path: ./vendor/orchestra/testbench-core/laravel/storage/logs

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
.idea
2+
.phpunit.result.cache
23
.phpunit.cache
3-
build
44
composer.lock
55
coverage
6-
docs
76
phpunit.xml
87
phpstan.neon
98
testbench.yaml
109
vendor
1110
node_modules
11+
.phpactor.json
12+
build

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ Laravel Microsoft Planner is an opinionated way to interface with Microsoft Plan
1414

1515
## 🛠 Requirements
1616

17-
### <= v1.0
1817

19-
- PHP: `^8.2`
20-
- Laravel: `^10.*`
18+
| Package | PHP | Laravel |
19+
|:-------:|:-----------:|:-------:|
20+
| v12.0.0 | ^8.2 - ^8.4 | 12.x |
21+
| v11.0.0 | ^8.2 - ^8.3 | 11.x |
22+
| v1.0.0 | ^8.1 - ^8.2 | 10.x |
2123

2224
## ⚙️ Installation
2325

composer.json

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,35 @@
99
"homepage": "https://github.com/codebar-ag/laravel-microsoft-planner",
1010
"license": "MIT",
1111
"authors": [
12+
{
13+
"name": "Sebastian Bürgin-Fix",
14+
"email": "sebastian.buergin@buergin.ch",
15+
"homepage": "https://www.codebar.ch",
16+
"role": "Sofware-Engineer"
17+
},
1218
{
1319
"name": "Rhys Lees",
14-
"email": "43909932+RhysLees@users.noreply.github.com",
15-
"role": "Developer"
20+
"role": "Software-Engineer"
1621
}
1722
],
1823
"require": {
19-
"php": ">=8.2",
20-
"illuminate/contracts": "^11.0",
21-
"saloonphp/saloon": "^3.4",
22-
"spatie/laravel-data": "^4.4",
23-
"spatie/laravel-package-tools": "^1.16"
24+
"php": "8.2.*|8.3.*|8.4.*",
25+
"illuminate/contracts": "^12.0",
26+
"saloonphp/cache-plugin": "^3.0",
27+
"saloonphp/laravel-plugin": "^3.5",
28+
"saloonphp/saloon": "^3.10.1",
29+
"spatie/laravel-data": "^4.13.1",
30+
"spatie/laravel-package-tools": "^1.19"
2431
},
2532
"require-dev": {
26-
"laravel/pint": "^1.13",
27-
"nunomaduro/collision": "^8.1",
28-
"larastan/larastan": "^2.9",
29-
"orchestra/testbench": "^9.0",
30-
"pestphp/pest": "^2.31",
31-
"pestphp/pest-plugin-arch": "^2.6",
32-
"pestphp/pest-plugin-laravel": "^2.2",
33-
"phpstan/extension-installer": "^1.3",
34-
"phpstan/phpstan-deprecation-rules": "^1.1",
35-
"phpstan/phpstan-phpunit": "^1.3",
36-
"spatie/laravel-ray": "^1.33"
33+
"laravel/pint": "^1.21",
34+
"larastan/larastan": "^v3.1",
35+
"orchestra/testbench": "^10.0",
36+
"pestphp/pest": "^3.7",
37+
"phpstan/extension-installer": "^1.4",
38+
"phpstan/phpstan-deprecation-rules": "^2.0",
39+
"phpstan/phpstan-phpunit": "^2.0",
40+
"spatie/laravel-ray": "^1.39"
3741
},
3842
"autoload": {
3943
"psr-4": {

phpstan.neon.dist

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ includes:
22
- phpstan-baseline.neon
33

44
parameters:
5-
level: 1
5+
level: 5
66
paths:
77
- src
8+
- config
89
tmpDir: build/phpstan
910
checkOctaneCompatibility: true
1011
checkModelProperties: true
11-
checkMissingIterableValueType: false
12-
ignoreErrors:
13-
# new static() is a best practice in Drupal, so we cannot fix that.
14-
- "#^Unsafe usage of new static#"
15-
12+
noEnvCallsOutsideOfConfig: false

phpunit.xml.dist

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
>
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd" backupGlobals="false"
4+
bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false"
5+
executionOrder="random" failOnWarning="true" failOnRisky="true" failOnEmptyTestSuite="true"
6+
beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
77
<testsuites>
8-
<testsuite name="Test Suite">
9-
<directory suffix="Test.php">./tests</directory>
8+
<testsuite name="codebar Solutions AG Test Suite">
9+
<directory>tests</directory>
1010
</testsuite>
1111
</testsuites>
1212
<coverage>
13+
<report>
14+
<html outputDirectory="build/coverage"/>
15+
<text outputFile="build/coverage.txt"/>
16+
<clover outputFile="build/logs/clover.xml"/>
17+
</report>
18+
</coverage>
19+
<logging>
20+
<junit outputFile="build/report.junit.xml"/>
21+
</logging>
22+
<php>
23+
<env name="APP_KEY" value="base64:F+mHMDBbavrsp/I3WYA5lDSwDJJI/0wQG4eM3csq/lo="/>
24+
<env name="MICROSOFT_PLANNER_CLIENT_ID" value=""/>
25+
<env name="MICROSOFT_PLANNER_TENANT_ID" value=""/>
26+
<env name="MICROSOFT_PLANNER_CLIENT_SECRET" value=""/>
27+
</php>
28+
<source>
1329
<include>
14-
<directory suffix=".php">./app</directory>
1530
<directory suffix=".php">./src</directory>
1631
</include>
17-
</coverage>
32+
</source>
1833
</phpunit>

src/Data/Checklist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Support\Arr;
66
use Spatie\LaravelData\Data;
77

8+
/** @phpstan-consistent-constructor */
89
class Checklist extends Data
910
{
1011
public function __construct(

src/Data/Note.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Support\Arr;
66
use Spatie\LaravelData\Data;
77

8+
/** @phpstan-consistent-constructor */
89
class Note extends Data
910
{
1011
public function __construct(

src/Data/Reference.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Support\Arr;
66
use Spatie\LaravelData\Data;
77

8+
/** @phpstan-consistent-constructor */
89
class Reference extends Data
910
{
1011
public function __construct(

src/Data/Task.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Support\Arr;
77
use Spatie\LaravelData\Data;
88

9+
/** @phpstan-consistent-constructor */
910
class Task extends Data
1011
{
1112
public function __construct(

src/Data/TaskDetails.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Support\Collection;
77
use Spatie\LaravelData\Data;
88

9+
/** @phpstan-consistent-constructor */
910
class TaskDetails extends Data
1011
{
1112
public function __construct(

0 commit comments

Comments
 (0)