Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d6b1f3

Browse files
nicolas-grekaslcobucci
authored andcommitted
Fix compat of commands with Symfony 5
1 parent d9c30e3 commit 4d6b1f3

9 files changed

Lines changed: 31 additions & 13 deletions

lib/Doctrine/ORM/Tools/Console/Command/ClearCache/CollectionRegionCommand.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
116116
)
117117
);
118118

119-
return;
119+
return 0;
120120
}
121121

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

125125
$cache->evictEntityRegions();
126126

127-
return;
127+
return 0;
128128
}
129129

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

141-
return;
141+
return 0;
142142
}
143143

144144
$ui->comment(sprintf('Clearing second-level cache for collection <info>"%s#%s"</info>', $ownerClass, $assoc));
145145
$cache->evictCollectionRegion($ownerClass, $assoc);
146+
147+
return 0;
146148
}
147149
}

lib/Doctrine/ORM/Tools/Console/Command/ClearCache/EntityRegionCommand.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
108108

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

111-
return;
111+
return 0;
112112
}
113113

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

117117
$cache->evictEntityRegions();
118118

119-
return;
119+
return 0;
120120
}
121121

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

132-
return;
132+
return 0;
133133
}
134134

135135
$ui->comment(sprintf('Clearing second-level cache for entity <info>"%s"</info>', $entityClass));
136136
$cache->evictEntityRegion($entityClass);
137+
138+
return 0;
137139
}
138140
}

lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryRegionCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,20 @@ protected function execute(InputInterface $input, OutputInterface $output)
112112
)
113113
);
114114

115-
return;
115+
return 0;
116116
}
117117

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

121121
$cache->evictQueryRegions();
122122

123-
return;
123+
return 0;
124124
}
125125

126126
$ui->comment(sprintf('Clearing second-level cache query region named <info>"%s"</info>', $name));
127127
$cache->evictQueryRegion($name);
128+
129+
return 0;
128130
}
129131
}

lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
127127
$numSpaces = $input->getOption('num-spaces');
128128

129129
$this->convertDoctrine1Schema($fromPaths, $destPath, $toType, $numSpaces, $extend, $output);
130+
131+
return 0;
130132
}
131133

132134
/**

lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
167167
$destPath
168168
)
169169
);
170+
171+
return 0;
170172
}
171173

172174
/**

lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
112112

113113
if (empty($metadatas)) {
114114
$ui->success('No Metadata Classes to process.');
115-
return;
115+
return 0;
116116
}
117117

118118
$entityGenerator = new EntityGenerator();
@@ -138,5 +138,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
138138
// Outputting information message
139139
$ui->newLine();
140140
$ui->success(sprintf('Entity classes generated to "%s"', $destPath));
141+
142+
return 0;
141143
}
142144
}

lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9191

9292
if (empty($metadatas)) {
9393
$ui->success('No Metadata Classes to process.');
94-
return;
94+
return 0;
9595
}
9696

9797
foreach ($metadatas as $metadata) {
@@ -104,5 +104,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
104104
// Outputting information message
105105
$ui->newLine();
106106
$ui->text(sprintf('Proxy classes generated to "<info>%s</info>"', $destPath));
107+
108+
return 0;
107109
}
108110
}

lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8484

8585
if (empty($metadatas)) {
8686
$ui->success('No Metadata Classes to process.');
87-
return;
87+
return 0;
8888
}
8989

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

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

110110
// Outputting information message
111111
$ui->newLine();
112112
$ui->text(sprintf('Repository classes generated to "<info>%s</info>"', $destPath));
113+
114+
return 0;
113115
}
114116
}

lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
104104

105105
if ($input->getOption('show-sql')) {
106106
$ui->text($query->getSQL());
107-
return;
107+
return 0;
108108
}
109109

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

112112
$ui->text(Debug::dump($resultSet, $input->getOption('depth'), true, false));
113+
114+
return 0;
113115
}
114116
}

0 commit comments

Comments
 (0)