Skip to content

Commit 86f0b47

Browse files
chore(jane): Rebuild the full SDK with latest Jane release and drop PHP 7 / SF 5 (#166)
Refs: #164
1 parent 9a96bb9 commit 86f0b47

File tree

456 files changed

+61278
-26776
lines changed

Some content is hidden

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

456 files changed

+61278
-26776
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ jobs:
4444
strategy:
4545
fail-fast: false
4646
matrix:
47-
php-version: [ '7.4', '8.0', '8.1' ]
47+
php-version: [ '8.0', '8.1', '8.2' ]
4848
composer-flags: [ '' ]
4949
name: [ '' ]
5050
include:
51-
- php-version: 7.4
51+
- php-version: 8.0
5252
composer-flags: '--prefer-lowest'
5353
name: '(prefer lowest dependencies)'
5454

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changes between versions
22

3+
## 4.7.0 (2024-01-31)
4+
5+
* Upgrade JanePHP generated code
6+
* Drop support for PHP 7 and Symfony 5
7+
38
## 4.6.0 (2023-11-10)
49

510
* Upgrade JanePHP generated code

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,22 @@
2626
}
2727
},
2828
"require": {
29-
"php": ">=7.4",
30-
"jane-php/open-api-runtime": "~7.1",
29+
"php": ">=8.0",
30+
"jane-php/open-api-runtime": "~7.6.0",
3131
"psr/http-client-implementation": "*",
3232
"php-http/client-common": "^1.9 || ^2.0",
3333
"php-http/discovery": "^1.11",
3434
"php-http/multipart-stream-builder": "^1.1"
3535
},
3636
"require-dev": {
37-
"jane-php/open-api-2": "~7.1",
38-
"symfony/http-client": "^5.4 || ^6.0",
37+
"jane-php/open-api-2": "~v7.6.0",
38+
"symfony/http-client": "^6.0 || ^7.0",
3939
"nyholm/psr7": "^1.2",
4040
"friendsofphp/php-cs-fixer": "^3.2.2",
41-
"symfony/phpunit-bridge": "^5.4 || ^6.0",
41+
"symfony/phpunit-bridge": "^6.0 || ^7.0",
4242
"opis/json-schema": "^1.0",
43-
"symfony/console": "^5.4 || ^6.0",
44-
"symfony/process": "^5.4 || ^6.0"
43+
"symfony/console": "^6.0 || ^7.0",
44+
"symfony/process": "^6.0 || ^7.0"
4545
},
4646
"conflict": {
4747
"php-http/httplug": "< 2.0"

generated/Client.php

Lines changed: 176 additions & 176 deletions
Large diffs are not rendered by default.

generated/Normalizer/AdminAppsApprovePostResponse200Normalizer.php

Lines changed: 114 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -16,75 +16,141 @@
1616
use Jane\Component\JsonSchemaRuntime\Reference;
1717
use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray;
1818
use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait;
19+
use Symfony\Component\HttpKernel\Kernel;
1920
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
2021
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
2122
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
2223
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
2324
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
2425
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
2526

26-
class AdminAppsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface
27-
{
28-
use CheckArray;
29-
use DenormalizerAwareTrait;
30-
use NormalizerAwareTrait;
31-
use ValidatorTrait;
32-
33-
public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
27+
if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) {
28+
class AdminAppsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface
3429
{
35-
return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === $type;
36-
}
37-
38-
public function supportsNormalization($data, $format = null, array $context = []): bool
39-
{
40-
return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === \get_class($data);
41-
}
30+
use CheckArray;
31+
use DenormalizerAwareTrait;
32+
use NormalizerAwareTrait;
33+
use ValidatorTrait;
4234

43-
public function denormalize($data, $class, $format = null, array $context = [])
44-
{
45-
if (isset($data['$ref'])) {
46-
return new Reference($data['$ref'], $context['document-origin']);
35+
public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool
36+
{
37+
return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === $type;
4738
}
48-
if (isset($data['$recursiveRef'])) {
49-
return new Reference($data['$recursiveRef'], $context['document-origin']);
39+
40+
public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
41+
{
42+
return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === \get_class($data);
5043
}
51-
$object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponse200();
52-
if (null === $data || false === \is_array($data)) {
44+
45+
public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed
46+
{
47+
if (isset($data['$ref'])) {
48+
return new Reference($data['$ref'], $context['document-origin']);
49+
}
50+
if (isset($data['$recursiveRef'])) {
51+
return new Reference($data['$recursiveRef'], $context['document-origin']);
52+
}
53+
$object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponse200();
54+
if (null === $data || false === \is_array($data)) {
55+
return $object;
56+
}
57+
if (\array_key_exists('ok', $data) && null !== $data['ok']) {
58+
$object->setOk($data['ok']);
59+
unset($data['ok']);
60+
} elseif (\array_key_exists('ok', $data) && null === $data['ok']) {
61+
$object->setOk(null);
62+
}
63+
foreach ($data as $key => $value) {
64+
if (preg_match('/.*/', (string) $key)) {
65+
$object[$key] = $value;
66+
}
67+
}
68+
5369
return $object;
5470
}
55-
if (\array_key_exists('ok', $data) && null !== $data['ok']) {
56-
$object->setOk($data['ok']);
57-
unset($data['ok']);
58-
} elseif (\array_key_exists('ok', $data) && null === $data['ok']) {
59-
$object->setOk(null);
60-
}
61-
foreach ($data as $key => $value) {
62-
if (preg_match('/.*/', (string) $key)) {
63-
$object[$key] = $value;
71+
72+
public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string
73+
{
74+
$data = [];
75+
$data['ok'] = $object->getOk();
76+
foreach ($object as $key => $value) {
77+
if (preg_match('/.*/', (string) $key)) {
78+
$data[$key] = $value;
79+
}
6480
}
81+
82+
return $data;
6583
}
6684

67-
return $object;
85+
public function getSupportedTypes(string $format = null): array
86+
{
87+
return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false];
88+
}
6889
}
69-
70-
/**
71-
* @return array|string|int|float|bool|\ArrayObject|null
72-
*/
73-
public function normalize($object, $format = null, array $context = [])
90+
} else {
91+
class AdminAppsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface
7492
{
75-
$data = [];
76-
$data['ok'] = $object->getOk();
77-
foreach ($object as $key => $value) {
78-
if (preg_match('/.*/', (string) $key)) {
79-
$data[$key] = $value;
93+
use CheckArray;
94+
use DenormalizerAwareTrait;
95+
use NormalizerAwareTrait;
96+
use ValidatorTrait;
97+
98+
public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool
99+
{
100+
return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === $type;
101+
}
102+
103+
public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
104+
{
105+
return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === \get_class($data);
106+
}
107+
108+
public function denormalize($data, $type, $format = null, array $context = [])
109+
{
110+
if (isset($data['$ref'])) {
111+
return new Reference($data['$ref'], $context['document-origin']);
112+
}
113+
if (isset($data['$recursiveRef'])) {
114+
return new Reference($data['$recursiveRef'], $context['document-origin']);
115+
}
116+
$object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponse200();
117+
if (null === $data || false === \is_array($data)) {
118+
return $object;
119+
}
120+
if (\array_key_exists('ok', $data) && null !== $data['ok']) {
121+
$object->setOk($data['ok']);
122+
unset($data['ok']);
123+
} elseif (\array_key_exists('ok', $data) && null === $data['ok']) {
124+
$object->setOk(null);
80125
}
126+
foreach ($data as $key => $value) {
127+
if (preg_match('/.*/', (string) $key)) {
128+
$object[$key] = $value;
129+
}
130+
}
131+
132+
return $object;
81133
}
82134

83-
return $data;
84-
}
135+
/**
136+
* @return array|string|int|float|bool|\ArrayObject|null
137+
*/
138+
public function normalize($object, $format = null, array $context = [])
139+
{
140+
$data = [];
141+
$data['ok'] = $object->getOk();
142+
foreach ($object as $key => $value) {
143+
if (preg_match('/.*/', (string) $key)) {
144+
$data[$key] = $value;
145+
}
146+
}
85147

86-
public function getSupportedTypes(string $format = null): array
87-
{
88-
return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false];
148+
return $data;
149+
}
150+
151+
public function getSupportedTypes(string $format = null): array
152+
{
153+
return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false];
154+
}
89155
}
90156
}

0 commit comments

Comments
 (0)