Skip to content
This repository was archived by the owner on Oct 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.xml.dist export-ignore
/art export-ignore
/docs export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.php_cs.dist.php export-ignore
/psalm.xml export-ignore
/psalm.xml.dist export-ignore
/testbench.yaml export-ignore
/UPGRADING.md export-ignore
/phpstan.neon.dist export-ignore
/phpstan-baseline.neon export-ignore
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
name: Bug Report
description: Report an Issue or Bug with the Package
title: "[Bug]: "
labels: ["bug"]
labels: [ "bug" ]
body:
- type: markdown
attributes:
value: |
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
value: "|
We're sorry to hear you have a problem. Can you help us solve it by providing the following details."
- type: textarea
id: what-happened
attributes:
label: What happened?
description: What did you expect to happen?
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
placeholder: "I cannot currently do X thing because when I do, it breaks X thing."
validations:
required: true
- type: input
id: package-version
attributes:
label: Package Version
description: What version of our Package are you running? Please be as specific as possible
placeholder: 1.0.0
placeholder: "12.0"
value: "12.0"
validations:
required: true
- type: input
id: php-version
attributes:
label: PHP Version
description: What version of PHP are you running? Please be as specific as possible
placeholder: 8.3.0
placeholder: "8.4.0"
value: "8.4.0"
validations:
required: true
- type: input
id: laravel-version
attributes:
label: Laravel Version
description: What version of Laravel are you running? Please be as specific as possible
placeholder: 11.0.0
placeholder: "12.0.0"
value: "12.0.0"
validations:
required: true
- type: dropdown
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:

- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Auto-merge Dependabot PRs for semver-minor updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: PHPStan

on:
pull_request:
paths:
- '**.php'
- 'phpstan.neon.dist'
push:
paths:
- '**.php'
Expand All @@ -20,11 +16,11 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.4'
coverage: none

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

- name: Run PHPStan
run: ./vendor/bin/phpstan analyse src --error-format=github
run: ./vendor/bin/phpstan --error-format=github
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: release

on:
pull_request:
types:
- closed
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@master
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
WITH_V: true
RELEASE_BRANCHES: main
DEFAULT_BUMP: minor
17 changes: 11 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
max-parallel: 1
matrix:
os: [ ubuntu-latest, windows-latest ]
php: [ 8.2, 8.3 ]
laravel: [ 11.* ]
os: [ ubuntu-latest ]
php: [ 8.2, 8.3, 8.4 ]
laravel: [ 12.* ]
stability: [ prefer-lowest, prefer-stable ]

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

- name: Migrate Config
run: vendor/bin/pest --migrate-configuration

- name: Execute tests
run: vendor/bin/pest

- name: Store Log Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: Store report artifacts
path: ./vendor/orchestra/testbench-core/laravel/storage/logs
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.idea
.phpunit.result.cache
.phpunit.cache
build
composer.lock
coverage
docs
phpunit.xml
phpstan.neon
testbench.yaml
vendor
node_modules
.phpactor.json
build
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ Laravel Microsoft Planner is an opinionated way to interface with Microsoft Plan

## 🛠 Requirements

### <= v1.0

- PHP: `^8.2`
- Laravel: `^10.*`
| Package | PHP | Laravel |
|:-------:|:-----------:|:-------:|
| v12.0.0 | ^8.2 - ^8.4 | 12.x |
| v11.0.0 | ^8.2 - ^8.3 | 11.x |
| v1.0.0 | ^8.1 - ^8.2 | 10.x |

## ⚙️ Installation

Expand Down
40 changes: 22 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,35 @@
"homepage": "https://github.com/codebar-ag/laravel-microsoft-planner",
"license": "MIT",
"authors": [
{
"name": "Sebastian Bürgin-Fix",
"email": "[email protected]",
"homepage": "https://www.codebar.ch",
"role": "Sofware-Engineer"
},
{
"name": "Rhys Lees",
"email": "[email protected]",
"role": "Developer"
"role": "Software-Engineer"
}
],
"require": {
"php": ">=8.2",
"illuminate/contracts": "^11.0",
"saloonphp/saloon": "^3.4",
"spatie/laravel-data": "^4.4",
"spatie/laravel-package-tools": "^1.16"
"php": "8.2.*|8.3.*|8.4.*",
"illuminate/contracts": "^12.0",
"saloonphp/cache-plugin": "^3.0",
"saloonphp/laravel-plugin": "^3.5",
"saloonphp/saloon": "^3.10.1",
"spatie/laravel-data": "^4.13.1",
"spatie/laravel-package-tools": "^1.19"
},
"require-dev": {
"laravel/pint": "^1.13",
"nunomaduro/collision": "^8.1",
"larastan/larastan": "^2.9",
"orchestra/testbench": "^9.0",
"pestphp/pest": "^2.31",
"pestphp/pest-plugin-arch": "^2.6",
"pestphp/pest-plugin-laravel": "^2.2",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"spatie/laravel-ray": "^1.33"
"laravel/pint": "^1.21",
"larastan/larastan": "^v3.1",
"orchestra/testbench": "^10.0",
"pestphp/pest": "^3.7",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"spatie/laravel-ray": "^1.39"
},
"autoload": {
"psr-4": {
Expand Down
9 changes: 3 additions & 6 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ includes:
- phpstan-baseline.neon

parameters:
level: 1
level: 5
paths:
- src
- config
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false
ignoreErrors:
# new static() is a best practice in Drupal, so we cannot fix that.
- "#^Unsafe usage of new static#"

noEnvCallsOutsideOfConfig: false
31 changes: 23 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd" backupGlobals="false"
bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false"
executionOrder="random" failOnWarning="true" failOnRisky="true" failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Test Suite">
<directory suffix="Test.php">./tests</directory>
<testsuite name="codebar Solutions AG Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<php>
<env name="APP_KEY" value="base64:F+mHMDBbavrsp/I3WYA5lDSwDJJI/0wQG4eM3csq/lo="/>
<env name="MICROSOFT_PLANNER_CLIENT_ID" value=""/>
<env name="MICROSOFT_PLANNER_TENANT_ID" value=""/>
<env name="MICROSOFT_PLANNER_CLIENT_SECRET" value=""/>
</php>
<source>
<include>
<directory suffix=".php">./app</directory>
<directory suffix=".php">./src</directory>
</include>
</coverage>
</source>
</phpunit>
1 change: 1 addition & 0 deletions src/Data/Checklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Support\Arr;
use Spatie\LaravelData\Data;

/** @phpstan-consistent-constructor */
class Checklist extends Data
{
public function __construct(
Expand Down
1 change: 1 addition & 0 deletions src/Data/Note.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Support\Arr;
use Spatie\LaravelData\Data;

/** @phpstan-consistent-constructor */
class Note extends Data
{
public function __construct(
Expand Down
1 change: 1 addition & 0 deletions src/Data/Reference.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Support\Arr;
use Spatie\LaravelData\Data;

/** @phpstan-consistent-constructor */
class Reference extends Data
{
public function __construct(
Expand Down
1 change: 1 addition & 0 deletions src/Data/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Illuminate\Support\Arr;
use Spatie\LaravelData\Data;

/** @phpstan-consistent-constructor */
class Task extends Data
{
public function __construct(
Expand Down
1 change: 1 addition & 0 deletions src/Data/TaskDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Illuminate\Support\Collection;
use Spatie\LaravelData\Data;

/** @phpstan-consistent-constructor */
class TaskDetails extends Data
{
public function __construct(
Expand Down