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

Drop dependency on doctrine/common #1896

Merged
merged 3 commits into from
Nov 25, 2018
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
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@
"doctrine/annotations": "^1.6",
"doctrine/cache": "^1.7",
"doctrine/collections": "^1.5",
"doctrine/common": "^2.9",
"doctrine/event-manager": "^1.0",
"doctrine/instantiator": "^1.1",
"doctrine/persistence": "^1.1",
"mongodb/mongodb": "^1.2.0",
"ocramius/proxy-manager": "^2.2",
"symfony/console": "^3.4|^4.1"
"symfony/console": "^3.4|^4.1",
"symfony/var-dumper": "^4.1"
},
"require-dev": {
"doctrine/coding-standard": "^5.0",
Expand Down
14 changes: 0 additions & 14 deletions lib/Doctrine/ODM/MongoDB/Proxy/Proxy.php

This file was deleted.

17 changes: 2 additions & 15 deletions lib/Doctrine/ODM/MongoDB/Tools/Console/Command/QueryCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Doctrine\ODM\MongoDB\Tools\Console\Command;

use Doctrine\Common\Util\Debug;
use LogicException;
use Symfony\Component\Console;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use function dump;
use function is_numeric;
use function json_decode;

Expand Down Expand Up @@ -54,13 +54,6 @@ protected function configure()
InputOption::VALUE_REQUIRED,
'The number of documents to return.'
),
new InputOption(
'depth',
null,
InputOption::VALUE_REQUIRED,
'Dumping depth of Document graph.',
7
),
])
->setHelp(<<<EOT
Execute a query and output the results.
Expand All @@ -78,12 +71,6 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
$qb->setQueryArray((array) json_decode($input->getArgument('query')));
$qb->hydrate((bool) $input->getOption('hydrate'));

$depth = $input->getOption('depth');

if (! is_numeric($depth)) {
throw new LogicException("Option 'depth' must contain an integer value");
}

$skip = $input->getOption('skip');
if ($skip !== null) {
if (! is_numeric($skip)) {
Expand All @@ -103,7 +90,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
}

foreach ($qb->getQuery() as $result) {
Debug::dump($result, $depth);
dump($result);
}
}
}