Skip to content

Add dump-parameters command#1702

Merged
ondrejmirtes merged 6 commits intophpstan:1.8.xfrom
rvanvelzen:dump-config
Sep 6, 2022
Merged

Add dump-parameters command#1702
ondrejmirtes merged 6 commits intophpstan:1.8.xfrom
rvanvelzen:dump-config

Conversation

@rvanvelzen
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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