Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/bump-sanctu…
Browse files Browse the repository at this point in the history
…m-version

# Conflicts:
#	composer.json
  • Loading branch information
lupinitylabs committed Feb 23, 2023
2 parents 93bb82d + 612c9dd commit 1cba2de
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ 8.0, 8.1 ]
laravel: [ 8.*, 9.* ]
php: [ 8.1, 8.2 ]
laravel: [ 9.*, 10.* ]
dependency-version: [ prefer-stable ]

name: PHP ${{ matrix.php }} with Laravel ${{ matrix.laravel }} (${{ matrix.dependency-version }})
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-pdo": "*",
"ext-sodium": "*",
"guzzlehttp/guzzle": "^7.4",
"illuminate/support": "^8.0|^9.0",
"laravel/framework": "^8.0|^9.0",
"laravel/sanctum": "^2.4|^3.0",
"ext-pdo": "*"
"illuminate/support": "^9.0|^10.0",
"laravel/framework": "^9.0|^10.0",
"laravel/sanctum": "^3.2"
},
"require-dev": {
"laravel/sail": "^1.15",
"orchestra/testbench": "^6.23|^7.0",
"laravel/sail": "^1.18",
"orchestra/testbench": "^7.0|^8.0",
"phpunit/phpunit": "^9.5"
},
"autoload": {
Expand Down
15 changes: 4 additions & 11 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
testdox="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false"
colors="true" testdox="true" processIsolation="false" stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache"
backupStaticProperties="false">
<testsuites>
<testsuite name="Test Suite">
<directory>Tests</directory>
Expand Down
14 changes: 7 additions & 7 deletions src/Commands/ImportDump.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public function handle(): int
);
}

if ($optionForce && !($optionRemote || $optionFile || $optionDump)) {
$this->error('The force option requires either the file, dump or remote option to be set.');
if ($optionForce && !($optionRemote || $optionFile || $optionDump || $optionLatest)) {
$this->error('Nothing to import.');

return self::FAILURE;
}
Expand All @@ -93,14 +93,14 @@ public function handle(): int
$importFilePath = $this->getPathForDump($optionDump);
} elseif ($optionLatest) {
$importFilePath = $this->protector->getLatestDumpName();
$this->info(sprintf('Using %s.', $importFilePath));
$this->info(sprintf('Importing <comment>%s</comment>', $importFilePath));
} else {
$importFilePath = $this->chooseImportDump($optionConnection);
}

if (empty($localFilePath)) {
if (!$importFilePath) {
$this->error("Found no file to import.");
$this->error('Found no file to import.');

return self::FAILURE;
}
Expand Down Expand Up @@ -292,14 +292,14 @@ public function getMetaDataForFiles(array $directoryFiles): Collection
* @param bool|null $optionForce
* @return void
*/
public function importDump(string $importFilePath, ?bool $optionForce): void
protected function importDump(string $importFilePath, ?bool $optionForce): void
{
if ($importFilePath && ($optionForce || $this->confirm(
if ($optionForce || $this->confirm(
sprintf(
'Are you sure that you want to import the dump into the database: %s?',
$this->protector->getDatabaseName()
)
))) {
)) {
try {
$this->protector->importDump($importFilePath, Arr::except($this->options(), ['migrate']));

Expand Down

0 comments on commit 1cba2de

Please sign in to comment.