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

Fix compat of commands with Symfony 5 #7876

Merged
merged 1 commit into from Oct 23, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -116,15 +116,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
)
);

return;
return 0;
}

if ($input->getOption('all')) {
$ui->comment('Clearing <info>all</info> second-level cache collection regions');

$cache->evictEntityRegions();

return;
return 0;
}

if ($ownerId) {
Expand All @@ -138,10 +138,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
);
$cache->evictCollection($ownerClass, $assoc, $ownerId);

return;
return 0;
}

$ui->comment(sprintf('Clearing second-level cache for collection <info>"%s#%s"</info>', $ownerClass, $assoc));
$cache->evictCollectionRegion($ownerClass, $assoc);

return 0;
}
}
Expand Up @@ -108,15 +108,15 @@ protected function execute(InputInterface $input, OutputInterface $output)

$ui->comment(sprintf('Flushing cache provider configured for entity named <info>"%s"</info>', $entityClass));

return;
return 0;
}

if ($input->getOption('all')) {
$ui->comment('Clearing <info>all</info> second-level cache entity regions');

$cache->evictEntityRegions();

return;
return 0;
}

if ($entityId) {
Expand All @@ -129,10 +129,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
);
$cache->evictEntity($entityClass, $entityId);

return;
return 0;
}

$ui->comment(sprintf('Clearing second-level cache for entity <info>"%s"</info>', $entityClass));
$cache->evictEntityRegion($entityClass);

return 0;
}
}
Expand Up @@ -112,18 +112,20 @@ protected function execute(InputInterface $input, OutputInterface $output)
)
);

return;
return 0;
}

if ($input->getOption('all')) {
$ui->comment('Clearing <info>all</info> second-level cache query regions');

$cache->evictQueryRegions();

return;
return 0;
}

$ui->comment(sprintf('Clearing second-level cache query region named <info>"%s"</info>', $name));
$cache->evictQueryRegion($name);

return 0;
}
}
Expand Up @@ -127,6 +127,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$numSpaces = $input->getOption('num-spaces');

$this->convertDoctrine1Schema($fromPaths, $destPath, $toType, $numSpaces, $extend, $output);

return 0;
}

/**
Expand Down
Expand Up @@ -167,6 +167,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$destPath
)
);

return 0;
}

/**
Expand Down
Expand Up @@ -112,7 +112,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

if (empty($metadatas)) {
$ui->success('No Metadata Classes to process.');
return;
return 0;
}

$entityGenerator = new EntityGenerator();
Expand All @@ -138,5 +138,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
// Outputting information message
$ui->newLine();
$ui->success(sprintf('Entity classes generated to "%s"', $destPath));

return 0;
}
}
Expand Up @@ -91,7 +91,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

if (empty($metadatas)) {
$ui->success('No Metadata Classes to process.');
return;
return 0;
}

foreach ($metadatas as $metadata) {
Expand All @@ -104,5 +104,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
// Outputting information message
$ui->newLine();
$ui->text(sprintf('Proxy classes generated to "<info>%s</info>"', $destPath));

return 0;
}
}
Expand Up @@ -84,7 +84,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

if (empty($metadatas)) {
$ui->success('No Metadata Classes to process.');
return;
return 0;
}

$numRepositories = 0;
Expand All @@ -104,11 +104,13 @@ protected function execute(InputInterface $input, OutputInterface $output)

if ($numRepositories === 0) {
$ui->text('No Repository classes were found to be processed.');
return;
return 0;
}

// Outputting information message
$ui->newLine();
$ui->text(sprintf('Repository classes generated to "<info>%s</info>"', $destPath));

return 0;
}
}
4 changes: 3 additions & 1 deletion lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php
Expand Up @@ -104,11 +104,13 @@ protected function execute(InputInterface $input, OutputInterface $output)

if ($input->getOption('show-sql')) {
$ui->text($query->getSQL());
return;
return 0;
}

$resultSet = $query->execute([], constant($hydrationMode));

$ui->text(Debug::dump($resultSet, $input->getOption('depth'), true, false));

return 0;
}
}