Skip to content

Commit 5333dda

Browse files
author
symfonyaml
committed
Remove group in CI + added phpdoc on video constraints
1 parent c96f852 commit 5333dda

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

.github/workflows/unit-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ jobs:
6565
6666
- name: Install system dependencies
6767
run: |
68-
echo "::group::install tools & libraries"
6968
sudo apt-get install ffmpeg
70-
echo "::endgroup::"
7169
7270
- name: Configure environment
7371
run: |

src/Symfony/Component/Validator/Constraints/Video.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,35 @@ class Video extends File
8686
public string $allowPortraitMessage = 'The video is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented videos are not allowed.';
8787
public string $corruptedMessage = 'The video file is corrupted.';
8888

89+
/**
90+
* @param positive-int|string|null $maxSize The max size of the underlying file
91+
* @param bool|null $binaryFormat Pass true to use binary-prefixed units (KiB, MiB, etc.) or false to use SI-prefixed units (kB, MB) in displayed messages. Pass null to guess the format from the maxSize option. (defaults to null)
92+
* @param non-empty-string[]|null $mimeTypes Acceptable media types
93+
* @param positive-int|null $filenameMaxLength Maximum length of the file name
94+
* @param string|null $disallowEmptyMessage Enable empty upload validation with this message in case of error
95+
* @param string|null $uploadIniSizeErrorMessage Message if the file size exceeds the max size configured in php.ini
96+
* @param string|null $uploadFormSizeErrorMessage Message if the file size exceeds the max size configured in the HTML input field
97+
* @param string|null $uploadPartialErrorMessage Message if the file is only partially uploaded
98+
* @param string|null $uploadNoTmpDirErrorMessage Message if there is no upload_tmp_dir in php.ini
99+
* @param string|null $uploadCantWriteErrorMessage Message if the uploaded file can not be stored in the temporary directory
100+
* @param string|null $uploadErrorMessage Message if an unknown error occurred on upload
101+
* @param string[]|null $groups
102+
* @param int<0, int>|null $minWidth Minimum video width
103+
* @param positive-int|null $maxWidth Maximum video width
104+
* @param positive-int|null $maxHeight Maximum video height
105+
* @param int<0, int>|null $minHeight Minimum video weight
106+
* @param positive-int|float|null $maxRatio Maximum video ratio
107+
* @param int<0, max>|float|null $minRatio Minimum video ratio
108+
* @param int<0, max>|float|null $minPixels Minimum amount of pixels
109+
* @param positive-int|float|null $maxPixels Maximum amount of pixels
110+
* @param bool|null $allowSquare Whether to allow a square video (defaults to true)
111+
* @param bool|null $allowLandscape Whether to allow a landscape video (defaults to true)
112+
* @param bool|null $allowPortrait Whether to allow a portrait video (defaults to true)
113+
* @param bool|null $detectCorrupted Whether to validate the video is not corrupted (defaults to false)
114+
* @param string|null $sizeNotDetectedMessage Message if the system can not determine video size and there is a size constraint to validate
115+
*
116+
* @see https://www.iana.org/assignments/media-types/media-types.xhtml Existing media types
117+
*/
89118
#[HasNamedArguments]
90119
public function __construct(
91120
int|string|null $maxSize = null,

0 commit comments

Comments
 (0)