Skip to content

Commit 9effcc8

Browse files
committed
fix(dependencies): update guanguans/soar-php to ^6.1 and refactor related usages
- Remove redundant composer commands for guanguans/soar-php in tests.yml. - Update guanguans/soar-php dependency in composer.json to ^6.1. - Remove custom repository configuration for soar-php in composer.json. - Replace Soar::getOption references with updated method getLogOutput in ClearCommand. - Adjust method call in ScoreCommand from getOption to getQuery. - Remove deprecated getDelimiter method in Soar facade. - Add new defaultSoarBinary method to Soar facade for better binary handling.
1 parent 7880f14 commit 9effcc8

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ jobs:
5959
- name: Install dependencies
6060
run: |
6161
composer remove "brainmaestro/composer-git-hooks" --no-interaction --no-scripts --dev --ansi -v
62-
composer remove "guanguans/soar-php" --no-interaction --no-scripts --ansi -v
63-
composer require guanguans/soar-php --prefer-source --no-interaction --no-scripts --ansi -v
6462
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --ansi -v
6563
composer update --${{ matrix.dependency-version }} --prefer-source --no-interaction --no-scripts --ansi -W -v
6664

composer.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
],
4848
"require": {
4949
"php": ">=8.0",
50-
"guanguans/soar-php": "^6.0",
50+
"guanguans/soar-php": "^6.1",
5151
"laravel/framework": "^9.52 || ^10.0 || ^11.0 || ^12.0"
5252
},
5353
"require-dev": {
@@ -109,10 +109,6 @@
109109
"facade-documenter": {
110110
"type": "vcs",
111111
"url": "git@github.com:laravel/facade-documenter.git"
112-
},
113-
"soar-php": {
114-
"type": "vcs",
115-
"url": "git@github.com:guanguans/soar-php.git"
116112
}
117113
},
118114
"minimum-stability": "stable",

src/Commands/ClearCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ public function handle(): void
3636

3737
public static function soarLogFile(): string
3838
{
39-
return Soar::getOption('-log-output', \dirname(Soar::getSoarBinary()).\DIRECTORY_SEPARATOR.'soar.log');
39+
return Soar::getLogOutput(\dirname(Soar::getSoarBinary()).\DIRECTORY_SEPARATOR.'soar.log');
4040
}
4141
}

src/Commands/ScoreCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ScoreCommand extends Command
3333
*/
3434
public function handle(): void
3535
{
36-
$query = $this->soar()->getOption('-query');
36+
$query = $this->soar()->getQuery();
3737

3838
// If the query is not passed in, read from STDIN
3939
if (($fstat = fstat(\STDIN)) && 0 < $fstat['size']) {

src/Facades/Soar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
* @method static \Guanguans\SoarPHP\Soar setOptions(array $options)
3232
* @method static \Guanguans\SoarPHP\Soar withOption(string $name, mixed $value)
3333
* @method static \Guanguans\SoarPHP\Soar withOptions(array $options)
34-
* @method static string getDelimiter(string $default = ';')
3534
* @method static mixed getOption(string $name, mixed $default = null)
3635
* @method static array getOptions()
3736
* @method static \Guanguans\SoarPHP\Soar onlyDsn()
@@ -41,6 +40,7 @@
4140
* @method static \Guanguans\SoarPHP\Soar exceptOptions(array $names)
4241
* @method static string getSoarBinary()
4342
* @method static \Guanguans\SoarPHP\Soar setSoarBinary(string $soarBinary)
43+
* @method static string defaultSoarBinary()
4444
* @method static string|null getSudoPassword()
4545
* @method static \Guanguans\SoarPHP\Soar setSudoPassword(string|null $sudoPassword)
4646
* @method static \Guanguans\SoarPHP\Soar make(mixed ...$parameters)

0 commit comments

Comments
 (0)