Skip to content

Commit

Permalink
chore(jane): Rebuild the full SDK with latest Jane release and drop P…
Browse files Browse the repository at this point in the history
…HP 7 / SF 5 (#166)

Refs: #164
  • Loading branch information
damienalexandre committed Jan 31, 2024
1 parent 9a96bb9 commit 86f0b47
Show file tree
Hide file tree
Showing 456 changed files with 61,278 additions and 26,776 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [ '7.4', '8.0', '8.1' ]
php-version: [ '8.0', '8.1', '8.2' ]
composer-flags: [ '' ]
name: [ '' ]
include:
- php-version: 7.4
- php-version: 8.0
composer-flags: '--prefer-lowest'
name: '(prefer lowest dependencies)'

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changes between versions

## 4.7.0 (2024-01-31)

* Upgrade JanePHP generated code
* Drop support for PHP 7 and Symfony 5

## 4.6.0 (2023-11-10)

* Upgrade JanePHP generated code
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@
}
},
"require": {
"php": ">=7.4",
"jane-php/open-api-runtime": "~7.1",
"php": ">=8.0",
"jane-php/open-api-runtime": "~7.6.0",
"psr/http-client-implementation": "*",
"php-http/client-common": "^1.9 || ^2.0",
"php-http/discovery": "^1.11",
"php-http/multipart-stream-builder": "^1.1"
},
"require-dev": {
"jane-php/open-api-2": "~7.1",
"symfony/http-client": "^5.4 || ^6.0",
"jane-php/open-api-2": "~v7.6.0",
"symfony/http-client": "^6.0 || ^7.0",
"nyholm/psr7": "^1.2",
"friendsofphp/php-cs-fixer": "^3.2.2",
"symfony/phpunit-bridge": "^5.4 || ^6.0",
"symfony/phpunit-bridge": "^6.0 || ^7.0",
"opis/json-schema": "^1.0",
"symfony/console": "^5.4 || ^6.0",
"symfony/process": "^5.4 || ^6.0"
"symfony/console": "^6.0 || ^7.0",
"symfony/process": "^6.0 || ^7.0"
},
"conflict": {
"php-http/httplug": "< 2.0"
Expand Down
352 changes: 176 additions & 176 deletions generated/Client.php

Large diffs are not rendered by default.

162 changes: 114 additions & 48 deletions generated/Normalizer/AdminAppsApprovePostResponse200Normalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,75 +16,141 @@
use Jane\Component\JsonSchemaRuntime\Reference;
use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray;
use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

class AdminAppsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface
{
use CheckArray;
use DenormalizerAwareTrait;
use NormalizerAwareTrait;
use ValidatorTrait;

public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) {
class AdminAppsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface
{
return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === $type;
}

public function supportsNormalization($data, $format = null, array $context = []): bool
{
return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === \get_class($data);
}
use CheckArray;
use DenormalizerAwareTrait;
use NormalizerAwareTrait;
use ValidatorTrait;

public function denormalize($data, $class, $format = null, array $context = [])
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool
{
return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === $type;
}
if (isset($data['$recursiveRef'])) {
return new Reference($data['$recursiveRef'], $context['document-origin']);

public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
{
return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === \get_class($data);
}
$object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponse200();
if (null === $data || false === \is_array($data)) {

public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
}
if (isset($data['$recursiveRef'])) {
return new Reference($data['$recursiveRef'], $context['document-origin']);
}
$object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponse200();
if (null === $data || false === \is_array($data)) {
return $object;
}
if (\array_key_exists('ok', $data) && null !== $data['ok']) {
$object->setOk($data['ok']);
unset($data['ok']);
} elseif (\array_key_exists('ok', $data) && null === $data['ok']) {
$object->setOk(null);
}
foreach ($data as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
$object[$key] = $value;
}
}

return $object;
}
if (\array_key_exists('ok', $data) && null !== $data['ok']) {
$object->setOk($data['ok']);
unset($data['ok']);
} elseif (\array_key_exists('ok', $data) && null === $data['ok']) {
$object->setOk(null);
}
foreach ($data as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
$object[$key] = $value;

public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string
{
$data = [];
$data['ok'] = $object->getOk();
foreach ($object as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
$data[$key] = $value;
}
}

return $data;
}

return $object;
public function getSupportedTypes(string $format = null): array
{
return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false];
}
}

/**
* @return array|string|int|float|bool|\ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
} else {
class AdminAppsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface
{
$data = [];
$data['ok'] = $object->getOk();
foreach ($object as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
$data[$key] = $value;
use CheckArray;
use DenormalizerAwareTrait;
use NormalizerAwareTrait;
use ValidatorTrait;

public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool
{
return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === $type;
}

public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
{
return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === \get_class($data);
}

public function denormalize($data, $type, $format = null, array $context = [])
{
if (isset($data['$ref'])) {
return new Reference($data['$ref'], $context['document-origin']);
}
if (isset($data['$recursiveRef'])) {
return new Reference($data['$recursiveRef'], $context['document-origin']);
}
$object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponse200();
if (null === $data || false === \is_array($data)) {
return $object;
}
if (\array_key_exists('ok', $data) && null !== $data['ok']) {
$object->setOk($data['ok']);
unset($data['ok']);
} elseif (\array_key_exists('ok', $data) && null === $data['ok']) {
$object->setOk(null);
}
foreach ($data as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
$object[$key] = $value;
}
}

return $object;
}

return $data;
}
/**
* @return array|string|int|float|bool|\ArrayObject|null
*/
public function normalize($object, $format = null, array $context = [])
{
$data = [];
$data['ok'] = $object->getOk();
foreach ($object as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
$data[$key] = $value;
}
}

public function getSupportedTypes(string $format = null): array
{
return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false];
return $data;
}

public function getSupportedTypes(string $format = null): array
{
return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false];
}
}
}

0 comments on commit 86f0b47

Please sign in to comment.