mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 09:14:03 +00:00
bump PHP to 8.2, minor ci fixes
This commit is contained in:
parent
03ac1ef127
commit
d0dd87ab07
5 changed files with 15 additions and 15 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# add amd64 platform to support Mac M1
|
||||
FROM --platform=linux/amd64 shivammathur/node:latest-amd64
|
||||
|
||||
ARG PHP_VERSION=8.1
|
||||
ARG PHP_VERSION=8.2
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"php": "^8.2",
|
||||
"ext-json": "*",
|
||||
"illuminate/support": "^9.0",
|
||||
"spatie/ignition": "^1.4",
|
||||
|
|
@ -58,16 +58,16 @@
|
|||
}
|
||||
},
|
||||
"scripts": {
|
||||
"docker-up": "PHP_VERSION=8.1 docker-compose up -d",
|
||||
"docker-down": "PHP_VERSION=8.1 docker-compose down",
|
||||
"docker-rebuild": "PHP_VERSION=8.1 docker-compose up -d --no-deps --build",
|
||||
"docker-up": "PHP_VERSION=8.2 docker-compose up -d",
|
||||
"docker-down": "PHP_VERSION=8.2 docker-compose down",
|
||||
"docker-rebuild": "PHP_VERSION=8.2 docker-compose up -d --no-deps --build",
|
||||
"docker-m1": "ln -s docker-compose-m1.override.yml docker-compose.override.yml",
|
||||
"coverage": "open coverage/phpunit/html/index.html",
|
||||
"phpstan": "vendor/bin/phpstan",
|
||||
"phpstan-pro": "vendor/bin/phpstan --pro",
|
||||
"cs": "php-cs-fixer fix --config=.php-cs-fixer.php",
|
||||
"test": "PHP_VERSION=8.1 ./test --no-coverage",
|
||||
"test-full": "PHP_VERSION=8.1 ./test"
|
||||
"test": "PHP_VERSION=8.2 ./test --no-coverage",
|
||||
"test-full": "PHP_VERSION=8.2 ./test"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ services:
|
|||
build:
|
||||
context: .
|
||||
args:
|
||||
PHP_VERSION: ${PHP_VERSION:-8.1}
|
||||
PHP_VERSION: ${PHP_VERSION:-8.2}
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ function runCommandWorks(): void
|
|||
Artisan::call('tenants:migrate', ['--tenants' => [$id]]);
|
||||
|
||||
pest()->artisan("tenants:run --tenants=$id 'foo foo --b=bar --c=xyz' ")
|
||||
->expectsOutput("User's name is Test command")
|
||||
->expectsOutput("User's name is Test user")
|
||||
->expectsOutput('foo')
|
||||
->expectsOutput('xyz');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Stancl\Tenancy\Tests\Etc\Console;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class ExampleCommand extends Command
|
||||
|
|
@ -22,14 +23,13 @@ class ExampleCommand extends Command
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
User::create([
|
||||
'id' => 999,
|
||||
'name' => 'Test command',
|
||||
'email' => 'test@command.com',
|
||||
$id = User::create([
|
||||
'name' => 'Test user',
|
||||
'email' => Str::random(8) . '@example.com',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
])->id;
|
||||
|
||||
$this->line("User's name is " . User::find(999)->name);
|
||||
$this->line("User's name is " . User::find($id)->name);
|
||||
$this->line($this->argument('a'));
|
||||
$this->line($this->option('c'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue