From ef20465923c43cd2a3653cb6f83b70b0b30be3c7 Mon Sep 17 00:00:00 2001 From: khalyomede Date: Mon, 2 Oct 2023 21:32:41 +0200 Subject: [PATCH 1/3] #53 fix detect translation keys containing a colon --- src/Commands/Translate.php | 41 ++----------------- tests/Feature/Commands/TranslateTest.php | 31 ++++++++++++-- .../resources/views/device/index.blade.php | 3 ++ 3 files changed, 35 insertions(+), 40 deletions(-) create mode 100644 tests/misc/resources/views/device/index.blade.php diff --git a/src/Commands/Translate.php b/src/Commands/Translate.php index 7ef66bd..1ae7fb5 100644 --- a/src/Commands/Translate.php +++ b/src/Commands/Translate.php @@ -3,16 +3,14 @@ namespace Khalyomede\LaravelTranslate\Commands; use Carbon\Carbon; -use Exception; use Illuminate\Console\Command; use Illuminate\Support\Collection; use Illuminate\Support\Facades\File; +use Illuminate\Support\Str; use InvalidArgumentException; use PhpParser\Node; use PhpParser\Node\Arg; -use PhpParser\Node\Expr\ConstFetch; use PhpParser\Node\Expr\FuncCall; -use PhpParser\Node\Expr\New_; use PhpParser\Node\Name; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Expression; @@ -71,9 +69,7 @@ public function handle(): int $this->info(""); $this->info("Filtering translation keys..."); - $bar = $this->output->createProgressBar($foundKeys->count()); - - $foundKeys = $this->filterTranslationKeys($bar, $foundKeys); + $foundKeys = $this->filterTranslationKeys($foundKeys); $bar->finish(); @@ -280,6 +276,7 @@ public function leaveNode(Node $node) $firstArgument = $directive ->arguments ?->getValues() + ->filter(fn (mixed $value): bool => Str::of(strval($value))->isMatch('/^\s*(\'|").*(\'|")\s*$/')) ->map(fn (mixed $value): string => strval(preg_replace("/^(\"|')/", "", strval($value)))) ->map(fn (mixed $value): string => strval(preg_replace("/(\"|')$/", "", strval($value)))) ->first() ?? ""; @@ -450,39 +447,9 @@ public function leaveNode(Node $node) * * @return Collection */ - private function filterTranslationKeys(ProgressBar $bar, Collection $translationKeys): Collection + private function filterTranslationKeys(Collection $translationKeys): Collection { - $phpParser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7); - return $translationKeys - ->filter(function (string $key) use ($phpParser, $bar): bool { - $ast = []; - - try { - $ast = $phpParser->parse("advance(); - - return true; - } - - $expression = $ast[0]; - - if (!($expression instanceof Expression)) { - $bar->advance(); - - return false; - } - - // instanceof New -> "New account", "New" is parsed as new class keyword - if ($expression->expr instanceof ConstFetch || $expression->expr instanceof New_) { - $bar->advance(); - - return true; - } - - return false; - }) ->diff(self::keysToIgnore()) ->concat(self::translatableKeys()) ->flip() diff --git a/tests/Feature/Commands/TranslateTest.php b/tests/Feature/Commands/TranslateTest.php index f02f6e7..944f4e7 100644 --- a/tests/Feature/Commands/TranslateTest.php +++ b/tests/Feature/Commands/TranslateTest.php @@ -89,6 +89,7 @@ public function testReturnsZeroCodeIfNoNewKeysHaveBeenFound(): void "test 3" => "", "Unable to perform anti-bot validation." => "", "New journey" => "", + "Created :date" => "", ], flags: JSON_PRETTY_PRINT); assert(is_string($content)); @@ -599,7 +600,7 @@ public function testDisplaysHowManyNewKeysHaveBeenAddedToFile(): void $this->artisan(Translate::class) ->assertSuccessful() - ->expectsOutputToContain("Added 22 new key(s) on each lang files."); + ->expectsOutputToContain("Added 23 new key(s) on each lang files."); } public function testDisplayOnlyNewKeysAddedToFileWithoutTakingIntoAccountCurrentExistingKeys(): void @@ -628,6 +629,7 @@ public function testDisplayOnlyNewKeysAddedToFileWithoutTakingIntoAccountCurrent "test 2" => "", "test 3" => "", "New journey" => "", + "Created :date" => "", ], flags: JSON_PRETTY_PRINT); assert(is_string($content)); @@ -674,7 +676,7 @@ public function testDisplayNumberOfKeysInConditionalIfNewKeysHaveBeenFoundWhenUs assert($command instanceof PendingCommand); - $command->expectsOutputToContain("22 key(s) would have been added (using --dry-run) on each lang files."); + $command->expectsOutputToContain("23 key(s) would have been added (using --dry-run) on each lang files."); } public function testDoesNotAddShortKeys(): void @@ -917,7 +919,7 @@ public function testDisplaysProgressBarWhenFetchingTranslationKeys(): void $this->artisan(Translate::class) ->assertSuccessful() - ->expectsOutputToContain("13/13"); + ->expectsOutputToContain("14/14"); } public function testDisplaysElapsedTimeAndMaxMemoryConsumption(): void @@ -990,4 +992,27 @@ public function testCanTranslateTextStartingWithNew(): void "New journey" => "", ]); } + + public function testCanTranslateKeysContainingColon(): void + { + $this->app?->useLangPath(__DIR__ . "/../../misc/resources/lang"); + + config([ + "translate" => [ + "langs" => [ + "fr", + ], + "include" => [ + "tests/misc/resources/views/device" + ], + ], + ]); + + $this->artisan(Translate::class) + ->assertSuccessful(); + + $this->assertFileContainsJson(__DIR__ . "/../../misc/resources/lang/fr.json", [ + "Created :date" => "", + ]); + } } diff --git a/tests/misc/resources/views/device/index.blade.php b/tests/misc/resources/views/device/index.blade.php new file mode 100644 index 0000000..1c5d213 --- /dev/null +++ b/tests/misc/resources/views/device/index.blade.php @@ -0,0 +1,3 @@ +@foreach ($sessions as $session) + @lang('Created :date', ['date' => $session->created_at->fromNow()]) +@endforeach From 628d81506fd2bea4838bfb5f68202ad35204fca9 Mon Sep 17 00:00:00 2001 From: khalyomede Date: Mon, 2 Oct 2023 21:32:48 +0200 Subject: [PATCH 2/3] #53 add dependencies updates --- composer.json | 12 +-- composer.lock | 288 ++++++++++++++++++++++++++------------------------ 2 files changed, 156 insertions(+), 144 deletions(-) diff --git a/composer.json b/composer.json index c781efa..2219328 100644 --- a/composer.json +++ b/composer.json @@ -28,13 +28,13 @@ "stillat/blade-parser": "1.*" }, "require-dev": { - "orchestra/testbench": "8.11.0", + "orchestra/testbench": "8.12.1", "nunomaduro/collision": "7.9.0", - "rector/rector": "0.18.3", - "driftingly/rector-laravel": "0.25.0", - "phpstan/phpstan": "1.10.35", + "rector/rector": "0.18.4", + "driftingly/rector-laravel": "0.26.1", + "phpstan/phpstan": "1.10.37", "nunomaduro/larastan": "2.6.4", - "friendsofphp/php-cs-fixer": "3.27.0" + "friendsofphp/php-cs-fixer": "3.34.0" }, "scripts": { "test": "testbench package:test", @@ -61,4 +61,4 @@ ] } } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 5a0e8bc..9321208 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5e4bdce47d88244cb759711fe7b8e3c3", + "content-hash": "313cc271d8bad04bcd996339015f5018", "packages": [ { "name": "brick/math", @@ -647,16 +647,16 @@ }, { "name": "laravel/framework", - "version": "v10.23.1", + "version": "v10.25.2", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "dbfd495557678759153e8d71cc2f6027686ca51e" + "reference": "6014dd456b414b305fb0b408404efdcec18e64bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/dbfd495557678759153e8d71cc2f6027686ca51e", - "reference": "dbfd495557678759153e8d71cc2f6027686ca51e", + "url": "https://api.github.com/repos/laravel/framework/zipball/6014dd456b414b305fb0b408404efdcec18e64bc", + "reference": "6014dd456b414b305fb0b408404efdcec18e64bc", "shasum": "" }, "require": { @@ -674,7 +674,7 @@ "ext-tokenizer": "*", "fruitcake/php-cors": "^1.2", "guzzlehttp/uri-template": "^1.0", - "laravel/prompts": "^0.1", + "laravel/prompts": "^0.1.9", "laravel/serializable-closure": "^1.3", "league/commonmark": "^2.2.1", "league/flysystem": "^3.8.0", @@ -756,7 +756,7 @@ "league/flysystem-read-only": "^3.3", "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.5.1", - "orchestra/testbench-core": "^8.10", + "orchestra/testbench-core": "^8.12", "pda/pheanstalk": "^4.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.0.7", @@ -843,20 +843,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-09-13T14:51:46+00:00" + "time": "2023-09-28T14:08:59+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.8", + "version": "v0.1.10", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "68dcc65babf92e1fb43cba0b3f78fc3d8002709c" + "reference": "37ed55f6950d921a87d5beeab16d03f8de26b060" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/68dcc65babf92e1fb43cba0b3f78fc3d8002709c", - "reference": "68dcc65babf92e1fb43cba0b3f78fc3d8002709c", + "url": "https://api.github.com/repos/laravel/prompts/zipball/37ed55f6950d921a87d5beeab16d03f8de26b060", + "reference": "37ed55f6950d921a87d5beeab16d03f8de26b060", "shasum": "" }, "require": { @@ -865,6 +865,10 @@ "php": "^8.1", "symfony/console": "^6.2" }, + "conflict": { + "illuminate/console": ">=10.17.0 <10.25.0", + "laravel/framework": ">=10.17.0 <10.25.0" + }, "require-dev": { "mockery/mockery": "^1.5", "pestphp/pest": "^2.3", @@ -875,6 +879,11 @@ "ext-pcntl": "Required for the spinner to be animated." }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.x-dev" + } + }, "autoload": { "files": [ "src/helpers.php" @@ -889,9 +898,9 @@ ], "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.8" + "source": "https://github.com/laravel/prompts/tree/v0.1.10" }, - "time": "2023-09-19T15:33:56+00:00" + "time": "2023-09-29T07:26:07+00:00" }, { "name": "laravel/serializable-closure", @@ -1450,16 +1459,16 @@ }, { "name": "nesbot/carbon", - "version": "2.70.0", + "version": "2.71.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "d3298b38ea8612e5f77d38d1a99438e42f70341d" + "reference": "98276233188583f2ff845a0f992a235472d9466a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d3298b38ea8612e5f77d38d1a99438e42f70341d", - "reference": "d3298b38ea8612e5f77d38d1a99438e42f70341d", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a", + "reference": "98276233188583f2ff845a0f992a235472d9466a", "shasum": "" }, "require": { @@ -1552,7 +1561,7 @@ "type": "tidelift" } ], - "time": "2023-09-07T16:43:50+00:00" + "time": "2023-09-25T11:31:05+00:00" }, { "name": "nette/schema", @@ -2570,16 +2579,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.3.2", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a" + "reference": "1f69476b64fb47105c06beef757766c376b548c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/85fd65ed295c4078367c784e8a5a6cee30348b7a", - "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/1f69476b64fb47105c06beef757766c376b548c4", + "reference": "1f69476b64fb47105c06beef757766c376b548c4", "shasum": "" }, "require": { @@ -2624,7 +2633,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.3.2" + "source": "https://github.com/symfony/error-handler/tree/v6.3.5" }, "funding": [ { @@ -2640,7 +2649,7 @@ "type": "tidelift" } ], - "time": "2023-07-16T17:05:46+00:00" + "time": "2023-09-12T06:57:20+00:00" }, { "name": "symfony/event-dispatcher", @@ -2800,16 +2809,16 @@ }, { "name": "symfony/finder", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e" + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9915db259f67d21eefee768c1abcf1cc61b1fc9e", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e", + "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", "shasum": "" }, "require": { @@ -2844,7 +2853,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.3" + "source": "https://github.com/symfony/finder/tree/v6.3.5" }, "funding": [ { @@ -2860,20 +2869,20 @@ "type": "tidelift" } ], - "time": "2023-07-31T08:31:44+00:00" + "time": "2023-09-26T12:56:25+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "cac1556fdfdf6719668181974104e6fcfa60e844" + "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cac1556fdfdf6719668181974104e6fcfa60e844", - "reference": "cac1556fdfdf6719668181974104e6fcfa60e844", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b50f5e281d722cb0f4c296f908bacc3e2b721957", + "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957", "shasum": "" }, "require": { @@ -2921,7 +2930,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.3.4" + "source": "https://github.com/symfony/http-foundation/tree/v6.3.5" }, "funding": [ { @@ -2937,20 +2946,20 @@ "type": "tidelift" } ], - "time": "2023-08-22T08:20:46+00:00" + "time": "2023-09-04T21:33:54+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb" + "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb", - "reference": "36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f991a964368bee8d883e8d57ced4fe9fff04dfc", + "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc", "shasum": "" }, "require": { @@ -3034,7 +3043,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.3.4" + "source": "https://github.com/symfony/http-kernel/tree/v6.3.5" }, "funding": [ { @@ -3050,20 +3059,20 @@ "type": "tidelift" } ], - "time": "2023-08-26T13:54:49+00:00" + "time": "2023-09-30T06:37:04+00:00" }, { "name": "symfony/mailer", - "version": "v6.3.0", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435" + "reference": "d89611a7830d51b5e118bca38e390dea92f9ea06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/7b03d9be1dea29bfec0a6c7b603f5072a4c97435", - "reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435", + "url": "https://api.github.com/repos/symfony/mailer/zipball/d89611a7830d51b5e118bca38e390dea92f9ea06", + "reference": "d89611a7830d51b5e118bca38e390dea92f9ea06", "shasum": "" }, "require": { @@ -3114,7 +3123,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.3.0" + "source": "https://github.com/symfony/mailer/tree/v6.3.5" }, "funding": [ { @@ -3130,20 +3139,20 @@ "type": "tidelift" } ], - "time": "2023-05-29T12:49:39+00:00" + "time": "2023-09-06T09:47:15+00:00" }, { "name": "symfony/mime", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98" + "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", - "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", + "url": "https://api.github.com/repos/symfony/mime/zipball/d5179eedf1cb2946dbd760475ebf05c251ef6a6e", + "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e", "shasum": "" }, "require": { @@ -3198,7 +3207,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.3.3" + "source": "https://github.com/symfony/mime/tree/v6.3.5" }, "funding": [ { @@ -3214,7 +3223,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2023-09-29T06:59:36+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4017,16 +4026,16 @@ }, { "name": "symfony/routing", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a" + "reference": "82616e59acd3e3d9c916bba798326cb7796d7d31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/e7243039ab663822ff134fbc46099b5fdfa16f6a", - "reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a", + "url": "https://api.github.com/repos/symfony/routing/zipball/82616e59acd3e3d9c916bba798326cb7796d7d31", + "reference": "82616e59acd3e3d9c916bba798326cb7796d7d31", "shasum": "" }, "require": { @@ -4080,7 +4089,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.3.3" + "source": "https://github.com/symfony/routing/tree/v6.3.5" }, "funding": [ { @@ -4096,7 +4105,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2023-09-20T16:05:51+00:00" }, { "name": "symfony/service-contracts", @@ -4182,16 +4191,16 @@ }, { "name": "symfony/string", - "version": "v6.3.2", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "53d1a83225002635bca3482fcbf963001313fb68" + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", - "reference": "53d1a83225002635bca3482fcbf963001313fb68", + "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", + "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", "shasum": "" }, "require": { @@ -4248,7 +4257,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.2" + "source": "https://github.com/symfony/string/tree/v6.3.5" }, "funding": [ { @@ -4264,7 +4273,7 @@ "type": "tidelift" } ], - "time": "2023-07-05T08:41:27+00:00" + "time": "2023-09-18T10:38:32+00:00" }, { "name": "symfony/translation", @@ -4515,16 +4524,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45" + "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2027be14f8ae8eae999ceadebcda5b4909b81d45", - "reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3d9999376be5fea8de47752837a3e1d1c5f69ef5", + "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5", "shasum": "" }, "require": { @@ -4579,7 +4588,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.3.4" + "source": "https://github.com/symfony/var-dumper/tree/v6.3.5" }, "funding": [ { @@ -4595,7 +4604,7 @@ "type": "tidelift" } ], - "time": "2023-08-24T14:51:05+00:00" + "time": "2023-09-12T10:11:35+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5088,16 +5097,16 @@ }, { "name": "driftingly/rector-laravel", - "version": "0.25.0", + "version": "0.26.1", "source": { "type": "git", "url": "https://github.com/driftingly/rector-laravel.git", - "reference": "c568226985f9f388f1deabd77eea89d440372edd" + "reference": "ae46f25d425351f997d7d09cd63968581319b7fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/driftingly/rector-laravel/zipball/c568226985f9f388f1deabd77eea89d440372edd", - "reference": "c568226985f9f388f1deabd77eea89d440372edd", + "url": "https://api.github.com/repos/driftingly/rector-laravel/zipball/ae46f25d425351f997d7d09cd63968581319b7fc", + "reference": "ae46f25d425351f997d7d09cd63968581319b7fc", "shasum": "" }, "require": { @@ -5116,9 +5125,9 @@ "description": "Rector upgrades rules for Laravel Framework", "support": { "issues": "https://github.com/driftingly/rector-laravel/issues", - "source": "https://github.com/driftingly/rector-laravel/tree/0.25.0" + "source": "https://github.com/driftingly/rector-laravel/tree/0.26.1" }, - "time": "2023-09-18T20:17:51+00:00" + "time": "2023-09-30T18:27:39+00:00" }, { "name": "fakerphp/faker", @@ -5261,16 +5270,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.27.0", + "version": "v3.34.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "e73ccaae1208f017bb7860986eebb3da48bd25d6" + "reference": "7c7a4ad2ed8fe50df3e25528218b13d383608f23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/e73ccaae1208f017bb7860986eebb3da48bd25d6", - "reference": "e73ccaae1208f017bb7860986eebb3da48bd25d6", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7c7a4ad2ed8fe50df3e25528218b13d383608f23", + "reference": "7c7a4ad2ed8fe50df3e25528218b13d383608f23", "shasum": "" }, "require": { @@ -5291,6 +5300,9 @@ "symfony/process": "^5.4 || ^6.0", "symfony/stopwatch": "^5.4 || ^6.0" }, + "conflict": { + "stevebauman/unfinalize": "*" + }, "require-dev": { "facile-it/paraunit": "^1.3 || ^2.0", "justinrainbow/json-schema": "^5.2", @@ -5344,7 +5356,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.27.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.34.0" }, "funding": [ { @@ -5352,7 +5364,7 @@ "type": "github" } ], - "time": "2023-09-17T14:37:54+00:00" + "time": "2023-09-29T15:34:26+00:00" }, { "name": "guzzlehttp/psr7", @@ -5981,16 +5993,16 @@ }, { "name": "orchestra/canvas", - "version": "v8.9.0", + "version": "v8.10.1", "source": { "type": "git", "url": "https://github.com/orchestral/canvas.git", - "reference": "00a41451aa288d92741f8b314fa056abbe79c237" + "reference": "eef3eb34e263cc462c0eb284ba002f2829b04e2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/canvas/zipball/00a41451aa288d92741f8b314fa056abbe79c237", - "reference": "00a41451aa288d92741f8b314fa056abbe79c237", + "url": "https://api.github.com/repos/orchestral/canvas/zipball/eef3eb34e263cc462c0eb284ba002f2829b04e2a", + "reference": "eef3eb34e263cc462c0eb284ba002f2829b04e2a", "shasum": "" }, "require": { @@ -6047,9 +6059,9 @@ "description": "Code Generators for Laravel Applications and Packages", "support": { "issues": "https://github.com/orchestral/canvas/issues", - "source": "https://github.com/orchestral/canvas/tree/v8.9.0" + "source": "https://github.com/orchestral/canvas/tree/v8.10.1" }, - "time": "2023-09-19T04:58:28+00:00" + "time": "2023-09-25T08:37:12+00:00" }, { "name": "orchestra/canvas-core", @@ -6126,25 +6138,25 @@ }, { "name": "orchestra/testbench", - "version": "v8.11.0", + "version": "v8.12.1", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "4e895271327a58e911f7db3a3b505eadc18a75ee" + "reference": "9bae3c28789295db875eee0d3395c4ba23f1e5ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/4e895271327a58e911f7db3a3b505eadc18a75ee", - "reference": "4e895271327a58e911f7db3a3b505eadc18a75ee", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/9bae3c28789295db875eee0d3395c4ba23f1e5ae", + "reference": "9bae3c28789295db875eee0d3395c4ba23f1e5ae", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", "fakerphp/faker": "^1.21", - "laravel/framework": ">=10.23.1 <10.24.0", + "laravel/framework": ">=10.23.1 <10.26.0", "mockery/mockery": "^1.5.1", - "orchestra/testbench-core": ">=8.11.0 <8.12.0", - "orchestra/workbench": "^0.3.0", + "orchestra/testbench-core": ">=8.12.0 <8.13.0", + "orchestra/workbench": "^0.4.0", "php": "^8.1", "phpunit/phpunit": "^9.6 || ^10.1", "spatie/laravel-ray": "^1.32.4", @@ -6176,22 +6188,22 @@ ], "support": { "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench/tree/v8.11.0" + "source": "https://github.com/orchestral/testbench/tree/v8.12.1" }, - "time": "2023-09-19T05:51:52+00:00" + "time": "2023-09-25T14:33:44+00:00" }, { "name": "orchestra/testbench-core", - "version": "v8.11.1", + "version": "v8.12.1", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "1f382c9d55100c2c641d4cba50bbde764aa93054" + "reference": "9a7b63f9cd10dd15cf7c9d4aad2ccaa688465a1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/1f382c9d55100c2c641d4cba50bbde764aa93054", - "reference": "1f382c9d55100c2c641d4cba50bbde764aa93054", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/9a7b63f9cd10dd15cf7c9d4aad2ccaa688465a1f", + "reference": "9a7b63f9cd10dd15cf7c9d4aad2ccaa688465a1f", "shasum": "" }, "require": { @@ -6259,20 +6271,20 @@ "issues": "https://github.com/orchestral/testbench/issues", "source": "https://github.com/orchestral/testbench-core" }, - "time": "2023-09-19T10:57:14+00:00" + "time": "2023-09-26T12:50:24+00:00" }, { "name": "orchestra/workbench", - "version": "v0.3.0", + "version": "v0.4.1", "source": { "type": "git", "url": "https://github.com/orchestral/workbench.git", - "reference": "39fe2113d1a1f95b0bf3192a71eb1ded83c3a3d7" + "reference": "21acf1015ac48e36cb468bffd161115689958782" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/workbench/zipball/39fe2113d1a1f95b0bf3192a71eb1ded83c3a3d7", - "reference": "39fe2113d1a1f95b0bf3192a71eb1ded83c3a3d7", + "url": "https://api.github.com/repos/orchestral/workbench/zipball/21acf1015ac48e36cb468bffd161115689958782", + "reference": "21acf1015ac48e36cb468bffd161115689958782", "shasum": "" }, "require": { @@ -6281,7 +6293,7 @@ "illuminate/support": "^9.52.15 || ^10.23.0", "laravel/tinker": "^2.8.2", "orchestra/canvas": "^7.10.0 || ^8.9.0", - "orchestra/testbench-core": "^7.31.0 || ^8.11.0", + "orchestra/testbench-core": "^7.32.0 || ^8.12.0", "php": "^8.0" }, "require-dev": { @@ -6297,7 +6309,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "0.3.x-dev" + "dev-master": "0.4.x-dev" } }, "autoload": { @@ -6324,9 +6336,9 @@ ], "support": { "issues": "https://github.com/orchestral/workbench/issues", - "source": "https://github.com/orchestral/workbench/tree/v0.3.0" + "source": "https://github.com/orchestral/workbench/tree/v0.4.1" }, - "time": "2023-09-19T05:26:40+00:00" + "time": "2023-09-26T13:04:34+00:00" }, { "name": "phar-io/manifest", @@ -6528,16 +6540,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.35", + "version": "1.10.37", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3" + "reference": "058ba07e92f744d4dcf6061ae75283d0c6456f2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e730e5facb75ffe09dfb229795e8c01a459f26c3", - "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/058ba07e92f744d4dcf6061ae75283d0c6456f2e", + "reference": "058ba07e92f744d4dcf6061ae75283d0c6456f2e", "shasum": "" }, "require": { @@ -6586,7 +6598,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T15:27:56+00:00" + "time": "2023-10-02T16:18:37+00:00" }, { "name": "phpunit/php-code-coverage", @@ -7297,16 +7309,16 @@ }, { "name": "rector/rector", - "version": "0.18.3", + "version": "0.18.4", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "ba7988e3e028e68e07191d75b0d5473ac320c5e7" + "reference": "d99a91176b7eb7f2b6d509a6486b3661c6dfd370" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/ba7988e3e028e68e07191d75b0d5473ac320c5e7", - "reference": "ba7988e3e028e68e07191d75b0d5473ac320c5e7", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/d99a91176b7eb7f2b6d509a6486b3661c6dfd370", + "reference": "d99a91176b7eb7f2b6d509a6486b3661c6dfd370", "shasum": "" }, "require": { @@ -7341,7 +7353,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/0.18.3" + "source": "https://github.com/rectorphp/rector/tree/0.18.4" }, "funding": [ { @@ -7349,7 +7361,7 @@ "type": "github" } ], - "time": "2023-09-12T20:18:14+00:00" + "time": "2023-09-25T17:07:54+00:00" }, { "name": "sebastian/cli-parser", @@ -7597,16 +7609,16 @@ }, { "name": "sebastian/complexity", - "version": "3.0.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "c70b73893e10757af9c6a48929fa6a333b56a97a" + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c70b73893e10757af9c6a48929fa6a333b56a97a", - "reference": "c70b73893e10757af9c6a48929fa6a333b56a97a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957", "shasum": "" }, "require": { @@ -7619,7 +7631,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" } }, "autoload": { @@ -7643,7 +7655,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0" }, "funding": [ { @@ -7651,7 +7663,7 @@ "type": "github" } ], - "time": "2023-08-31T09:55:53+00:00" + "time": "2023-09-28T11:50:59+00:00" }, { "name": "sebastian/diff", @@ -7786,16 +7798,16 @@ }, { "name": "sebastian/exporter", - "version": "5.1.0", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c3fa8483f9539b190f7cd4bfc4a07631dd1df344" + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c3fa8483f9539b190f7cd4bfc4a07631dd1df344", - "reference": "c3fa8483f9539b190f7cd4bfc4a07631dd1df344", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", "shasum": "" }, "require": { @@ -7809,7 +7821,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -7852,7 +7864,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.0" + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" }, "funding": [ { @@ -7860,7 +7872,7 @@ "type": "github" } ], - "time": "2023-09-18T07:15:37+00:00" + "time": "2023-09-24T13:22:09+00:00" }, { "name": "sebastian/global-state", From a143f6e6138347779de12d242a550adf569ba1a8 Mon Sep 17 00:00:00 2001 From: khalyomede Date: Mon, 2 Oct 2023 21:37:02 +0200 Subject: [PATCH 3/3] #53 add changelogs --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 620c45a..6c7a716 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Keys containing a colon will now be correctly detected ([#53](https://github.com/khalyomede/laravel-translate/issues/53)). +- The command will now detect keys aproximatively 40 times faster ([#52](https://github.com/khalyomede/laravel-translate/issues/52)). + ## [0.1.1] - 2023-09-19 ### Fixed