Skip to content

Commit 8b53d4f

Browse files
feat(deps): Upgrade the generated code with latest JanePHP release (#155)
* feat(deps): Upgrade the generated code with latest JanePHP release * fix(cs): PHP CS Fixer upgrade * fix(tests): Add PHP 8.2 and try to fix the rate limit issue * fix(tests): Remove PHP 8.2 and add CI env var
1 parent bce68b0 commit 8b53d4f

File tree

1,078 files changed

+7445
-3451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,078 files changed

+7445
-3451
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,4 @@ jobs:
6969
env:
7070
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
7171
SLACK_TEST_CHANNEL: ${{ secrets.SLACK_TEST_CHANNEL }}
72+
CI: ${{ vars.CI }}

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
'declare_strict_types' => true,
4545
'ordered_class_elements' => true, // Symfony(PSR12) override the default value, but we don't want
4646
'blank_line_before_statement' => true, // Symfony(PSR12) override the default value, but we don't want
47+
'get_class_to_class_keyword' => false, // To keep PHP 7.4 compat
4748
])
4849
->setFinder($finder)
4950
;

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
* Upgrade JanePHP generated code
6+
57
## 4.5.0 (2022-03-30)
68

79
* Fix `jane-php/open-api-2` version mismatch breaking the SDK generation

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# A PHP client for Slack's API
22

3-
There is a bunch of existing PHP clients for Slack. But some are not up to date
3+
There is a bunch of existing PHP clients for Slack. But some are not up-to-date
44
or miss features, some only cover a small part of the API and most are simply
55
no longer maintained.
66

77
This SDK is generated automatically with [JanePHP](https://github.com/janephp/janephp)
88
from the [official Slack API specs](https://github.com/slackapi/slack-api-specs).
99

10-
It also provides a **full object oriented interface** for all the endpoints,
10+
It also provides a **full object-oriented interface** for all the endpoints,
1111
requests and responses of the Slack Web API.
1212

1313
## Installation
@@ -47,7 +47,7 @@ Want more documentation or examples? See the [full documentation here](https://j
4747
You can see the current and past versions using one of the following:
4848

4949
* the `git tag` command
50-
* the [releases page on Github](https://github.com/jolicode/slack-php-api/releases)
50+
* the [releases page on GitHub](https://github.com/jolicode/slack-php-api/releases)
5151
* the file listing the [changes between versions](CHANGELOG.md)
5252

5353
Finally, some meta documentation:

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,10 @@
4545
},
4646
"conflict": {
4747
"php-http/httplug": "< 2.0"
48+
},
49+
"config": {
50+
"allow-plugins": {
51+
"php-http/discovery": true
52+
}
4853
}
4954
}

generated/Endpoint/AdminAppsApprove.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolv
8888
}
8989

9090
/**
91-
* {@inheritdoc}
92-
*
9391
* @return \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponse200|\JoliCode\Slack\Api\Model\AdminAppsApprovePostResponsedefault|null
9492
*/
95-
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
93+
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
9694
{
95+
$status = $response->getStatusCode();
96+
$body = (string) $response->getBody();
9797
if (200 === $status) {
9898
return $serializer->deserialize($body, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200', 'json');
9999
}

generated/Endpoint/AdminAppsApprovedList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver
7575
}
7676

7777
/**
78-
* {@inheritdoc}
79-
*
8078
* @return \JoliCode\Slack\Api\Model\AdminAppsApprovedListGetResponse200|\JoliCode\Slack\Api\Model\AdminAppsApprovedListGetResponsedefault|null
8179
*/
82-
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
80+
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
8381
{
82+
$status = $response->getStatusCode();
83+
$body = (string) $response->getBody();
8484
if (200 === $status) {
8585
return $serializer->deserialize($body, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200', 'json');
8686
}

generated/Endpoint/AdminAppsRequestsList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver
7373
}
7474

7575
/**
76-
* {@inheritdoc}
77-
*
7876
* @return \JoliCode\Slack\Api\Model\AdminAppsRequestsListGetResponse200|\JoliCode\Slack\Api\Model\AdminAppsRequestsListGetResponsedefault|null
7977
*/
80-
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
78+
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
8179
{
80+
$status = $response->getStatusCode();
81+
$body = (string) $response->getBody();
8282
if (200 === $status) {
8383
return $serializer->deserialize($body, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200', 'json');
8484
}

generated/Endpoint/AdminAppsRestrict.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolv
8888
}
8989

9090
/**
91-
* {@inheritdoc}
92-
*
9391
* @return \JoliCode\Slack\Api\Model\AdminAppsRestrictPostResponse200|\JoliCode\Slack\Api\Model\AdminAppsRestrictPostResponsedefault|null
9492
*/
95-
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
93+
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
9694
{
95+
$status = $response->getStatusCode();
96+
$body = (string) $response->getBody();
9797
if (200 === $status) {
9898
return $serializer->deserialize($body, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200', 'json');
9999
}

generated/Endpoint/AdminAppsRestrictedList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver
7575
}
7676

7777
/**
78-
* {@inheritdoc}
79-
*
8078
* @return \JoliCode\Slack\Api\Model\AdminAppsRestrictedListGetResponse200|\JoliCode\Slack\Api\Model\AdminAppsRestrictedListGetResponsedefault|null
8179
*/
82-
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
80+
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
8381
{
82+
$status = $response->getStatusCode();
83+
$body = (string) $response->getBody();
8484
if (200 === $status) {
8585
return $serializer->deserialize($body, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200', 'json');
8686
}

0 commit comments

Comments
 (0)