huge Laravel 10 upgrade

This commit is contained in:
HolgerHatGarKeineNode
2023-02-19 20:13:20 +01:00
parent 5c74f77beb
commit 12847f95f6
440 changed files with 46336 additions and 682 deletions

View File

@@ -0,0 +1,72 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Models\City;
use App\Models\Lecturer;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\Request;
class CityController extends Controller
{
/**
* Display a listing of the resource.
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
return City::query()
->with(['country:id,name'])
->select('id', 'name','country_id')
->orderBy('name')
->when(
$request->search,
fn(Builder $query) => $query
->where('name', 'ilike', "%{$request->search}%")
)
->when(
$request->exists('selected'),
fn(Builder $query) => $query->whereIn('id',
$request->input('selected', [])),
fn(Builder $query) => $query->limit(10)
)
->get();
}
/**
* Store a newly created resource in storage.
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
* @return \Illuminate\Http\Response
*/
public function show(Lecturer $lecturer)
{
//
}
/**
* Update the specified resource in storage.
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Lecturer $lecturer)
{
//
}
/**
* Remove the specified resource from storage.
* @return \Illuminate\Http\Response
*/
public function destroy(Lecturer $lecturer)
{
//
}
}

View File

@@ -2,7 +2,6 @@
namespace App\Http;
use App\Http\Middleware\CustomEnsureEmailVerified;
use App\Http\Middleware\NeedMeetupMiddleware;
use App\Http\Middleware\SetTimezoneForNovaMiddleware;
use App\Http\Middleware\SetTimezoneMiddleware;
@@ -13,7 +12,6 @@ class Kernel extends HttpKernel
/**
* The application's global HTTP middleware stack.
* These middleware are run during every request to your application.
*
* @var array<int, class-string|string>
*/
protected $middleware = [
@@ -28,7 +26,6 @@ class Kernel extends HttpKernel
/**
* The application's route middleware groups.
*
* @var array<string, array<int, class-string|string>>
*/
protected $middlewareGroups = [
@@ -74,7 +71,6 @@ class Kernel extends HttpKernel
/**
* The application's middleware aliases.
* Aliases may be used to conveniently assign middleware to routes and groups.
*
* @var array<string, class-string|string>
*/
protected $middlewareAliases = [
@@ -87,7 +83,6 @@ class Kernel extends HttpKernel
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'signed' => \App\Http\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => CustomEnsureEmailVerified::class,
'needMeetup' => NeedMeetupMiddleware::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
}

View File

@@ -0,0 +1,79 @@
<?php
namespace App\Http\Livewire\Meetup\Form;
use App\Models\Meetup;
use Illuminate\Validation\Rule;
use Livewire\Component;
use Livewire\WithFileUploads;
use WireUi\Traits\Actions;
class MeetupForm extends Component
{
use WithFileUploads;
use Actions;
public string $country;
public ?Meetup $meetup = null;
public ?string $fromUrl = '';
public $image;
protected $queryString = [
'fromUrl' => [
'except' => null,
],
];
public function rules()
{
return [
'image' => [Rule::requiredIf(! $this->meetup->id), 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240'],
'meetup.city_id' => 'required',
'meetup.name' => 'required',
'meetup.community' => 'required',
'meetup.telegram_link' => 'string|nullable|required_without_all:meetup.webpage,meetup.nostr,meetup.twitter_username,meetup.matrix_group',
'meetup.intro' => 'string|nullable',
'meetup.webpage' => 'string|url|nullable|required_without_all:meetup.telegram_link,meetup.nostr,meetup.twitter_username,meetup.matrix_group',
'meetup.nostr' => 'string|nullable|required_without_all:meetup.webpage,meetup.telegram_link,meetup.twitter_username,meetup.matrix_group',
'meetup.twitter_username' => 'string|nullable|required_without_all:meetup.webpage,meetup.telegram_link,meetup.nostr,meetup.matrix_group',
'meetup.matrix_group' => 'string|nullable|required_without_all:meetup.webpage,meetup.telegram_link,meetup.nostr,meetup.twitter_username'
];
}
public function mount()
{
if (!$this->meetup) {
$this->meetup = new Meetup([
'community' => 'einundzwanzig',
]);
} elseif (
!auth()
->user()
->can('update', $this->meetup)
) {
abort(403);
}
}
public function submit()
{
$this->validate();
$this->meetup->save();
if ($this->image) {
$this->meetup->addMedia($this->image)
->toMediaCollection('logo');
}
return redirect($this->fromUrl);
}
public function render()
{
return view('livewire.meetup.form.meetup-form');
}
}

View File

@@ -29,7 +29,7 @@ class Meetups extends Component
public function mount()
{
if (! auth()->user()) {
if (!auth()->user()) {
return to_route('auth.ln');
}
@@ -64,6 +64,9 @@ class Meetups extends Component
public function updatedSearch($value)
{
$this->meetups = Meetup::query()
->with([
'city',
])
->where('name', 'ilike', '%'.$value.'%')
->orderBy('name')
->limit(10)

View File

@@ -13,7 +13,7 @@ class RedirectIfAuthenticated
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next, string ...$guards): Response
{

View File

@@ -8,17 +8,17 @@
],
"license": "MIT",
"require": {
"php": "^8.1",
"php": "^8.2",
"akuechler/laravel-geoly": "^1.0",
"archtechx/enums": "^0.3.1",
"bensampo/laravel-embed": "^1.4",
"ebess/advanced-nova-media-library": "dev-master",
"bensampo/laravel-embed": "dev-master#81c7b81a4a3b742768b980f8d0c4fb3c191b7e4f",
"ebess/advanced-nova-media-library": "dev-master#b11d41b20d134103b3eb8de3d28b5b01993bc65e",
"ezadr/lnurl-php": "^1.0",
"gonoware/laravel-maps": "^2.0",
"gonoware/laravel-maps": "*",
"guzzlehttp/guzzle": "^7.2",
"itsmejoshua/novaspatiepermissions": "^1.0",
"jackiedo/timezonelist": "^5.1",
"joedixon/laravel-translation": "^2.1",
"joedixon/laravel-translation": "*",
"kornrunner/secp256k1": "^0.2.0",
"laravel/framework": "^10.0",
"laravel/horizon": "^5.13",
@@ -29,11 +29,10 @@
"laravel/tinker": "^2.8",
"league/glide-laravel": "^1.0",
"livewire/livewire": "^2.11",
"nova/start": "*",
"oneduo/nova-time-field": "^1.0",
"podcastindex/podcastindex-php": "^1.0",
"pusher/pusher-php-server": "5.0.3",
"qcod/laravel-gamify": "^1.0",
"pusher/pusher-php-server": "^7.2.2",
"qcod/laravel-gamify": "dev-master#6c0a55cf5351be5e7b4f31aa2499984853d895cf",
"ralphjsmit/laravel-seo": "^1.3",
"rappasoft/laravel-livewire-tables": "^2.11",
"sentry/sentry-laravel": "^3.2",
@@ -52,29 +51,26 @@
"spatie/laravel-options": "^1.0",
"spatie/laravel-ray": "^1.32",
"spatie/laravel-sluggable": "^3.4",
"spatie/laravel-tags": "^4.3",
"spatie/laravel-tags": "^4.3.7",
"spatie/nova-tags-field": "^4.0",
"staudenmeir/eloquent-has-many-deep": "^1.18",
"stijnvanouplines/blade-country-flags": "^1.0",
"stijnvanouplines/blade-country-flags": "dev-main#835e87782cdba43cd20fb7a1e98bcfcde59cf151",
"symfony/http-client": "^6.2",
"symfony/mailgun-mailer": "^6.2",
"wesselperik/nova-status-field": "^2.1",
"wireui/wireui": "^1.17",
"wireui/wireui": "dev-main",
"ziffmedia/nova-select-plus": "^2.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"fidum/laravel-blueprint-pestphp-addon": "^2.2",
"jasonmccreary/laravel-test-assertions": "^2.1",
"laravel-lang/attributes": "^2.2",
"laravel-lang/http-statuses": "^3.1",
"laravel-lang/lang": "^12.5",
"laravel-lang/publisher": "^14.6",
"laravel-shift/blueprint": "dev-laravel-10",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"naoray/blueprint-nova-addon": "dev-master#a7791033d1cb68d4e82631305e26b64e18464494",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^2.0"
@@ -123,9 +119,39 @@
"pestphp/pest-plugin": true
}
},
"minimum-stability": "stable",
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": [
{
"type": "path",
"url": "support/laravel-maps",
"options": {
"symlink": false
}
},
{
"type": "path",
"url": "support/laravel-translation",
"options": {
"symlink": false
}
},
{
"type": "vcs",
"url": "https://github.com/HolgerHatGarKeineNode/blade-country-flags"
},
{
"type": "vcs",
"url": "https://github.com/HolgerHatGarKeineNode/laravel-embed"
},
{
"type": "vcs",
"url": "https://github.com/HolgerHatGarKeineNode/laravel-gamify"
},
{
"type": "vcs",
"url": "https://github.com/HolgerHatGarKeineNode/advanced-nova-media-library"
},
{
"type": "vcs",
"url": "https://github.com/affektde/blueprint-nova-addon"

924
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,11 +3,11 @@ version: '3'
services:
laravel.test:
build:
context: ./docker/8.1
context: ./docker/8.2
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-8.1/app
image: sail-8.2/app
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:

View File

@@ -3,7 +3,7 @@ FROM ubuntu:22.04
LABEL maintainer="Taylor Otwell"
ARG WWWGROUP
ARG NODE_VERSION=16
ARG NODE_VERSION=18
ARG POSTGRES_VERSION=14
WORKDIR /var/www/html
@@ -11,19 +11,12 @@ WORKDIR /var/www/html
ENV DEBIAN_FRONTEND noninteractive
ENV TZ=UTC
RUN sed --in-place --regexp-extended "s/(\/\/)(archive\.ubuntu)/\1de.\2/" /etc/apt/sources.list
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 \
&& mkdir -p ~/.gnupg \
&& chmod 600 ~/.gnupg \
&& echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \
&& echo "keyserver hkp://keyserver.ubuntu.com:80" >> ~/.gnupg/dirmngr.conf \
&& gpg --recv-key 0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c \
&& gpg --export 0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c > /usr/share/keyrings/ppa_ondrej_php.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils \
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \
&& echo "deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
&& apt-get update \
&& apt-get install -y php8.2-cli php8.2-dev \
php8.2-pgsql php8.2-sqlite3 php8.2-gd \
@@ -32,16 +25,16 @@ RUN apt-get update \
php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap \
php8.2-intl php8.2-readline \
php8.2-ldap \
# php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole \
# php8.2-memcached php8.2-pcov php8.2-xdebug \
php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole \
php8.2-memcached php8.2-pcov php8.2-xdebug php8.2-gmp php8.2-imagick \
&& php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \
&& curl -sLS https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarn.gpg >/dev/null \
&& echo "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/pgdg.gpg >/dev/null \
&& echo "deb [signed-by=/usr/share/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null \
&& echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null \
&& echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& apt-get update \
&& apt-get install -y yarn \
&& apt-get install -y mysql-client \

View File

@@ -314,7 +314,7 @@
"💊 Orange Pill Now": "",
"Details": "",
"no bitcoin books yet": "keine Bitcoin Bücher",
"Perimeter search course date :name (100km)": "Perimeter search course date :name (100km)",
"Perimeter search course date :name (100km)": "Umkreissuche Bücherschränke :name (100km)",
"Perimeter search bookcase :name (5km)": "Umkreissuche Bücherschränke :name (5km)",
"Show dates": "Zeige Termine",
"Show content": "Zeige Content",
@@ -652,7 +652,7 @@
"choice": "Auswahl",
"By id": "nach ID",
"Twitter": "",
"New City": "Neue Stadt",
"New City": "Neue Stadt / Gegend",
"My meetups": "Meine Meetups",
"please limit your search here": "bitte begrenze deine Suche hier",
"Deselect": "Abwählen",
@@ -767,5 +767,6 @@
"Is this a news article?": "Dieser Artikel ist ein News-Artikel",
"Are your sure?": "Bist du dir sicher?",
"Nostr public key": "",
"Amount": ""
"Amount": "Anzahl",
"City\/Area": "Stadt\/Gegend"
}

View File

@@ -0,0 +1,11 @@
<?php
return array (
'' =>
array (
'' =>
array (
'' => '',
),
),
);

View File

@@ -764,5 +764,6 @@
"Is this a news article?": "",
"Are your sure?": "",
"Nostr public key": "",
"Amount": ""
"Amount": "",
"City\/Area": ""
}

View File

@@ -764,5 +764,6 @@
"Is this a news article?": "",
"Are your sure?": "",
"Nostr public key": "",
"Amount": ""
"Amount": "",
"City\/Area": ""
}

View File

@@ -0,0 +1,11 @@
<?php
return array (
'' =>
array (
'' =>
array (
'' => '',
),
),
);

View File

@@ -765,5 +765,6 @@
"Is this a news article?": "",
"Are your sure?": "",
"Nostr public key": "",
"Amount": ""
"Amount": "",
"City\/Area": ""
}

View File

@@ -0,0 +1,11 @@
<?php
return array (
'' =>
array (
'' =>
array (
'' => '',
),
),
);

View File

@@ -765,5 +765,6 @@
"Is this a news article?": "",
"Are your sure?": "",
"Nostr public key": "",
"Amount": ""
"Amount": "",
"City\/Area": ""
}

View File

@@ -0,0 +1,11 @@
<?php
return array (
'' =>
array (
'' =>
array (
'' => '',
),
),
);

View File

@@ -765,5 +765,6 @@
"Is this a news article?": "",
"Are your sure?": "",
"Nostr public key": "",
"Amount": ""
"Amount": "",
"City\/Area": ""
}

View File

@@ -0,0 +1,11 @@
<?php
return array (
'' =>
array (
'' =>
array (
'' => '',
),
),
);

View File

@@ -765,5 +765,6 @@
"Is this a news article?": "",
"Are your sure?": "",
"Nostr public key": "",
"Amount": ""
"Amount": "",
"City\/Area": ""
}

View File

@@ -0,0 +1,11 @@
<?php
return array (
'' =>
array (
'' =>
array (
'' => '',
),
),
);

View File

@@ -765,5 +765,6 @@
"Is this a news article?": "",
"Are your sure?": "",
"Nostr public key": "",
"Amount": ""
"Amount": "",
"City\/Area": ""
}

View File

@@ -0,0 +1,11 @@
<?php
return array (
'' =>
array (
'' =>
array (
'' => '',
),
),
);

View File

@@ -765,5 +765,6 @@
"Is this a news article?": "",
"Are your sure?": "",
"Nostr public key": "",
"Amount": ""
"Amount": "",
"City\/Area": ""
}

View File

@@ -0,0 +1,11 @@
<?php
return array (
'' =>
array (
'' =>
array (
'' => '',
),
),
);

View File

@@ -727,5 +727,6 @@
"Is this a news article?": "",
"Are your sure?": "",
"Nostr public key": "",
"Amount": ""
"Amount": "",
"City\/Area": ""
}

View File

@@ -0,0 +1,11 @@
<?php
return array (
'' =>
array (
'' =>
array (
'' => '',
),
),
);

View File

@@ -739,5 +739,6 @@
"Is this a news article?": "",
"Are your sure?": "",
"Nostr public key": "",
"Amount": ""
"Amount": "",
"City\/Area": ""
}

View File

@@ -0,0 +1,11 @@
<?php
return array (
'' =>
array (
'' =>
array (
'' => '',
),
),
);

Some files were not shown because too many files have changed in this diff Show More