Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide a couple of parameters from stack traces #629

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions generator/src/Commands/GenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ protected function configure(): void
;
}

protected function execute(InputInterface $input, OutputInterface $output): int
{

protected function execute(
// These aren't actually sensitive, they just fill the
// stack traces with tons of useless information.
#[\SensitiveParameter] InputInterface $input,
#[\SensitiveParameter] OutputInterface $output
): int {
$this->rmGenerated();

// Let's build the DTD necessary to load the XML files.
Expand Down
9 changes: 7 additions & 2 deletions generator/src/Generator/FileCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ class FileCreator
* @param Method[] $functions
* @param Method[] $missingFunctions
*/
public function generatePhpFile(array $functions, array $missingFunctions, string $path): void
{
public function generatePhpFile(
// These aren't actually sensitive, they just fill the
// stack traces with tons of useless information.
#[\SensitiveParameter] array $functions,
#[\SensitiveParameter] array $missingFunctions,
string $path
): void {
$path = rtrim($path, '/').'/';
$phpFunctionsByModule = [];
foreach ($functions as $function) {
Expand Down
Loading