Compare commits
8 Commits
e345ace428
...
bda8b9c293
Author | SHA1 | Date |
---|---|---|
|
bda8b9c293 | |
|
7b6616c292 | |
|
026e7674dd | |
|
3dc9513923 | |
|
5207374e8b | |
|
8e733d899e | |
|
89bcaf12c4 | |
|
b83f30e35c |
13
.drone.yml
13
.drone.yml
|
@ -17,7 +17,7 @@ steps:
|
|||
- composer install --ignore-platform-reqs --dev
|
||||
|
||||
- name: mysql_healthcheck
|
||||
image: mariadb/server:10.3
|
||||
image: mysql:oracle
|
||||
commands:
|
||||
- while ! mysqladmin ping -h db -u db -pdb --silent; do sleep 1; done
|
||||
|
||||
|
@ -29,10 +29,11 @@ steps:
|
|||
- name: tests
|
||||
image: zoomyboy/adrema-base:latest
|
||||
commands:
|
||||
- php -d 'memory_limit=2G' artisan migrate
|
||||
- php -d 'memory_limit=2G' artisan test
|
||||
- echo 'memory_limit = 2G' >> /usr/local/etc/php/conf.d/99-custom-php-memlimit.ini;
|
||||
- php artisan migrate
|
||||
- php artisan test
|
||||
- rm -f .env
|
||||
- vendor/bin/phpstan analyse --memory-limit=2G
|
||||
- vendor/bin/phpstan analyse
|
||||
environment:
|
||||
APP_NAME: Scoutrobot
|
||||
APP_KEY:
|
||||
|
@ -147,12 +148,12 @@ steps:
|
|||
|
||||
services:
|
||||
- name: db
|
||||
image: mariadb/server:10.3
|
||||
image: mariadb:10.3
|
||||
environment:
|
||||
MARIADB_DATABASE: db
|
||||
MARIADB_USER: db
|
||||
MARIADB_PASSWORD: db
|
||||
MARIADB_ALLOW_EMPTY_PASSWORD: yes
|
||||
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes
|
||||
- name: redis
|
||||
image: redis
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace App\Course\Actions;
|
||||
|
||||
use App\Course\Models\Course;
|
||||
use App\Course\Models\CourseMember;
|
||||
use App\Course\Resources\CourseMemberResource;
|
||||
use App\Member\Member;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
|
@ -14,7 +14,7 @@ class CourseIndexAction
|
|||
use AsAction;
|
||||
|
||||
/**
|
||||
* @return Collection<int, Course>
|
||||
* @return Collection<int, CourseMember>
|
||||
*/
|
||||
public function handle(Member $member): Collection
|
||||
{
|
||||
|
|
|
@ -4,15 +4,11 @@ namespace App\Course\Actions;
|
|||
|
||||
use App\Course\Models\Course;
|
||||
use App\Course\Models\CourseMember;
|
||||
use App\Course\Resources\CourseMemberResource;
|
||||
use App\Lib\JobMiddleware\JobChannels;
|
||||
use App\Lib\JobMiddleware\WithJobState;
|
||||
use App\Lib\Queue\TracksJob;
|
||||
use App\Member\Member;
|
||||
use App\Setting\NamiSettings;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
|
||||
use Lorisleiva\Actions\ActionRequest;
|
||||
use Lorisleiva\Actions\Concerns\AsAction;
|
||||
|
||||
|
@ -22,7 +18,7 @@ class CourseUpdateAction
|
|||
use TracksJob;
|
||||
|
||||
/**
|
||||
* @return Collection<int, Course>
|
||||
* @param array<string, string> $attributes
|
||||
*/
|
||||
public function handle(CourseMember $course, array $attributes): void
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ class StoreForGroupAction
|
|||
];
|
||||
|
||||
Membership::where($attributes)->active()->whereNotIn('member_id', $members)->get()
|
||||
->each(fn ($membership) => MembershipDestroyAction::run($membership));
|
||||
->each(fn ($membership) => MembershipDestroyAction::run($membership->id));
|
||||
|
||||
collect($members)
|
||||
->except(Membership::where($attributes)->active()->pluck('member_id'))
|
||||
|
|
|
@ -7,7 +7,6 @@ use App\Lib\JobMiddleware\WithJobState;
|
|||
use App\Lib\Queue\TracksJob;
|
||||
use App\Member\Member;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Validation\Rules\In;
|
||||
use Lorisleiva\Actions\ActionRequest;
|
||||
use Lorisleiva\Actions\Concerns\AsAction;
|
||||
|
||||
|
@ -16,13 +15,16 @@ class PaymentStoreAction
|
|||
use AsAction;
|
||||
use TracksJob;
|
||||
|
||||
/**
|
||||
* @param array<string, string> $attributes
|
||||
*/
|
||||
public function handle(Member $member, array $attributes): void
|
||||
{
|
||||
$member->createPayment($attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, array<int, string|In>>
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
|
|
@ -7,7 +7,6 @@ use App\Lib\JobMiddleware\WithJobState;
|
|||
use App\Lib\Queue\TracksJob;
|
||||
use App\Payment\Payment;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Validation\Rules\In;
|
||||
use Lorisleiva\Actions\ActionRequest;
|
||||
use Lorisleiva\Actions\Concerns\AsAction;
|
||||
|
||||
|
@ -16,13 +15,16 @@ class PaymentUpdateAction
|
|||
use AsAction;
|
||||
use TracksJob;
|
||||
|
||||
/**
|
||||
* @param array<string, string> $attributes
|
||||
*/
|
||||
public function handle(Payment $payment, array $attributes): void
|
||||
{
|
||||
$payment->update($attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, array<int, string|In>>
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
|
10
phpstan.neon
10
phpstan.neon
|
@ -28,16 +28,6 @@ parameters:
|
|||
count: 1
|
||||
path: app/Activity.php
|
||||
|
||||
-
|
||||
message: "#^Unable to resolve the template type TKey in call to function collect$#"
|
||||
count: 1
|
||||
path: app/Course/Requests/StoreRequest.php
|
||||
|
||||
-
|
||||
message: "#^Unable to resolve the template type TValue in call to function collect$#"
|
||||
count: 1
|
||||
path: app/Course/Requests/StoreRequest.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Dav\\\\AddressBookBackend\\:\\:getCard\\(\\) should return M of array\\{lastmodified\\: int, etag\\: string, uri\\: string, id\\: int, size\\: int\\} but returns false\\.$#"
|
||||
count: 1
|
||||
|
|
Loading…
Reference in New Issue