@@ -29,7 +29,7 @@ class CompatibilityCheckCommand extends AbstractCommand
2929 private const OPTION_SHOW_ALL = 'show-all ' ;
3030 private const OPTION_THIRD_PARTY_ONLY = 'third-party-only ' ;
3131 private const OPTION_INCLUDE_CORE = 'include-core ' ;
32- private const OPTION_EXCLUDE_VENDOR = 'exclude -vendor ' ;
32+ private const OPTION_INCLUDE_VENDOR = 'include -vendor ' ;
3333 private const OPTION_DETAILED = 'detailed ' ;
3434
3535 private const DISPLAY_MODE_ISSUES = 'issues ' ;
@@ -78,10 +78,10 @@ protected function configure(): void
7878 'Include Magento core modules (default: third-party modules only) ' ,
7979 )
8080 ->addOption (
81- self ::OPTION_EXCLUDE_VENDOR ,
81+ self ::OPTION_INCLUDE_VENDOR ,
8282 null ,
8383 InputOption::VALUE_NONE ,
84- 'Exclude modules installed in the vendor directory ' ,
84+ 'Include modules installed in the vendor directory (default: excluded) ' ,
8585 )
8686 ->addOption (
8787 self ::OPTION_DETAILED ,
@@ -101,9 +101,7 @@ protected function configure(): void
101101 protected function executeCommand (InputInterface $ input , OutputInterface $ output ): int
102102 {
103103 // Validate conflicting options early
104- if ($ input ->getOption (self ::OPTION_THIRD_PARTY_ONLY )
105- && $ input ->getOption (self ::OPTION_INCLUDE_CORE )
106- ) {
104+ if ($ input ->getOption (self ::OPTION_THIRD_PARTY_ONLY ) && $ input ->getOption (self ::OPTION_INCLUDE_CORE )) {
107105 $ this ->io ->error ('The options --third-party-only and --include-core cannot be used together. ' );
108106
109107 return Cli::RETURN_FAILURE ;
@@ -114,7 +112,7 @@ protected function executeCommand(InputInterface $input, OutputInterface $output
114112 (bool ) $ input ->getOption (self ::OPTION_SHOW_ALL )
115113 || (bool ) $ input ->getOption (self ::OPTION_THIRD_PARTY_ONLY )
116114 || (bool ) $ input ->getOption (self ::OPTION_INCLUDE_CORE )
117- || (bool ) $ input ->getOption (self ::OPTION_EXCLUDE_VENDOR )
115+ || (bool ) $ input ->getOption (self ::OPTION_INCLUDE_VENDOR )
118116 || (bool ) $ input ->getOption (self ::OPTION_DETAILED );
119117
120118 if (!$ hasOptions && $ this ->isInteractiveTerminal ($ output )) {
@@ -178,7 +176,7 @@ private function runInteractiveMode(InputInterface $input, OutputInterface $outp
178176 $ incompatibleOnly = $ displayMode === self ::DISPLAY_MODE_INCOMPATIBLE_ONLY ;
179177 $ includeCore = $ scope === self ::SCOPE_ALL ;
180178 $ thirdPartyOnly = false ; // Not needed in interactive mode
181- $ excludeVendor = false ; // Not configurable in interactive mode
179+ $ includeVendor = false ; // Vendor modules excluded by default in interactive mode
182180
183181 // Show selected configuration
184182 $ this ->io ->newLine ();
@@ -202,7 +200,7 @@ private function runInteractiveMode(InputInterface $input, OutputInterface $outp
202200 $ showAll ,
203201 $ thirdPartyOnly ,
204202 $ includeCore ,
205- $ excludeVendor ,
203+ $ includeVendor ,
206204 $ detailed ,
207205 $ incompatibleOnly ,
208206 );
@@ -229,23 +227,23 @@ private function runDirectMode(InputInterface $input, OutputInterface $output):
229227 $ showAll = (bool ) $ input ->getOption (self ::OPTION_SHOW_ALL );
230228 $ thirdPartyOnly = (bool ) $ input ->getOption (self ::OPTION_THIRD_PARTY_ONLY );
231229 $ includeCore = (bool ) $ input ->getOption (self ::OPTION_INCLUDE_CORE );
232- $ excludeVendor = (bool ) $ input ->getOption (self ::OPTION_EXCLUDE_VENDOR );
230+ $ includeVendor = (bool ) $ input ->getOption (self ::OPTION_INCLUDE_VENDOR );
233231 $ detailed = (bool ) $ input ->getOption (self ::OPTION_DETAILED );
234232
235233 $ this ->io ->title ('Hyvä Theme Compatibility Check ' );
236234
237235 if ($ this ->isVerbose ($ output )) {
238236 $ this ->io ->info (sprintf (
239- 'Direct mode: showAll=%s, thirdPartyOnly=%s, includeCore=%s, excludeVendor =%s, detailed=%s ' ,
237+ 'Direct mode: showAll=%s, thirdPartyOnly=%s, includeCore=%s, includeVendor =%s, detailed=%s ' ,
240238 $ showAll ? 'true ' : 'false ' ,
241239 $ thirdPartyOnly ? 'true ' : 'false ' ,
242240 $ includeCore ? 'true ' : 'false ' ,
243- $ excludeVendor ? 'true ' : 'false ' ,
241+ $ includeVendor ? 'true ' : 'false ' ,
244242 $ detailed ? 'true ' : 'false ' ,
245243 ));
246244 }
247245
248- return $ this ->runScan ($ showAll , $ thirdPartyOnly , $ includeCore , $ excludeVendor , $ detailed , false );
246+ return $ this ->runScan ($ showAll , $ thirdPartyOnly , $ includeCore , $ includeVendor , $ detailed , false );
249247 }
250248
251249 /**
@@ -254,7 +252,7 @@ private function runDirectMode(InputInterface $input, OutputInterface $output):
254252 * @param bool $showAll
255253 * @param bool $thirdPartyOnly
256254 * @param bool $includeCore
257- * @param bool $excludeVendor
255+ * @param bool $includeVendor
258256 * @param bool $detailed
259257 * @param bool $incompatibleOnly
260258 * @return int
@@ -263,18 +261,18 @@ private function runScan(
263261 bool $ showAll ,
264262 bool $ thirdPartyOnly ,
265263 bool $ includeCore ,
266- bool $ excludeVendor ,
264+ bool $ includeVendor ,
267265 bool $ detailed ,
268266 bool $ incompatibleOnly ,
269267 ): int {
270268 // Determine filter logic:
271- // - thirdPartyOnly: Only scan non-Magento_* modules (default behavior)
269+ // - thirdPartyOnly: Only scan non-Magento_* modules
272270 // - includeCore: Also scan Magento_* core modules
273- // - excludeVendor : Whether to exclude modules installed in vendor/
274- $ scanThirdPartyOnly = !$ includeCore ;
271+ // - includeVendor : Whether to include modules installed in vendor/
272+ $ scanThirdPartyOnly = $ thirdPartyOnly || !$ includeCore ;
275273
276274 // Run the compatibility check
277- $ results = $ this ->compatibilityChecker ->check ($ this ->io , $ showAll , $ scanThirdPartyOnly , $ excludeVendor );
275+ $ results = $ this ->compatibilityChecker ->check ($ this ->io , $ showAll , $ scanThirdPartyOnly , ! $ includeVendor );
278276
279277 // Determine display mode:
280278 // showAll = show all modules including compatible ones
0 commit comments