You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (is_dir($dir = $rootDir.'/Resources/translations')) {
140
-
if ($dir !== $this->defaultTransPath) {
141
-
$notice = sprintf('Storing translations in the "%s" directory is deprecated since Symfony 4.2, ', $dir);
142
-
@trigger_error($notice.($this->defaultTransPath ? sprintf('use the "%s" directory instead.', $this->defaultTransPath) : 'configure and use "framework.translator.default_path" instead.'), E_USER_DEPRECATED);
143
-
}
144
-
$transPaths[] = $dir;
145
-
}
146
138
if ($this->defaultTransPath) {
147
139
$transPaths[] = $this->defaultTransPath;
148
140
}
149
141
$viewsPaths = $this->viewsPaths;
150
-
if (is_dir($dir = $rootDir.'/Resources/views')) {
151
-
if ($dir !== $this->defaultViewsPath) {
152
-
$notice = sprintf('Loading Twig templates from the "%s" directory is deprecated since Symfony 4.2, ', $dir);
153
-
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : 'configure and use "twig.default_path" instead.'), E_USER_DEPRECATED);
154
-
}
155
-
$viewsPaths[] = $dir;
156
-
}
157
142
if ($this->defaultViewsPath) {
158
143
$viewsPaths[] = $this->defaultViewsPath;
159
144
}
@@ -166,39 +151,16 @@ protected function execute(InputInterface $input, OutputInterface $output)
166
151
if ($this->defaultTransPath) {
167
152
$transPaths[] = $this->defaultTransPath;
168
153
}
169
-
if (is_dir($dir = sprintf('%s/Resources/%s/translations', $rootDir, $bundle->getName()))) {
170
-
$transPaths[] = $dir;
171
-
$notice = sprintf('Storing translations files for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $dir, $bundle->getName());
172
-
@trigger_error($notice.($this->defaultTransPath ? sprintf('use the "%s" directory instead.', $this->defaultTransPath) : 'configure and use "framework.translator.default_path" instead.'), E_USER_DEPRECATED);
if (is_dir($dir = sprintf('%s/Resources/%s/views', $rootDir, $bundle->getName()))) {
179
-
$viewsPaths[] = $dir;
180
-
$notice = sprintf('Loading Twig templates for "%s" from the "%s" directory is deprecated since Symfony 4.2, ', $bundle->getName(), $dir);
181
-
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : 'configure and use "twig.default_path" instead.'), E_USER_DEPRECATED);
182
-
}
183
158
} catch (\InvalidArgumentException$e) {
184
159
// such a bundle does not exist, so treat the argument as path
185
160
$path = $input->getArgument('bundle');
186
161
187
162
$transPaths = [$path.'/translations'];
188
-
if (is_dir($dir = $path.'/Resources/translations')) {
189
-
if ($dir !== $this->defaultTransPath) {
190
-
@trigger_error(sprintf('Storing translations in the "%s" directory is deprecated since Symfony 4.2, use the "%s" directory instead.', $dir, $path.'/translations'), E_USER_DEPRECATED);
191
-
}
192
-
$transPaths[] = $dir;
193
-
}
194
-
195
163
$viewsPaths = [$path.'/templates'];
196
-
if (is_dir($dir = $path.'/Resources/views')) {
197
-
if ($dir !== $this->defaultViewsPath) {
198
-
@trigger_error(sprintf('Loading Twig templates from the "%s" directory is deprecated since Symfony 4.2, use the "%s" directory instead.', $dir, $path.'/templates'), E_USER_DEPRECATED);
199
-
}
200
-
$viewsPaths[] = $dir;
201
-
}
202
164
203
165
if (!is_dir($transPaths[0]) && !isset($transPaths[1])) {
204
166
thrownewInvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.', $transPaths[0]));
@@ -207,17 +169,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (is_dir($deprecatedPath = sprintf('%s/Resources/%s/translations', $rootDir, $bundle->getName()))) {
211
-
$transPaths[] = $deprecatedPath;
212
-
$notice = sprintf('Storing translations files for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $bundle->getName(), $deprecatedPath);
213
-
@trigger_error($notice.($this->defaultTransPath ? sprintf('use the "%s" directory instead.', $this->defaultTransPath) : 'configure and use "framework.translator.default_path" instead.'), E_USER_DEPRECATED);
if (is_dir($deprecatedPath = sprintf('%s/Resources/%s/views', $rootDir, $bundle->getName()))) {
217
-
$viewsPaths[] = $deprecatedPath;
218
-
$notice = sprintf('Loading Twig templates for "%s" from the "%s" directory is deprecated since Symfony 4.2, ', $bundle->getName(), $deprecatedPath);
219
-
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : 'configure and use "twig.default_path" instead.'), E_USER_DEPRECATED);
* @expectedDeprecation Storing translations in the "%ssf_translation%s/Resources/translations" directory is deprecated since Symfony 4.2, use the "%ssf_translation%s/translations" directory instead.
71
-
* @expectedDeprecation Loading Twig templates from the "%ssf_translation%s/Resources/views" directory is deprecated since Symfony 4.2, use the "%ssf_translation%s/templates" directory instead.
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/Resources/translations/test_default.en.xlf
0 commit comments