Skip to content
This repository was archived by the owner on Dec 15, 2024. It is now read-only.

Commit 92b7f81

Browse files
chg: update symfony to 5.4; small config bug
1 parent a693f1b commit 92b7f81

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^7.4|^8.0",
14-
"symfony/framework-bundle": "^5.3",
15-
"symfony/translation": "^5.3",
16-
"symfony/cache": "^5.3"
13+
"php": "^7.4|^8.0|^8.1",
14+
"symfony/framework-bundle": "^5.4",
15+
"symfony/translation": "^5.4",
16+
"symfony/cache": "^5.4"
1717
},
1818
"autoload": {
1919
"psr-4": {
@@ -26,7 +26,7 @@
2626
}
2727
},
2828
"require-dev": {
29-
"symfony/phpunit-bridge": "^5.3",
29+
"symfony/phpunit-bridge": "^5.4",
3030
"friendsofphp/php-cs-fixer": "^2.16"
3131
}
3232
}

src/Command/TranslationReloadCommand.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected function configure()
3030
$this
3131
->setDescription('Reloads all the translations from your chosen GoogleSheet.')
3232
->setHelp('Usage: ... phiil:translation:reload --exclude=de,en')
33-
;
33+
;
3434
}
3535

3636
protected function execute(InputInterface $input, OutputInterface $output)
@@ -47,7 +47,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
4747
return 1;
4848
}
4949

50-
$setupLog = $this->_setupTranslationDirectory($locales);
50+
$setupLog = $this->setupTranslationDirectory($locales);
5151

5252
if (!empty($setupLog)) {
5353
foreach ($setupLog as $logItem) {
@@ -73,21 +73,21 @@ protected function execute(InputInterface $input, OutputInterface $output)
7373
/**
7474
* Create the ./translations directory if it doesn't exist and touch files to prepare the translation loader
7575
*/
76-
private function _setupTranslationDirectory(array $locales) :array
76+
private function setupTranslationDirectory(array $locales) :array
7777
{
7878
$filesystem = new Filesystem();
7979
$log = [];
8080

81-
$this->_createTranslationsDirectory($filesystem, $log);
82-
$this->_touchStandardFiles($filesystem, $locales, $log);
81+
$this->createTranslationsDirectory($filesystem, $log);
82+
$this->touchStandardFiles($filesystem, $locales, $log);
8383

8484
return $log;
8585
}
8686

8787
/**
8888
* Make sure that the translations directory exists
8989
*/
90-
private function _createTranslationsDirectory(Filesystem $filesystem, array &$log, string $directoryName = 'translations')
90+
private function createTranslationsDirectory(Filesystem $filesystem, array &$log, string $directoryName = 'translations')
9191
{
9292
if (!$filesystem->exists('./' . $directoryName)) {
9393
$filesystem->mkdir('./' . $directoryName);
@@ -98,7 +98,7 @@ private function _createTranslationsDirectory(Filesystem $filesystem, array &$lo
9898
/**
9999
* If these files don't exist the translation loader doesn't work
100100
*/
101-
private function _touchStandardFiles(FileSystem $filesystem, array $locales, array &$log)
101+
private function touchStandardFiles(FileSystem $filesystem, array $locales, array &$log)
102102
{
103103
foreach ($locales as $index => $locale) {
104104
$fileName = './translations/messages.' . $locale . '.gs_trans';

src/Resources/config/services.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@
2323

2424
<service id="phil_googlesheets_translations_bundle.translation_service" class="Phiil\GoogleSheetsTranslationBundle\Service\TranslationService" public="true">
2525
<argument type="service" id="Phiil\GoogleSheetsTranslationBundle\Service\GoogleSheetsService"/>
26-
</service>
27-
<service id="Phiil\GoogleSheetsTranslationBundle\Service\TranslationService" alias="phil_googlesheets_translations_bundle.translation_service" public="true">
28-
<argument type="service" id="Phiil\GoogleSheetsTranslationBundle\Service\GoogleSheetsService"/>
2926
<argument type="service" id="Symfony\Component\HttpKernel\KernelInterface"/>
3027
</service>
28+
<service id="Phiil\GoogleSheetsTranslationBundle\Service\TranslationService" alias="phil_googlesheets_translations_bundle.translation_service" public="true" />
3129

3230
<service id="phil_googlesheets_translations_bundle.translation_loader" class="Phiil\GoogleSheetsTranslationBundle\Translation\TranslationLoader" public="true">
3331
<argument type="service" id="Phiil\GoogleSheetsTranslationBundle\Service\GoogleSheetsService"/>

0 commit comments

Comments
 (0)