@@ -55,6 +55,8 @@ class SupportCollector implements CollectorInterface
5555
5656 const ORIGIN = 'Adobe Commerce Support ' ;
5757
58+ const PROP_REQUIREMENTS = 'requirements ' ;
59+
5860 /**
5961 * @var Package
6062 */
@@ -113,6 +115,7 @@ public function collect(): array
113115 $ category = !empty ($ patchGeneralConfig [self ::PROP_CATEGORIES ])
114116 ? array_map ('trim ' , $ patchGeneralConfig [self ::PROP_CATEGORIES ])
115117 : ['Other ' ];
118+ $ patchRequirements = $ patchGeneralConfig [self ::PROP_REQUIREMENTS ] ?? '' ;
116119
117120 if ($ this ->package ->matchConstraint ($ packageName , $ packageConstraint )) {
118121 $ result [] = $ this ->createPatch (
@@ -124,7 +127,8 @@ public function collect(): array
124127 $ packageConstraint ,
125128 $ patchRequire ,
126129 $ patchReplacedWith ,
127- $ patchDeprecated
130+ $ patchDeprecated ,
131+ $ patchRequirements
128132 );
129133 }
130134 }
@@ -145,9 +149,11 @@ public function collect(): array
145149 * @param array $patchRequire
146150 * @param string $patchReplacedWith
147151 * @param bool $patchDeprecated
152+ * @param string $patchRequirements
148153 *
149154 * @return PatchInterface
150155 * @throws CollectorException
156+ * @SuppressWarnings(PHPMD.ExcessiveParameterList)
151157 */
152158 private function createPatch (
153159 string $ patchId ,
@@ -158,7 +164,8 @@ private function createPatch(
158164 string $ packageConstraint ,
159165 array $ patchRequire ,
160166 string $ patchReplacedWith ,
161- bool $ patchDeprecated
167+ bool $ patchDeprecated ,
168+ string $ patchRequirements
162169 ): PatchInterface {
163170 try {
164171 $ patchPath = $ this ->qualityPackage ->getPatchesDirectoryPath () . '/ ' . $ patchFile ;
@@ -174,6 +181,7 @@ private function createPatch(
174181 $ this ->patchBuilder ->setRequire ($ patchRequire );
175182 $ this ->patchBuilder ->setReplacedWith ($ patchReplacedWith );
176183 $ this ->patchBuilder ->setDeprecated ($ patchDeprecated );
184+ $ this ->patchBuilder ->setRequirements ($ patchRequirements );
177185 $ patch = $ this ->patchBuilder ->build ();
178186 } catch (PatchIntegrityException $ e ) {
179187 throw new CollectorException ($ e ->getMessage (), $ e ->getCode (), $ e );
0 commit comments