Skip to content

Conversation

rvanvelzen
Copy link
Contributor

Inspired by phpstan/phpstan#7942. Not saying this is a good idea, but the implementation is almost trivial :)

new InputArgument('paths', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Paths with source code to run analysis on'),
new InputOption('configuration', 'c', InputOption::VALUE_REQUIRED, 'Path to project configuration file'),
new InputOption(AnalyseCommand::OPTION_LEVEL, 'l', InputOption::VALUE_REQUIRED, 'Level of rule options - the higher the stricter'),
new InputOption('autoload-file', 'a', InputOption::VALUE_REQUIRED, 'Project\'s additional autoload file path'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove paths, but add memory-limit here.

Basically the arguments/options should mirror ClearResultCacheCommand, and add level because that influences the loaded file :)

@ondrejmirtes
Copy link
Member

What about the paths? I don't think they influence anything. Also maybe we could unset these parameters as they're really internal (the tempDir is especially confusing - the user-facing one is called tmpDir):

# irrelevant Nette parameters
debugMode: bool()
productionMode: bool()
tempDir: string()
__validate: bool()

And also maybe remove these:

# internal - static reflection
singleReflectionFile: schema(string(), nullable())
singleReflectionInsteadOfFile: schema(string(), nullable())

@rvanvelzen rvanvelzen changed the title Add dump-config command Add dump-parameters command Sep 6, 2022
@rvanvelzen
Copy link
Contributor Author

Hmm, so lint wants me to add the trailing comma, but the downgrade doesn't remove it so it doesn't work on <7.3 😞

@ondrejmirtes
Copy link
Member

Is it the trailing comma in the unset? That's probably a Rector downgrade bug. You can unset each key individually on a separate line I guess.

@rvanvelzen rvanvelzen marked this pull request as ready for review September 6, 2022 09:10
@ondrejmirtes ondrejmirtes merged commit f050e24 into phpstan:1.8.x Sep 6, 2022
@ondrejmirtes
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants