Skip to content

Commit 4370d9c

Browse files
author
Artem Stepin
committed
- refactored http client
- better error handling - new feature: convert between different representations
1 parent a33de34 commit 4370d9c

16 files changed

+840
-727
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ $page->setSpace('testSpaceKey')
4343
$client->content()->create($page);
4444

4545
//Get the page we created
46-
$createdPage = $client->content()->findOneBy([
46+
$searchResults = $client->content()->find([
4747
'spaceKey' => 'testSpaceKey',
4848
'title' => 'Test'
4949
]);
50+
$createdPage = $searchResults->getResultAt(0);
5051

5152
//Update page content
5253
$createdPage->setContent('some new content');
@@ -64,7 +65,7 @@ $createdComment->setContent('new comment');
6465
$client->content()->update($createdComment);
6566

6667
//delete a content
67-
$client->content()->remove($createdComment);
68+
$client->content()->delete($createdComment);
6869

6970

7071
```

composer.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name": "cloudplaydev/confluence-php-client",
3-
"description": "Confluence API PHP Client",
4-
"version": "0.2.1",
3+
"description": "Provides methods for Confluence REST APIs",
4+
"version": "0.3.0",
55
"license": "MIT",
66
"keywords": [
77
"Atlassian",
88
"Confluence",
9+
"API",
910
"Authentication",
1011
"PHP",
1112
"Client"
@@ -33,7 +34,6 @@
3334
},
3435
"require": {
3536
"php": "^7.4 || ^8.0",
36-
"ext-curl": "*",
3737
"ext-json": "*",
3838
"psr/http-message": "^1.0",
3939
"psr/http-client": "^1.0",
@@ -42,14 +42,16 @@
4242
"php-http/httplug": "^2.0",
4343
"php-http/discovery": "^1.0",
4444
"php-http/promise": "^1.0",
45-
"php-http/client-common": "^2.0"
45+
"php-http/client-common": "^2.0",
46+
"webmozart/assert": "^1.2"
4647
},
4748
"require-dev": {
48-
"roave/security-advisories": "dev-latest",
4949
"phpunit/phpunit": "^9.5.5",
5050
"phpstan/phpstan": "^0.12.90",
5151
"vimeo/psalm": "^4.8",
5252
"guzzlehttp/guzzle": "^7.2",
53-
"http-interop/http-factory-guzzle": "^1.0"
53+
"http-interop/http-factory-guzzle": "^1.0",
54+
"phpstan/phpstan-webmozart-assert": "^0.12.12",
55+
"phpstan/extension-installer": "^1.1"
5456
}
5557
}

0 commit comments

Comments
 (0)