Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for range integers + drop support for PHP 7.2 & 7.3 (#2236)
* range integers + test * backward-compatibility for < SF 6.0 which doesn't support positive-int & negative-int * tests fix * added missing description * fix order of expected required fields * changed test fixtures * add min phpdocumentor/type-resolver ver to composer * composer test * test for lowest dependencies with php 7.3 * bump phpdocumentor/type-resolver for test * update composer dependencies * remove php 7.2 backward-compatibility * drop support for PHP 7.3 + changelog updated * bump zircote/swagger-php version to 4.6.1 * adjusted changelog * force hateoas metadata cache to be cleared between tests * Update CHANGELOG.md Co-authored-by: Djordy Koert <djordy.koert@live.nl> --------- Co-authored-by: Bartłomiej Nowak <bartlomiej.nowak@workbuzz.com> Co-authored-by: DjordyKoert <djordy.koert@yoursurprise.com> Co-authored-by: Djordy Koert <djordy.koert@live.nl>
- Loading branch information
1 parent
7bc02c7
commit bbfe64a
Showing
10 changed files
with
231 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Nelmio\ApiDocBundle\Tests\Functional\Entity; | ||
|
||
use Symfony\Component\HttpKernel\Kernel; | ||
|
||
trait RangeIntegerTrait | ||
{ | ||
/** | ||
* @var int<1, 99> | ||
*/ | ||
public $rangeInt; | ||
|
||
/** | ||
* @var int<1, max> | ||
*/ | ||
public $minRangeInt; | ||
|
||
/** | ||
* @var int<min, 99> | ||
*/ | ||
public $maxRangeInt; | ||
|
||
/** | ||
* @var int<1, 99>|null | ||
*/ | ||
public $nullableRangeInt; | ||
} | ||
|
||
if (version_compare(Kernel::VERSION, '6.1', '>=')) { | ||
class RangeInteger | ||
{ | ||
use RangeIntegerTrait; | ||
|
||
/** | ||
* @var positive-int | ||
*/ | ||
public $positiveInt; | ||
|
||
/** | ||
* @var negative-int | ||
*/ | ||
public $negativeInt; | ||
} | ||
} else { | ||
class RangeInteger | ||
{ | ||
use RangeIntegerTrait; | ||
} | ||
} |
Oops, something went wrong.