File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public function dump(
5757 string $ fqcn ,
5858 array $ excludedTablesRegexes = [],
5959 bool $ formatted = false ,
60- bool $ nowdocOutput = false ,
60+ bool | null $ nowdocOutput = null ,
6161 int $ lineLength = 120 ,
6262 ): string {
6363 $ schema = $ this ->schemaManager ->introspectSchema ();
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ protected function configure(): void
6767 'nowdoc ' ,
6868 null ,
6969 InputOption::VALUE_NEGATABLE ,
70- 'Output the generated SQL as a nowdoc string (always active for formatted queries). ' ,
70+ 'Output the generated SQL as a nowdoc string (enabled by default for formatted queries). ' ,
7171 )
7272 ->addOption (
7373 'line-length ' ,
@@ -108,7 +108,8 @@ protected function execute(
108108 }
109109
110110 $ formatted = filter_var ($ input ->getOption ('formatted ' ), FILTER_VALIDATE_BOOLEAN );
111- $ nowdocOutput = filter_var ($ input ->getOption ('nowdoc ' ), FILTER_VALIDATE_BOOLEAN );
111+ $ nowdocOutput = $ input ->getOption ('nowdoc ' );
112+ $ nowdocOutput = $ nowdocOutput === null ? null : filter_var ($ input ->getOption ('nowdoc ' ), FILTER_VALIDATE_BOOLEAN );
112113 $ lineLength = (int ) $ input ->getOption ('line-length ' );
113114 $ allowEmptyDiff = $ input ->getOption ('allow-empty-diff ' );
114115 $ checkDbPlatform = filter_var ($ input ->getOption ('check-database-platform ' ), FILTER_VALIDATE_BOOLEAN );
Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ protected function configure(): void
5555 ->addOption (
5656 'nowdoc ' ,
5757 null ,
58- InputOption::VALUE_NONE ,
59- 'Output the generated SQL as a nowdoc string (always active for formatted queries). ' ,
58+ InputOption::VALUE_NEGATABLE ,
59+ 'Output the generated SQL as a nowdoc string (enabled by default for formatted queries). ' ,
6060 )
6161 ->addOption (
6262 'namespace ' ,
@@ -85,7 +85,8 @@ public function execute(
8585 OutputInterface $ output ,
8686 ): int {
8787 $ formatted = filter_var ($ input ->getOption ('formatted ' ), FILTER_VALIDATE_BOOLEAN );
88- $ nowdocOutput = filter_var ($ input ->getOption ('nowdoc ' ), FILTER_VALIDATE_BOOLEAN );
88+ $ nowdocOutput = $ input ->getOption ('nowdoc ' );
89+ $ nowdocOutput = $ nowdocOutput === null ? null : filter_var ($ input ->getOption ('nowdoc ' ), FILTER_VALIDATE_BOOLEAN );
8990 $ lineLength = (int ) $ input ->getOption ('line-length ' );
9091
9192 $ schemaDumper = $ this ->getDependencyFactory ()->getSchemaDumper ();
You can’t perform that action at this time.
0 commit comments