for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace JMS\Serializer\Annotation;
use Composer\Semver\Semver as ComposerSemver;
/**
* @Annotation
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
*/
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)]
final class VersionConstraints extends Version
{
public function __construct($values = [], ?string $version = null)
if (!class_exists(ComposerSemver::class)) {
throw new \LogicException(sprintf('composer/semver must be installed to use "%s".', self::class));
}
parent::__construct($values, $version);