Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/tailwindcss/typograp…
Browse files Browse the repository at this point in the history
…hy-0.5.9
  • Loading branch information
AndyTWF authored Aug 19, 2023
2 parents 3336d7b + a9aa34c commit 17bee9d
Show file tree
Hide file tree
Showing 25 changed files with 2,491 additions and 1,469 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
SECURE_ROUTES=false

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1"]
php: ["8.2"]
composer: ["v2"]
steps:
- name: Checkout Code
Expand Down Expand Up @@ -106,14 +106,14 @@ jobs:
run: npx semantic-release

update-deploy-reference:
name: "Update Deploy App Reference"
name: "Trigger Docker Build"
runs-on: ubuntu-latest
if: github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/main')
needs: [ test ]
steps:
- name: Dispatch
uses: benc-uk/workflow-dispatch@v1
with:
workflow: update-flow.yml
workflow: build.yml
repo: ECFMP/flow_docker
token: ${{ secrets.DOCKER_WORKFLOW_TOKEN }}
5 changes: 3 additions & 2 deletions app/Http/Controllers/PluginApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use App\Models\FlightInformationRegion;
use App\Repository\FlowMeasureRepository;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class PluginApiController
{
Expand All @@ -19,7 +20,7 @@ public function __construct(FlowMeasureRepository $flowMeasureRepository)
$this->flowMeasureRepository = $flowMeasureRepository;
}

public function __invoke(): JsonResponse
public function __invoke(Request $request): JsonResponse
{
return response()->json(
[
Expand All @@ -28,7 +29,7 @@ public function __invoke(): JsonResponse
FlightInformationRegion::all()
),
'flow_measures' => FlowMeasureResource::collection(
$this->flowMeasureRepository->getApiRelevantFlowMeasures(false)
$this->flowMeasureRepository->getApiRelevantFlowMeasures($request->query('deleted', '0') === '1')
),
]
);
Expand Down
5 changes: 4 additions & 1 deletion app/Jobs/OptimiseTables.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@

class OptimiseTables implements ShouldQueue, ShouldBeUnique
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;

private const TABLES_TO_OPTIMISE = [
'events',
Expand Down
5 changes: 4 additions & 1 deletion app/Jobs/SendDiscordNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@

class SendDiscordNotifications implements ShouldQueue, ShouldBeUnique
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;

private readonly Sender $sender;

Expand Down
5 changes: 4 additions & 1 deletion app/Jobs/UpdateNetworkData.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@

class UpdateNetworkData implements ShouldQueue, ShouldBeUnique
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;

private readonly NetworkDataDownloader $networkDataDownloader;

Expand Down
6 changes: 3 additions & 3 deletions app/Models/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class Event extends Model
'vatcan_code'
];

protected $dates = [
'date_start',
'date_end',
protected $casts = [
'date_start' => 'datetime',
'date_end' => 'datetime',
];

public function flightInformationRegion(): BelongsTo
Expand Down
7 changes: 2 additions & 5 deletions app/Models/FlowMeasure.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,11 @@ class FlowMeasure extends Model
'end_time',
];

protected $dates = [
'start_time',
'end_time',
];

protected $casts = [
'mandatory_route' => 'array',
'filters' => 'array',
'start_time' => 'datetime',
'end_time' => 'datetime',
];

public function user(): BelongsTo
Expand Down
5 changes: 1 addition & 4 deletions app/Models/VatsimPilot.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,13 @@ class VatsimPilot extends Model
'distance_to_destination',
];

protected $dates = [
'estimated_arrival_time',
];

protected $casts = [
'cid' => 'integer',
'altitude' => 'integer',
'cruise_altitude' => 'integer',
'vatsim_pilot_status_id' => VatsimPilotStatus::class,
'distance_to_destination' => 'double',
'estimated_arrival_time' => 'datetime',
];

public function getCoordinate(): Coordinate
Expand Down
8 changes: 8 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Filament\Facades\Filament;
use Illuminate\Foundation\Vite;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\HtmlString;
use App\Http\Resources\EventResource;
use Illuminate\Support\ServiceProvider;
Expand Down Expand Up @@ -35,11 +36,18 @@ public function register()
*/
public function boot()
{
// Resource wrapping
AirportGroupResource::withoutWrapping();
EventResource::withoutWrapping();
FlowMeasureResource::withoutWrapping();
FlightInformationRegionResource::withoutWrapping();

// If we're in production, all routes and assets should be HTTPS
if (config('app.secure_routes')) {
URL::forceScheme('https');
}

// Filament
Filament::pushMeta([
new HtmlString('<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">'),
new HtmlString('<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">'),
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/DiscordServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function register()
return new DiscordMessageSender();
});
$this->app->singleton(EcfmpWebhook::class);
$this->app->singleton(Sender::class, fn() => new Sender(
$this->app->singleton(Sender::class, fn () => new Sender(
$this->flowMeasureMessageProviders(),
$this->app->make(DiscordInterface::class)
));
Expand Down
23 changes: 12 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"doctrine/dbal": "^3.3",
"filament/filament": "^2.14",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^9.21",
"laravel/framework": "^10.5",
"laravel/socialite": "^5.5",
"laravel/tinker": "^2.7",
"maatwebsite/excel": "^3.1",
Expand All @@ -22,23 +22,23 @@
"socialiteproviders/manager": "^4.1",
"spatie/laravel-activitylog": "^4.5",
"spatie/laravel-markdown": "^2.2",
"z3d0x/filament-logger": "^0.4.0"
"z3d0x/filament-logger": "^0.5"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.6",
"barryvdh/laravel-ide-helper": "^2.12",
"fakerphp/faker": "^1.9.1",
"laravel-lang/lang": "^10.7",
"laravel-lang/publisher": "^13.0",
"laravel-lang/lang": "^12.0",
"laravel-lang/publisher": "^14.0",
"laravel/pint": "^1.0.0",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.2",
"pestphp/pest-plugin-livewire": "^1.0",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.0"
"nunomaduro/collision": "^7.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"pestphp/pest-plugin-livewire": "^2.0",
"phpunit/phpunit": "^10.0",
"spatie/laravel-ignition": "^2.0"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -82,7 +82,8 @@
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "dev",
Expand Down
Loading

0 comments on commit 17bee9d

Please sign in to comment.