From a79310e207f410d86d74a1f79b654d25550f19f7 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Sun, 28 May 2023 16:47:29 +0200 Subject: [PATCH] refactor: move some commands to local environment only (monicahq/chandler#555) --- .../Commands/{ => Local}/MonicaLocalize.php | 2 +- .../{ => Local}/SetupDummyAccount.php | 2 +- app/Console/Kernel.php | 4 + composer.json | 4 +- composer.lock | 162 +++++++++--------- 5 files changed, 89 insertions(+), 85 deletions(-) rename app/Console/Commands/{ => Local}/MonicaLocalize.php (98%) rename app/Console/Commands/{ => Local}/SetupDummyAccount.php (99%) diff --git a/app/Console/Commands/MonicaLocalize.php b/app/Console/Commands/Local/MonicaLocalize.php similarity index 98% rename from app/Console/Commands/MonicaLocalize.php rename to app/Console/Commands/Local/MonicaLocalize.php index 814c5e93ad2..4f01a530240 100644 --- a/app/Console/Commands/MonicaLocalize.php +++ b/app/Console/Commands/Local/MonicaLocalize.php @@ -1,6 +1,6 @@ load(__DIR__.'/Commands'); + if (! App::environment('production')) { + $this->load(__DIR__.'/Commands/Local'); + } require base_path('routes/console.php'); } diff --git a/composer.json b/composer.json index 2070bc33eee..e827626cc6b 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,6 @@ "socialiteproviders/linkedin": "^4.2", "socialiteproviders/microsoft-azure": "^5.1", "socialiteproviders/twitter": "^4.1", - "stichoza/google-translate-php": "^5.1", "tightenco/ziggy": "1.5.2", "uploadcare/uploadcare-php": "^3.2" }, @@ -57,7 +56,8 @@ "phpunit/phpunit": "^10.0", "psalm/plugin-laravel": "^2.0", "roave/security-advisories": "dev-master", - "spatie/laravel-ignition": "^2.0" + "spatie/laravel-ignition": "^2.0", + "stichoza/google-translate-php": "^5.1" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index d35a1c02f0b..05be4aff83a 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": "dfdfc5df79b998b61d24c13b9afab744", + "content-hash": "b9b449749e6c5d3c04f90f643d34a664", "packages": [ { "name": "asbiin/laravel-webauthn", @@ -7100,86 +7100,6 @@ ], "time": "2023-02-13T17:21:24+00:00" }, - { - "name": "stichoza/google-translate-php", - "version": "v5.1.1", - "source": { - "type": "git", - "url": "https://github.com/Stichoza/google-translate-php.git", - "reference": "7f528ab7e8dad78d0cfa261e4a4cac1b187f63df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Stichoza/google-translate-php/zipball/7f528ab7e8dad78d0cfa261e4a4cac1b187f63df", - "reference": "7f528ab7e8dad78d0cfa261e4a4cac1b187f63df", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "guzzlehttp/guzzle": "^7.0", - "php": "^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.10" - }, - "type": "library", - "autoload": { - "psr-4": { - "Stichoza\\GoogleTranslate\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Levan Velijanashvili", - "email": "me@stichoza.com" - } - ], - "description": "Free Google Translate API PHP Package", - "homepage": "https://github.com/Stichoza/google-translate-php", - "keywords": [ - "google", - "php", - "translate", - "translating", - "translator" - ], - "support": { - "issues": "https://github.com/Stichoza/google-translate-php/issues", - "source": "https://github.com/Stichoza/google-translate-php/tree/v5.1.1" - }, - "funding": [ - { - "url": "https://btc.com/bc1qc25j4x7yahghm8nnn6lypnw59nptylsw32nkfl", - "type": "custom" - }, - { - "url": "https://www.paypal.me/stichoza", - "type": "custom" - }, - { - "url": "https://ko-fi.com/stichoza", - "type": "ko_fi" - }, - { - "url": "https://liberapay.com/stichoza", - "type": "liberapay" - }, - { - "url": "https://opencollective.com/stichoza", - "type": "open_collective" - }, - { - "url": "https://www.patreon.com/stichoza", - "type": "patreon" - } - ], - "time": "2022-12-01T16:51:22+00:00" - }, { "name": "symfony/console", "version": "v6.2.10", @@ -16704,6 +16624,86 @@ ], "time": "2023-03-06T07:22:28+00:00" }, + { + "name": "stichoza/google-translate-php", + "version": "v5.1.1", + "source": { + "type": "git", + "url": "https://github.com/Stichoza/google-translate-php.git", + "reference": "7f528ab7e8dad78d0cfa261e4a4cac1b187f63df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Stichoza/google-translate-php/zipball/7f528ab7e8dad78d0cfa261e4a4cac1b187f63df", + "reference": "7f528ab7e8dad78d0cfa261e4a4cac1b187f63df", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/guzzle": "^7.0", + "php": "^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.10" + }, + "type": "library", + "autoload": { + "psr-4": { + "Stichoza\\GoogleTranslate\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Levan Velijanashvili", + "email": "me@stichoza.com" + } + ], + "description": "Free Google Translate API PHP Package", + "homepage": "https://github.com/Stichoza/google-translate-php", + "keywords": [ + "google", + "php", + "translate", + "translating", + "translator" + ], + "support": { + "issues": "https://github.com/Stichoza/google-translate-php/issues", + "source": "https://github.com/Stichoza/google-translate-php/tree/v5.1.1" + }, + "funding": [ + { + "url": "https://btc.com/bc1qc25j4x7yahghm8nnn6lypnw59nptylsw32nkfl", + "type": "custom" + }, + { + "url": "https://www.paypal.me/stichoza", + "type": "custom" + }, + { + "url": "https://ko-fi.com/stichoza", + "type": "ko_fi" + }, + { + "url": "https://liberapay.com/stichoza", + "type": "liberapay" + }, + { + "url": "https://opencollective.com/stichoza", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/stichoza", + "type": "patreon" + } + ], + "time": "2022-12-01T16:51:22+00:00" + }, { "name": "symfony/filesystem", "version": "v6.2.10",