diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..52f37d5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,52 @@ +name: Bug Report +description: Report an Issue or Bug with the Package +title: "[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. + - 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. + 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: 2.0.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.2.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: 9.0.0 + validations: + required: true + - type: dropdown + id: operating-systems + attributes: + label: Which operating systems does with happen with? + description: You may select more than one. + multiple: true + options: + - macOS + - Windows + - Linux diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 1dcd489..f9e4fc1 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,11 +1,8 @@ blank_issues_enabled: false contact_links: - - name: Ask a question - url: https://github.com/codebar-ag/laravel-microsoft-planner/issues/new - about: Ask the community for help - - name: Request a feature - url: https://github.com/codebar-ag/laravel-microsoft-planner/issues/new - about: Share ideas for new features - - name: Report a bug - url: https://github.com/codebar-ag/laravel-microsoft-planner/issues/new - about: Report a reproducable bug + - name: Questions & Feature Requests + url: https://github.com/codebar-ag/laravel-microsoft-planner/issues/new + about: Ask the community for help + - name: Report a security issue + url: https://github.com/codebar-ag/laravel-microsoft-planner/security/policy + about: Learn how to notify us for sensitive bugs diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 732d682..845fb09 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,7 +13,7 @@ jobs: fail-fast: true matrix: os: [ ubuntu-latest, windows-latest ] - php: [ 8.2 ] + php: [ 8.2, 8.3 ] laravel: [ 10.* ] stability: [ prefer-lowest, prefer-stable ] diff --git a/README.md b/README.md index e2f09f3..19e39fe 100644 --- a/README.md +++ b/README.md @@ -73,22 +73,32 @@ use CodebarAg\LaravelMicrosoftPlanner\Http\Requests\Tasks\PatchTaskDetialsReques $connector = new MicrosoftPlannerConnector(); $authenticator = $connector->getAccessToken(); $connector->authenticate($authenticator); +``` - +```php // Get all tasks from a bucket + $tasksResponse = $connector->send(new GetBucketTasksRequest(bucketId: 'bucket-id')); $tasks = $tasksResponse->dto(); +``` - +```php // Get a single task + $taskResponse = $connector->send(new GetTaskRequest(taskId: 'task-id')); $task = $taskResponse->dto(); +``` +```php // Get a tasks details + $taskDetailsResponse = $connector->send(new GetTaskDetailsRequest(taskId: 'task-id')); $taskDetails = $taskDetailsResponse->dto(); +``` +```php // Update a task + $updateTaskRequest = new PatchTaskRequest(taskId: 'task-id', etag: $task->eTag); $updateTaskRequest->body()->add('somedetail', 'somevalue'); @@ -97,8 +107,11 @@ $updateTaskResponse = $connector->send($updateTaskRequest); if ($updatedTask->successful()) { // Do something } +``` +```php // Update a tasks details + $updateTaskDetailsRequest = new PatchTaskDetialsRequest(taskId: 'task-id', etag: $taskDetails->eTag); $updateTaskDetailsRequest->body()->add('somedetail', 'somevalue'); @@ -120,12 +133,16 @@ CodebarAg\LaravelMicrosoftPlanner\Data\Checklist { +lastModifiedDateTime: "2021-08-31T13:00:00Z" // string +lastModifiedByUserId: "1234456" // string|null } +``` +```php CodebarAg\LaravelMicrosoftPlanner\Data\Note { +contentType: 'html' // string +content: '
Some content
' // string } +``` +```php CodebarAg\LaravelMicrosoftPlanner\Data\Reference { +alias: "test.pdf" // string +url: "https://something.here/in-this-file/test.pdf" // string @@ -134,7 +151,9 @@ CodebarAg\LaravelMicrosoftPlanner\Data\Reference { +lastModifiedDateTime: "2021-08-31T13:00:00Z" // string +lastModifiedByUserId: "1234456" // string } +``` +```php CodebarAg\LaravelMicrosoftPlanner\Data\TaskDetails { +eTag: "W/"1238934jbdf89bfdkkjbr34g98hh98vhhcc="" // string +description: "Some Description" // string @@ -144,7 +163,9 @@ CodebarAg\LaravelMicrosoftPlanner\Data\TaskDetails { +references: Illuminate\Support\Collection // Collection +checklist: Illuminate\Support\Collection // Collection } +``` +```php CodebarAg\LaravelMicrosoftPlanner\Data\Task { +eTag: "W/"JzEtVGFzsdfsdEBAQEBAQEBAQEBAQEBJcCc="" // string +planId: "aL8rSpzb_0-0IGcHql4P0ZcAG3_B" // string diff --git a/composer.json b/composer.json index 9846df5..f169cd2 100644 --- a/composer.json +++ b/composer.json @@ -18,22 +18,22 @@ "require": { "php": "^8.1", "illuminate/contracts": "^10.0", - "saloonphp/saloon": "^3.0", - "spatie/laravel-data": "^3.9", - "spatie/laravel-package-tools": "^1.14.0" + "saloonphp/saloon": "^3.4", + "spatie/laravel-data": "^3.11", + "spatie/laravel-package-tools": "^1.16" }, "require-dev": { - "laravel/pint": "^1.0", - "nunomaduro/collision": "^7.8", - "nunomaduro/larastan": "^2.0.1", - "orchestra/testbench": "^8.8", - "pestphp/pest": "^2.20", - "pestphp/pest-plugin-arch": "^2.0", - "pestphp/pest-plugin-laravel": "^2.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "spatie/laravel-ray": "^1.26" + "laravel/pint": "^1.13", + "nunomaduro/collision": "^7.10", + "nunomaduro/larastan": "^2.8", + "orchestra/testbench": "^8.20", + "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" }, "autoload": { "psr-4": {