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

Symfony 5 support #7899

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"doctrine/common": "^2.7.1",
"doctrine/dbal": "^2.6",
"doctrine/instantiator": "~1.1",
"symfony/console": "~3.0|~4.0"
"symfony/console": "^3.0|^4.0|^5.0"
},
"require-dev": {
"doctrine/coding-standard": "^5.0",
"phpunit/phpunit": "^7.5",
"symfony/yaml": "~3.4|~4.0"
"symfony/yaml": "^3.4|^4.0|^5.0"
},
"suggest": {
"symfony/yaml": "If you want to use YAML Metadata Mapping Driver"
Expand Down
158 changes: 78 additions & 80 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
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;
}
}
Original file line number Diff line number Diff line change
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;
}
}
Original file line number Diff line number Diff line change
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;
}
}
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$destPath
)
);

return 0;
}

/**
Expand Down
Original file line number Diff line number Diff line change
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;
}
}
Original file line number Diff line number Diff line change
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;
}
}
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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;
}
}