diff --git a/.env.example b/.env.example index 2237966..f840b56 100644 --- a/.env.example +++ b/.env.example @@ -18,7 +18,7 @@ DB_PASSWORD=secret BROADCAST_DRIVER=log CACHE_DRIVER=file -FILESYSTEM_DRIVER=local +FILESYSTEM_DISK=local QUEUE_CONNECTION=sync SESSION_DRIVER=file SESSION_LIFETIME=120 @@ -56,3 +56,5 @@ AWS_USE_PATH_STYLE_ENDPOINT=false ELASTICSEARCH_HOSTS= MAIL_LIST_SERVICEWEB= + +PROJECT_UUID= diff --git a/.gitignore b/.gitignore index 074ae66..7d52d0f 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,6 @@ public/uploads/* /vendor .env .phpunit.result.cache -docker-compose.override.yml Homestead.json Homestead.yaml npm-debug.log diff --git a/.styleci.yml b/.styleci.yml index 2afcaa1..e0d8f5a 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -1,13 +1,11 @@ php: preset: laravel - version: 8 disabled: - unused_use - no_unused_imports finder: not-name: - index.php - - server.php js: finder: not-name: diff --git a/.vscode/settings.json b/.vscode/settings.json index 90ddb20..d99b249 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,5 +18,6 @@ "titleBar.inactiveBackground": "#51440399", "titleBar.inactiveForeground": "#e7e7e799" }, - "peacock.remoteColor": "#514403" + "peacock.remoteColor": "#514403", + "intelephense.environment.phpVersion": "8.1" } diff --git a/README.md b/README.md index 31e7a8e..fb924f4 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,5 @@ php artisan key:generate # BUMP LARAVEL MEP .env => remplacer MAIL_DRIVER par MAIL_MAILER +.env => remplacer FILESYSTEM_DRIVER par FILESYSTEM_DISK +.env rajouter PROJECT_UUID= diff --git a/app/Console/Commands/DeleteMediaArchive.php b/app/Console/Commands/DeleteMediaArchive.php index c275d3b..2098fdc 100644 --- a/app/Console/Commands/DeleteMediaArchive.php +++ b/app/Console/Commands/DeleteMediaArchive.php @@ -2,10 +2,11 @@ namespace App\Console\Commands; -use Illuminate\Console\Command; -use Illuminate\Support\Facades\Storage; -use App\Models\Sujet; use App\Models\Media; +use App\Models\Sujet; +use Illuminate\Console\Command; +use Illuminate\Support\Facades\Log; +use Illuminate\Support\Facades\Storage; class DeleteMediaArchive extends Command { @@ -20,19 +21,10 @@ class DeleteMediaArchive extends Command * The console command description. * * @var string + * @phpcs:disable Generic.Files.LineLength.TooLong */ protected $description = 'Suppression définitive de tous les médias (et leurs fichiers) qui ont été supprimés (en soft delete)'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } - /** * Execute the console command. * @@ -40,6 +32,7 @@ class DeleteMediaArchive extends Command */ public function handle() { + //phpcs:ignore Generic.Files.LineLength.TooLong $this->info('Vous allez supprimer définitivement tous les médias (et leurs fichiers) qui ont été supprimés (en soft delete).'); $choice = $this->choice('Etes-vous sûr de vouloir lancer ce traitement ?', ['y', 'n'], 'y'); @@ -82,12 +75,14 @@ class DeleteMediaArchive extends Command $bar->start(); foreach ($medias as $media) { - // supprime les fichiers médias stockés sur disque + // * supprime les fichiers médias stockés sur disque $files = Storage::files($media->folder . "/"); $filepath = preg_quote($media->folder . $media->uid, '/'); $matchingFiles = preg_grep('/^' . $filepath . '/', $files); - Storage::delete($matchingFiles); - // supprime le media en bdd + if (\is_array($matchingFiles)) { + $this->deleteFiles($matchingFiles); + } + // * supprime le media en bdd $media->forceDelete(); $bar->advance(); } @@ -96,4 +91,19 @@ class DeleteMediaArchive extends Command $this->line(""); $this->info('Fin du traitement'); } + + /** + * Delete files + * + * @param array $files + * @return void + */ + private function deleteFiles(array $files) + { + collect($files)->map(function (string $filename) { + if (!Storage::delete($filename)) { + Log::warning("Could not delete $filename from storage."); + } + }); + } } diff --git a/app/Console/Commands/ImportArcadiaFiles.php b/app/Console/Commands/ImportArcadiaFiles.php index 90741ad..8e1b44b 100644 --- a/app/Console/Commands/ImportArcadiaFiles.php +++ b/app/Console/Commands/ImportArcadiaFiles.php @@ -2,17 +2,19 @@ namespace App\Console\Commands; -use App\Models\Societe; -use Illuminate\Console\Command; -use Illuminate\Support\Facades\Storage; +use App\Http\Traits\MediaTools; use App\Models\Article; use App\Models\Marque; +use App\Models\Site; +use App\Models\Societe; use App\Models\Sujet; use App\Models\Typemedia; use App\Models\Typevue; -use App\Models\Site; use App\Models\Variante; -use App\Http\Traits\MediaTools; +use Illuminate\Console\Command; +use Illuminate\Support\Facades\Log; +use Illuminate\Support\Facades\Storage; +use League\Flysystem\FileNotFoundException; class ImportArcadiaFiles extends Command { @@ -32,25 +34,18 @@ class ImportArcadiaFiles extends Command */ protected $description = 'Import des fichiers xml Arcadia'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } - /** * Execute the console command. * * @return mixed + * @throws \League\Flysystem\FileNotFoundException If a file could not be read. + * @throws \ErrorException If a xml file could not be parsed. + * @phpcs:disable Generic.Metrics.CyclomaticComplexity.TooHigh */ public function handle() { $this->info('Démarrage du traitement'); - $files = Storage::disk('arcadia')->files(); + $files = collect(Storage::disk('arcadia')->files()); $bar = $this->output->createProgressBar(count($files) - 1); $bar->start(); @@ -61,182 +56,306 @@ class ImportArcadiaFiles extends Command } // ---- Récupération du contenu - $files = Storage::disk('arcadia')->get($filename); - $fileContent = simplexml_load_string($files); + if (!($fileContent = Storage::disk('arcadia')->get($filename))) { + throw new FileNotFoundException($filename); + } + if (!($fileContent = simplexml_load_string($fileContent))) { + throw new \ErrorException("Could not parse $filename from arcadia storage."); + } // ---- traitement du fichier - if (substr($filename, 0, 11) == "DAM_ARTICLE") { - foreach ($fileContent->dam as $row) { - $record = Article::where('noArt', $row->noArt)->first(); - if ($record) { -// Update record - $record->libCcial = $row->libCcial; - $record->codMarq = $row->codMarq; - $record->libMarq = $row->libMarq; - $record->codFamVte = $row->codFamVte; - $record->libFamVte = $row->libFamVte; - $record->codGencodAdm = $row->codGencodAdm; - $record->codGencodSymb = $row->codGencodSymb; - $record->codGencodPds = $row->codGencodPds; - $record->utilisableGroupe = $row->utilisableGroupe; - $record->save(); - } else { -// Insert new record - $record = new Article(); - $record->noArt = $row->noArt; - $record->libCcial = $row->libCcial; - $record->codMarq = $row->codMarq; - $record->libMarq = $row->libMarq; - $record->codFamVte = $row->codFamVte; - $record->libFamVte = $row->libFamVte; - $record->codGencodAdm = $row->codGencodAdm; - $record->codGencodSymb = $row->codGencodSymb; - $record->codGencodPds = $row->codGencodPds; - $record->utilisableGroupe = $row->utilisableGroupe; - $record->save(); - }//end if - }//end foreach - - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - } elseif (substr($filename, 0, 10) == "DAM_MARQUE") { - foreach ($fileContent->dam as $row) { - $record = Marque::where('codMarq', $row->codMarq)->first(); - if ($record) { -// Update record - $record->libMarq = $row->libMarq; - $record->save(); - } else { -// Insert new record - $record = new Marque(); - $record->codMarq = $row->codMarq; - $record->libMarq = $row->libMarq; - $record->save(); - } - } - - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - } elseif (substr($filename, 0, 15) == "DAM_MEDIA_SUJET") { - foreach ($fileContent->mediaSujet as $row) { - $record = Sujet::where('codeSujet', $row->code)->first(); - if ($record) { -// Update record - $record->libelle = $row->libelle; - $record->save(); - } else { -// Insert new record - $record = new Sujet(); - $record->codeSujet = $row->code; - $record->libelle = $row->libelle; - $record->save(); - } - } - - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - } elseif (substr($filename, 0, 20) == "DAM_MEDIA_TYPE_MEDIA") { - foreach ($fileContent->mediatypemedia as $row) { - $record = Typemedia::where('codeTypemedia', $row->code)->first(); - if ($record) { -// Update record - $record->libelle = $row->libelle; - $record->save(); - } else { -// Insert new record - $record = new Typemedia(); - $record->codeTypemedia = $row->code; - $record->libelle = $row->libelle; - $record->save(); - } - } - - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - } elseif (substr($filename, 0, 17) == "DAM_MEDIA_TYPEVUE") { - foreach ($fileContent->mediatypesvue as $row) { - $record = Typevue::where('codeTypevue', $row->code)->first(); - if ($record) { -// Update record - $record->libelle = $row->libelle; - $record->sujet_id = $row->sujet_id->mediasujet->code; - $record->save(); - } else { -// Insert new record - $record = new Typevue(); - $record->codeTypevue = $row->code; - $record->libelle = $row->libelle; - $record->sujet_id = $row->sujet_id->mediasujet->code; - $record->save(); - } - } - - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - } elseif (substr($filename, 0, 18) == "DAM_MEDIA_VARIANTE") { - foreach ($fileContent->mediavariante as $row) { - $record = Variante::where('codeVariante', $row->code)->first(); - if ($record) { -// Update record - $record->libelle = $row->libelle; - $record->sujet_id = $row->sujet_id->children()[0]->code; - $record->typevue_id = $row->CodeTypeVue->mediatypesvue->code; - $record->save(); - } else { -// Insert new record - $record = new Variante(); - $record->codeVariante = $row->code; - $record->libelle = $row->libelle; - $record->sujet_id = $row->sujet_id->children()[0]->code; - $record->typevue_id = $row->CodeTypeVue->mediatypesvue->code; - $record->save(); - } - } - - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - } elseif (substr($filename, 0, 20) == "DAM_SITE_PROD_GROUPE") { - foreach ($fileContent->SITE_PROD_GRP as $row) { - $record = Site::where('id', $row->code)->first(); - if ($record) { -// Update record - $record->libelle = $row->libelle; - $record->save(); - } else { -// Insert new record - $record = new Site(); - $record->id = $row->code; - $record->libelle = $row->libelle; - $record->save(); - } - } - - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - } elseif (substr($filename, 0, 11) == "DAM_SOCIETE") { - foreach ($fileContent->dam as $row) { - $record = Societe::where('id', $row->codSociete)->first(); - if ($record) { -// Update record - $record->libelle = $row->nomSociete; - $record->save(); - } else { -// Insert new record - $record = new Societe(); - $record->id = $row->codSociete; - $record->libelle = $row->nomSociete; - $record->save(); - } - } - - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - }//end if + switch (true) { + case substr($filename, 0, 11) == 'DAM_ARTICLE': + $this->insertDamArticle($fileContent); + $this->deleteFile($filename); + break; + case substr($filename, 0, 10) == 'DAM_MARQUE': + $this->insertDamMarque($fileContent); + $this->deleteFile($filename); + break; + case substr($filename, 0, 15) == 'DAM_MEDIA_SUJET': + $this->insertDamMediaSujet($fileContent); + $this->deleteFile($filename); + break; + case substr($filename, 0, 20) == 'DAM_MEDIA_TYPE_MEDIA': + $this->insertDamMediaTypeMedia($fileContent); + $this->deleteFile($filename); + break; + case substr($filename, 0, 17) == 'DAM_MEDIA_TYPEVUE': + $this->insertDamMediaTypeVue($fileContent); + $this->deleteFile($filename); + break; + case substr($filename, 0, 18) == 'DAM_MEDIA_VARIANTE': + $this->insertDamMediaVariante($fileContent); + $this->deleteFile($filename); + break; + case substr($filename, 0, 20) == 'DAM_SITE_PROD_GROUPE': + $this->insertDamSiteProdGroupe($fileContent); + $this->deleteFile($filename); + break; + case substr($filename, 0, 11) == 'DAM_SOCIETE': + $this->insertDamSociete($fileContent); + $this->deleteFile($filename); + break; + default: + throw new \ErrorException("Unhandled file $filename"); + } //end switch $bar->advance(); - }//end foreach + } //end foreach $bar->finish(); $this->line(""); $this->info('Fin du traitement'); } + + /** + * Update or Create Dam Article + * + * @param \SimpleXMLElement $fileContent + * @return void + * @throws \Throwable On save failure. + */ + private function insertDamArticle(\SimpleXMLElement $fileContent) + { + /** @var \SimpleXMLElement $row */ + foreach ($fileContent->dam as $row) { + /** @var \App\Models\Article|null $record */ + $record = Article::where('noArt', $row->noArt)->first(); + if ($record) { + // * Update record + $record->libCcial = $row->libCcial; + $record->codMarq = $row->codMarq; + $record->libMarq = $row->libMarq; + $record->codFamVte = $row->codFamVte; + $record->libFamVte = $row->libFamVte; + $record->codGencodAdm = $row->codGencodAdm; + $record->codGencodSymb = $row->codGencodSymb; + $record->codGencodPds = $row->codGencodPds; + $record->utilisableGroupe = $row->utilisableGroupe; + $record->saveOrFail(); + } else { + // * Insert new record + $record = new Article(); + $record->noArt = $row->noArt; + $record->libCcial = $row->libCcial; + $record->codMarq = $row->codMarq; + $record->libMarq = $row->libMarq; + $record->codFamVte = $row->codFamVte; + $record->libFamVte = $row->libFamVte; + $record->codGencodAdm = $row->codGencodAdm; + $record->codGencodSymb = $row->codGencodSymb; + $record->codGencodPds = $row->codGencodPds; + $record->utilisableGroupe = $row->utilisableGroupe; + $record->saveOrFail(); + } //end if + } //end foreach + } + + /** + * Update or Create Dam Marque + * + * @param \SimpleXMLElement $fileContent + * @return void + * @throws \Throwable On save failure. + */ + private function insertDamMarque(\SimpleXMLElement $fileContent) + { + /** @var \SimpleXMLElement $row */ + foreach ($fileContent->dam as $row) { + /** @var \App\Models\Marque|null $record */ + $record = Marque::where('codMarq', $row->codMarq)->first(); + if ($record) { + // * Update record + $record->libMarq = $row->libMarq; + $record->saveOrFail(); + } else { + // * Insert new record + $record = new Marque(); + $record->codMarq = $row->codMarq; + $record->libMarq = $row->libMarq; + $record->saveOrFail(); + } + } + } + + /** + * Update or Create Dam Media Sujet + * + * @param \SimpleXMLElement $fileContent + * @return void + * @throws \Throwable On save failure. + */ + private function insertDamMediaSujet(\SimpleXMLElement $fileContent) + { + /** @var \SimpleXMLElement $row */ + foreach ($fileContent->mediaSujet as $row) { + /** @var \App\Models\Sujet|null $record */ + $record = Sujet::where('codeSujet', $row->code)->first(); + if ($record) { + // * Update record + $record->libelle = $row->libelle; + $record->saveOrFail(); + } else { + // * Insert new record + $record = new Sujet(); + $record->codeSujet = $row->code; + $record->libelle = $row->libelle; + $record->saveOrFail(); + } + } + } + + /** + * Update or Create Dam Media Type Media + * + * @param \SimpleXMLElement $fileContent + * @return void + * @throws \Throwable On save failure. + */ + private function insertDamMediaTypeMedia(\SimpleXMLElement $fileContent) + { + /** @var \SimpleXMLElement $row */ + foreach ($fileContent->mediatypemedia as $row) { + /** @var \App\Models\Typemedia|null $record */ + $record = Typemedia::where('codeTypemedia', $row->code)->first(); + if ($record) { + // * Update record + $record->libelle = $row->libelle; + $record->saveOrFail(); + } else { + // * Insert new record + $record = new Typemedia(); + $record->codeTypemedia = $row->code; + $record->libelle = $row->libelle; + $record->saveOrFail(); + } + } + } + + /** + * Update or Create Dam Media Type Vue + * + * @param \SimpleXMLElement $fileContent + * @return void + * @throws \Throwable On save failure. + */ + private function insertDamMediaTypeVue(\SimpleXMLElement $fileContent) + { + /** @var \SimpleXMLElement $row */ + foreach ($fileContent->mediatypesvue as $row) { + /** @var \App\Models\Typevue|null $record */ + $record = Typevue::where('codeTypevue', $row->code)->first(); + if ($record) { + // * Update record + $record->libelle = $row->libelle; + $record->sujet_id = $row->sujet_id->mediasujet->code; + $record->saveOrFail(); + } else { + // * Insert new record + $record = new Typevue(); + $record->codeTypevue = $row->code; + $record->libelle = $row->libelle; + $record->sujet_id = $row->sujet_id->mediasujet->code; + $record->saveOrFail(); + } + } + } + + /** + * Update or Create Dam Media Variante + * + * @param \SimpleXMLElement $fileContent + * @return void + * @throws \Throwable On save failure. + */ + private function insertDamMediaVariante(\SimpleXMLElement $fileContent) + { + /** @var \SimpleXMLElement $row */ + foreach ($fileContent->mediavariante as $row) { + /** @var \App\Models\Typevue|null $record */ + $record = Variante::where('codeVariante', $row->code)->first(); + if ($record) { + // * Update record + $record->libelle = $row->libelle; + $record->sujet_id = $row->sujet_id->children()[0]->code; + $record->typevue_id = $row->CodeTypeVue->mediatypesvue->code; + $record->saveOrFail(); + } else { + // * Insert new record + $record = new Variante(); + $record->codeVariante = $row->code; + $record->libelle = $row->libelle; + $record->sujet_id = $row->sujet_id->children()[0]->code; + $record->typevue_id = $row->CodeTypeVue->mediatypesvue->code; + $record->saveOrFail(); + } + } + } + + /** + * Update or Create Dam Site Prod Groupe + * + * @param \SimpleXMLElement $fileContent + * @return void + * @throws \Throwable On save failure. + */ + private function insertDamSiteProdGroupe(\SimpleXMLElement $fileContent) + { + /** @var \SimpleXMLElement $row */ + foreach ($fileContent->SITE_PROD_GRP as $row) { + /** @var \App\Models\Typevue|null $record */ + $record = Site::where('id', $row->code)->first(); + if ($record) { + // * Update record + $record->libelle = $row->libelle; + $record->saveOrFail(); + } else { + // * Insert new record + $record = new Site(); + $record->id = $row->code; + $record->libelle = $row->libelle; + $record->saveOrFail(); + } + } + } + + /** + * Update or Create Dam Societe + * + * @param \SimpleXMLElement $fileContent + * @return void + * @throws \Throwable On save failure. + */ + private function insertDamSociete(\SimpleXMLElement $fileContent) + { + /** @var \SimpleXMLElement $row */ + foreach ($fileContent->dam as $row) { + /** @var \App\Models\Typevue|null $record */ + $record = Societe::where('id', $row->codSociete)->first(); + if ($record) { + // * Update record + $record->libelle = $row->nomSociete; + $record->saveOrFail(); + } else { + // * Insert new record + $record = new Societe(); + $record->id = $row->codSociete; + $record->libelle = $row->nomSociete; + $record->saveOrFail(); + } + } + } + + /** + * Delete file + * + * @param string $filename + * @return void + */ + private function deleteFile(string $filename) + { + if (!Storage::disk('arcadia')->delete($filename)) { + Log::warning("Could not delete $filename from arcadia storage."); + } + } } diff --git a/app/Console/Commands/ImportMedia.php b/app/Console/Commands/ImportMedia.php index e545725..fce3eb3 100644 --- a/app/Console/Commands/ImportMedia.php +++ b/app/Console/Commands/ImportMedia.php @@ -2,14 +2,18 @@ namespace App\Console\Commands; -use Illuminate\Console\Command; -use Illuminate\Support\Facades\Storage; -use Illuminate\Support\Facades\File; use App\Http\Traits\MediaTools; use App\Models\Article; +use App\Models\Dossier; use App\Models\Marque; use App\Models\Media; -use App\Models\Dossier; +use Illuminate\Console\Command; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\File; +use Illuminate\Support\Facades\Log; +use Illuminate\Support\Facades\Storage; +use Illuminate\Support\Str; +use League\Flysystem\FileNotFoundException; class ImportMedia extends Command { @@ -29,16 +33,6 @@ class ImportMedia extends Command */ protected $description = 'Import des fichiers xml Média Visuel Arcadia'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } - /** * Execute the console command. * @@ -48,25 +42,233 @@ class ImportMedia extends Command { $this->info('Démarrage du traitement'); - $files = File::glob(storage_path('export_arcadia') . "/DAM_MEDIA_VISUEL_*.*"); + $files = File::glob(storage_path('export_arcadia') . '/DAM_MEDIA_VISUEL_*.*'); $this->line("-> Import du fichier DAM_MEDIA_VISUEL"); - // ---- Traitement de l'import des XML Visuel + + $this->xmlVisuels($files); + $this->associateMediasArticles($files); + $this->associateMediasMarques($files); + $this->associateMediasSocietes($files); + + $this->line(""); + $this->info('Fin du traitement'); + } + + /** + * Traitement de l'association media <-> societe + * + * @param array $files + * @return void + * @throws \ErrorException If a xml file could not be parsed. + * @throws \League\Flysystem\FileNotFoundException If a file could not be read. + */ + private function associateMediasSocietes(array $files): void + { + $files = File::glob(storage_path('export_arcadia') . "/DAM_ASSO_SOCIETE_*.*"); + $this->line("-> Import du fichier DAM_ASSO_SOCIETE"); foreach ($files as $filename) { $path = explode("/", $filename); $filename = $path[count($path) - 1]; // ---- Récupération du contenu - $oneFile = Storage::disk('arcadia')->get($filename); - $fileContent = simplexml_load_string($oneFile); + if (!($oneFile = Storage::disk('arcadia')->get($filename))) { + throw new FileNotFoundException($filename); + } + if (!($fileContent = simplexml_load_string($oneFile))) { + throw new \ErrorException("Could not parse $filename from arcadia storage."); + } + + // ---- traitement du fichier + $bar = $this->output->createProgressBar(count($fileContent->mediaassosociete) - 1); + $bar->start(); + + /** @var \SimpleXMLElement $row */ + foreach ($fileContent->mediaassosociete as $row) { + /** @var \App\Models\Media|null */ + $record = Media::where('arcadia_id', $row->codeVisuel)->first(); + if ($record) { + // * attache la societe au média + $record->societes()->attach($row->codSociete); + } else { + $this->line("\nDAM_ASSO_SOCIETE : le media n°$row->codeVisuel n'existe pas"); + } + $bar->advance(); + } + $bar->finish(); + + $this->deleteFile($filename); + } //end foreach + } + + /** + * Traitement de l'association media <-> marque + * + * @param array $files + * @return void + * @throws \ErrorException If a xml file could not be parsed. + * @throws \League\Flysystem\FileNotFoundException If a file could not be read. + */ + private function associateMediasMarques(array $files): void + { + $files = File::glob(storage_path('export_arcadia') . "/DAM_ASSO_MARQUE_*.*"); + $this->line("-> Import du fichier DAM_ASSO_MARQUE"); + foreach ($files as $filename) { + $path = explode("/", $filename); + $filename = $path[count($path) - 1]; + + // ---- Récupération du contenu + if (!($oneFile = Storage::disk('arcadia')->get($filename))) { + throw new FileNotFoundException($filename); + } + if (!($fileContent = simplexml_load_string($oneFile))) { + throw new \ErrorException("Could not parse $filename from arcadia storage."); + } + + // ---- traitement du fichier + $bar = $this->output->createProgressBar(count($fileContent->mediaassomarque) - 1); + $bar->start(); + + /** @var \SimpleXMLElement $row */ + foreach ($fileContent->mediaassomarque as $row) { + /** @var \App\Models\Media|null */ + $record = Media::where('arcadia_id', $row->codeVisuel)->first(); + if ($record) { + if ($record->marques->contains($row->codMarq)) { + $this->line("\nDAM_ASSO_MARQUE : le media n°$row->codeVisuel est déjà associé à cette marque."); + } else { + // * attache la marque au média + $record->marques()->attach($row->codMarq); + } + } else { + $this->line("\nDAM_ASSO_MARQUE : le media n°$row->codeVisuel n'existe pas"); + } + $bar->advance(); + } + $bar->finish(); + + $this->deleteFile($filename); + } //end foreach + } + + /** + * Traitement de l'association media <-> article + * + * @param array $files + * @return void + * @throws \ErrorException If a xml file could not be parsed. + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException If a model cant be found on transaction. + * @throws \League\Flysystem\FileNotFoundException If a file could not be read. + * @throws \Throwable If saving fails. + * @phpcs:disable Generic.Metrics.NestingLevel.TooHigh + * @phpcs:disable Squiz.Commenting.FunctionCommentThrowTag.WrongNumber + */ + private function associateMediasArticles(array $files): void + { + $files = File::glob(storage_path('export_arcadia') . "/DAM_ASSO_ARTICLE_*.*"); + $this->line("-> Import du fichier DAM_ASSO_ARTICLE"); + /** @var string $filename */ + foreach ($files as $filename) { + $path = explode("/", $filename); + $filename = $path[count($path) - 1]; + + // ---- Récupération du contenu + if (!($oneFile = Storage::disk('arcadia')->get($filename))) { + throw new FileNotFoundException($filename); + } + if (!($fileContent = simplexml_load_string($oneFile))) { + throw new \ErrorException("Could not parse $filename from arcadia storage."); + } + + // ---- traitement du fichier + $bar = $this->output->createProgressBar(count($fileContent->mediaassoarticle) - 1); + $bar->start(); + + /** @var \SimpleXMLElement $row */ + foreach ($fileContent->mediaassoarticle as $row) { + /** @var \App\Models\Media|null */ + $record = Media::where('arcadia_id', $row->codeVisuel)->first(); + if ($record) { + /** @var \App\Models\Article|null */ + $article = Article::where('noArt', $row->noArt)->first(); + if ($article) { + // * attache l'article au média + $record->articles()->syncWithoutDetaching($article->id); + // * recherche un dossier lié à la marque de l'article + $marque_id = $article->codMarq; + /** @var \App\Models\Dossier|null */ + $dossier = Dossier::whereHas("marques", function ($query) use ($marque_id) { + $query->where("codMarq", $marque_id); + })->first(); + + if ($dossier) { + // * attache le dossier marque au Média + $record->dossier_id = $dossier->id; + $record->save(); + $this->line("Liason media n°$row->codeVisuel à la marque n°$article->libMarq"); + } else { + DB::transaction(function () use ($record, $marque_id) { + /** @var \App\Models\Marque */ + $marque = Marque::where('codMarq', '=', $marque_id)->firstOrFail(); + // * On cree le dossier + $dossier = new Dossier(); + $dossier->libelle = $marque->libMarq; + $dossier->sujet_id = 1; + $dossier->system = false; + $dossier->saveOrFail(); + $dossier->marques()->syncWithoutDetaching($marque_id); + $dossier->saveOrFail(); + + $record->dossier_id = $dossier->id; + $record->saveOrFail(); + }); + } //end if + } else { + // phpcs:ignore Generic.Files.LineLength.TooLong + $this->line("\nDAM_ASSO_ARTICLE : le media n°$row->codeVisuel ne peut être lié à l'article n°$row->noArt"); + } //end if + } else { + $this->line("\nDAM_ASSO_ARTICLE : le media n°$row->codeVisuel n'existe pas"); + } //end if + $bar->advance(); + } //end foreach + $bar->finish(); + + $this->deleteFile($filename); + } //end foreach + } + + /** + * Traitement de l'import des XML Visuel + * + * @param array $files + * @return void + * @throws \League\Flysystem\FileNotFoundException If a file could not be read. + * @throws \ErrorException If a xml file could not be parsed. + */ + private function xmlVisuels(array $files): void + { + foreach ($files as $filename) { + $path = explode("/", $filename); + $filename = $path[count($path) - 1]; + + // ---- Récupération du contenu + if (!($oneFile = Storage::disk('arcadia')->get($filename))) { + throw new FileNotFoundException($filename); + } + if (!($fileContent = simplexml_load_string($oneFile))) { + throw new \ErrorException("Could not parse $filename from arcadia storage."); + } // ---- traitement du fichier $bar = $this->output->createProgressBar(count($fileContent->MEDIA_VISUEL) - 1); $bar->start(); + /** @var \SimpleXMLElement $row */ foreach ($fileContent->MEDIA_VISUEL as $row) { + /** @var \App\Models\Media|null */ $record = Media::where('arcadia_id', $row->code)->first(); if (!$record) { -// Insert new record + // * Insert new record $record = new Media(); $record->arcadia_id = $row->code; if ($row->extension != "") { @@ -90,7 +292,9 @@ class ImportMedia extends Command } else { $record->typemedia_id = 1; } - if ($row->codeTypeVue != "") { + if ( + $row->codeTypeVue != "" + ) { $record->typevue_id = $row->codeTypeVue; } $record->commentaire = $row->commentaire; @@ -123,177 +327,67 @@ class ImportMedia extends Command } $record->statut = config('services.statut.public_etendu'); - // Affectation d'un dossier et d'un uid + // Affectation d'un dossier et d'un uid. $destinationPath = $this->getMediaFolder() . "/"; $record->folder = $destinationPath; - $record->uid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000, mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)); + $record->uid = Str::uuid(); + $mediaFile = "/images/{$record->arcadia_id}.{$record->extension}"; + if (Storage::disk('arcadia')->exists($mediaFile)) { + // * déplacement du média et renommage du fichier + if (!($fileContent = Storage::disk('arcadia')->get($mediaFile))) { + throw new \ErrorException("Could not read $mediaFile from arcadia storage."); + } + // * According to config, should throw exception on failure. + Storage::disk('local')->put( + $fileContent, + "{$destinationPath}{$record->uid}.$record->extension" + ); - $mediaFile = "/images/" . $record->arcadia_id . "." . $record->extension; - $fileExists = Storage::disk('arcadia')->exists($mediaFile); - if ($fileExists) { - // déplacement du média et renommage du fichier - $file = Storage::disk('arcadia')->get($mediaFile); - $full_path_source = Storage::disk('arcadia')->getDriver()->getAdapter()->applyPathPrefix($mediaFile); - $full_path_dest = Storage::disk('local')->getDriver()->getAdapter()->applyPathPrefix($destinationPath . $record->uid . '.' . $record->extension); - File::move($full_path_source, $full_path_dest); - - // calcul de la taille du média - $record->taille = $this->formatBytes($this->getFileSize($full_path_dest)); + // * calcul de la taille du média + $record->taille = $this->formatBytes(Storage::disk('local') + ->size("{$destinationPath}{$record->uid}.$record->extension")); } else { - // on applique une image par défaut + // * on applique une image par défaut $record->extension = "jpg"; - Storage::disk('local')->copy("assets/images/default.jpg", $destinationPath . $record->uid . '.' . $record->extension); + Storage::disk('local')->copy( + "assets/images/default.jpg", + "{$destinationPath}{$record->uid}.{$record->extension}" + ); - // calcul de la taille du média - $record->taille = $this->formatBytes($this->getFileSize("public/" . $destinationPath . $record->uid . '.' . $record->extension)); - } + // * calcul de la taille du média + $record->taille = $this->formatBytes(Storage::disk('local') + ->size("{$destinationPath}{$record->uid}.{$record->extension}")); + } //end if - $record->save(); + $record->saveOrFail(); // ---- Creation des vignettes de base $this->createSysThumb($record); // ---- Creation des vignettes en lien avec le sujet du média $this->createThumb($record); } else { - $this->line("\nDAM_MEDIA_VISUEL : le media n°" . $row->code . " existe déjà en base"); - }//end if + $this->line("\nDAM_MEDIA_VISUEL : le media n°$row->code existe déjà en base"); + } //end if $bar->advance(); - }//end foreach + } //end foreach $bar->finish(); - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - }//end foreach + $this->deleteFile($filename); + } //end foreach + } - - // ---- Traitement de l'association media <-> article - $files = File::glob(storage_path('export_arcadia') . "/DAM_ASSO_ARTICLE_*.*"); - $this->line("-> Import du fichier DAM_ASSO_ARTICLE"); - foreach ($files as $filename) { - $path = explode("/", $filename); - $filename = $path[count($path) - 1]; - - // ---- Récupération du contenu - $oneFile = Storage::disk('arcadia')->get($filename); - $fileContent = simplexml_load_string($oneFile); - - // ---- traitement du fichier - $bar = $this->output->createProgressBar(count($fileContent->mediaassoarticle) - 1); - $bar->start(); - foreach ($fileContent->mediaassoarticle as $row) { - $record = Media::where('arcadia_id', $row->codeVisuel)->first(); - if ($record) { - $article = Article::where('noArt', $row->noArt)->first(); - if ($article) { - // attache l'article au média - $record->articles()->syncWithoutDetaching($article->id); - // recherche un dossier lié à la marque de l'article - $marque_id = $article->codMarq; - $dossier = Dossier::whereHas("marques", function ($query) use ($marque_id) { - $query->where("codMarq", $marque_id); - })->first(); - - if ($dossier) { - // attache le dossier marque au Média - $record->dossier_id = $dossier->id; - $record->save(); - $this->line("Liason media n°" . $row->codeVisuel . " à la marque n°" . $article->libMarq); - } else { - $marque = Marque::where('codMarq', '=', $marque_id)->first(); - // On cree le dossier - $dossier = new Dossier(); - $dossier->libelle = $marque->libMarq; - $dossier->sujet_id = 1; - $dossier->system = false; - $dossier->save(); - $dossier->marques()->syncWithoutDetaching($marque_id); - $dossier->save(); - - $record->dossier_id = $dossier->id; - $record->save(); - // $this->line("Liason media n°" . $row->codeVisuel . " à la marque n°" . $article->libMarq); - } - } else { - $this->line("\nDAM_ASSO_ARTICLE : le media n°" . $row->codeVisuel . " ne peut être lié à l'article n°" . $row->noArt); - }//end if - } else { - $this->line("\nDAM_ASSO_ARTICLE : le media n°" . $row->codeVisuel . " n'existe pas"); - }//end if - $bar->advance(); - }//end foreach - $bar->finish(); - - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - }//end foreach - - // ---- Traitement de l'association media <-> marque - $files = File::glob(storage_path('export_arcadia') . "/DAM_ASSO_MARQUE_*.*"); - $this->line("-> Import du fichier DAM_ASSO_MARQUE"); - foreach ($files as $filename) { - $path = explode("/", $filename); - $filename = $path[count($path) - 1]; - - // ---- Récupération du contenu - $oneFile = Storage::disk('arcadia')->get($filename); - $fileContent = simplexml_load_string($oneFile); - - // ---- traitement du fichier - $bar = $this->output->createProgressBar(count($fileContent->mediaassomarque) - 1); - $bar->start(); - foreach ($fileContent->mediaassomarque as $row) { - $record = Media::where('arcadia_id', $row->codeVisuel)->first(); - if ($record) { - if ($record->marques->contains($row->codMarq)) { - $this->line("\nDAM_ASSO_MARQUE : le media n°" . $row->codeVisuel . " est déjà associé à cette marque."); - } else { - // attache la marque au média - $record->marques()->attach($row->codMarq); - } - } else { - $this->line("\nDAM_ASSO_MARQUE : le media n°" . $row->codeVisuel . " n'existe pas"); - } - $bar->advance(); - } - $bar->finish(); - - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - }//end foreach - - // ---- Traitement de l'association media <-> societe - $files = File::glob(storage_path('export_arcadia') . "/DAM_ASSO_SOCIETE_*.*"); - $this->line("-> Import du fichier DAM_ASSO_SOCIETE"); - foreach ($files as $filename) { - $path = explode("/", $filename); - $filename = $path[count($path) - 1]; - - // ---- Récupération du contenu - $oneFile = Storage::disk('arcadia')->get($filename); - $fileContent = simplexml_load_string($oneFile); - - // ---- traitement du fichier - $bar = $this->output->createProgressBar(count($fileContent->mediaassosociete) - 1); - $bar->start(); - foreach ($fileContent->mediaassosociete as $row) { - $record = Media::where('arcadia_id', $row->codeVisuel)->first(); - if ($record) { - // attache la societe au média - $record->societes()->attach($row->codSociete); - } else { - $this->line("\nDAM_ASSO_SOCIETE : le media n°" . $row->codeVisuel . " n'existe pas"); - } - $bar->advance(); - } - $bar->finish(); - - // ---- Suppression du fichier - Storage::disk('arcadia')->delete($filename); - }//end foreach - - $this->line(""); - $this->info('Fin du traitement'); + /** + * Delete file + * + * @param string $filename + * @return void + */ + private function deleteFile(string $filename): void + { + if (!Storage::disk('arcadia')->delete($filename)) { + Log::warning("Could not delete $filename from arcadia storage."); + } } } diff --git a/app/Console/Commands/LDCWebStatusChecker.php b/app/Console/Commands/LDCWebStatusChecker.php index 016e454..1ffec37 100644 --- a/app/Console/Commands/LDCWebStatusChecker.php +++ b/app/Console/Commands/LDCWebStatusChecker.php @@ -1,18 +1,19 @@ version(); - // Send by cURL + // Send by cURL. $url = 'https://ldc-web.ldc.fr/api/status-checker'; $ch = curl_init($url); $payload = ['token' => 'CE8S52Qq7stf5k8frF4T', 'datas' => json_encode($data)]; curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - $result = curl_exec($ch); + curl_exec($ch); curl_close($ch); + return 0; } } diff --git a/app/Console/Commands/RegenerateThumbnails.php b/app/Console/Commands/RegenerateThumbnails.php index cb50e5d..9c29f76 100644 --- a/app/Console/Commands/RegenerateThumbnails.php +++ b/app/Console/Commands/RegenerateThumbnails.php @@ -2,10 +2,10 @@ namespace App\Console\Commands; -use Illuminate\Console\Command; -use App\Models\Sujet; -use App\Models\Media; use App\Http\Traits\MediaTools; +use App\Models\Media; +use App\Models\Sujet; +use Illuminate\Console\Command; class RegenerateThumbnails extends Command { @@ -25,16 +25,6 @@ class RegenerateThumbnails extends Command */ protected $description = 'Regénération de toutes les vignettes des médias'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } - /** * Execute the console command. * diff --git a/app/Console/Commands/ReindexElasticMedia.php b/app/Console/Commands/ReindexElasticMedia.php index 0a1f53b..05612ff 100644 --- a/app/Console/Commands/ReindexElasticMedia.php +++ b/app/Console/Commands/ReindexElasticMedia.php @@ -2,8 +2,8 @@ namespace App\Console\Commands; -use Illuminate\Console\Command; use App\Models\Media; +use Illuminate\Console\Command; class ReindexElasticMedia extends Command { diff --git a/app/Console/Commands/reindexElasticOneMedia.php b/app/Console/Commands/ReindexElasticOneMedia.php similarity index 81% rename from app/Console/Commands/reindexElasticOneMedia.php rename to app/Console/Commands/ReindexElasticOneMedia.php index 9dcace7..ea174af 100644 --- a/app/Console/Commands/reindexElasticOneMedia.php +++ b/app/Console/Commands/ReindexElasticOneMedia.php @@ -2,10 +2,10 @@ namespace App\Console\Commands; -use Illuminate\Console\Command; use App\Models\Media; +use Illuminate\Console\Command; -class reindexElasticOneMedia extends Command +class ReindexElasticOneMedia extends Command { /** * The name and signature of the console command. @@ -21,16 +21,6 @@ class reindexElasticOneMedia extends Command */ protected $description = 'Command description'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } - /** * Execute the console command. * diff --git a/app/Console/Commands/SendMediasModificationsReport.php b/app/Console/Commands/SendMediasModificationsReport.php index 30c890e..9cbd83b 100644 --- a/app/Console/Commands/SendMediasModificationsReport.php +++ b/app/Console/Commands/SendMediasModificationsReport.php @@ -21,16 +21,6 @@ class SendMediasModificationsReport extends Command */ protected $description = 'Run the SendMediasModificationsReport Manually'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } - /** * Execute the console command. * diff --git a/app/Enums/LogType.php b/app/Enums/LogType.php index 594a29d..cb86d76 100644 --- a/app/Enums/LogType.php +++ b/app/Enums/LogType.php @@ -1,17 +1,18 @@ , \Psr\Log\LogLevel::*> + */ + protected $levels = []; + /** * A list of the exception types that are not reported. * - * @var array> + * @var array> */ protected $dontReport = []; diff --git a/app/Exceptions/InvalidXmlException.php b/app/Exceptions/InvalidXmlException.php index a24f1f0..55379f8 100644 --- a/app/Exceptions/InvalidXmlException.php +++ b/app/Exceptions/InvalidXmlException.php @@ -2,8 +2,6 @@ namespace App\Exceptions; -use ErrorException; - -class InvalidXmlException extends ErrorException +class InvalidXmlException extends \ErrorException { } diff --git a/app/Http/Controllers/MediaController.php b/app/Http/Controllers/MediaController.php index cd7c1ef..a180370 100644 --- a/app/Http/Controllers/MediaController.php +++ b/app/Http/Controllers/MediaController.php @@ -903,14 +903,17 @@ class MediaController extends Controller $destinationPath = $this->getMediaFolder() . "/"; $uid = Str::uuid(); $filename = $uid . ".jpg"; - Storage::copy("assets/images/default.jpg", $destinationPath . $filename); + + if (!(Storage::copy("assets/images/default.jpg", $destinationPath . $filename))) { + throw new \ErrorException("Failed to copy $filename on storage"); + } $n->arcadia_id = null; $n->libelle = (strlen($n->libelle) + 5) >= 50 ? substr($n->libelle, 0, - ((strlen($n->libelle) - 50) + 5)) . '_copy' : $n->libelle . '_copy'; $n->folder = $destinationPath; $n->uid = $uid; $n->extension = 'jpg'; - $n->taille = $this->formatBytes($this->getFileSize($destinationPath . $filename)); + $n->taille = $this->formatBytes(Storage::size($destinationPath . $filename)); $im = new \imagick($destinationPath . $filename); // pour dev sous windows (pour cause de bug sur imagick avec les chemins relatifs) diff --git a/app/Http/Controllers/PanierController.php b/app/Http/Controllers/PanierController.php index 11c4e3a..733c075 100644 --- a/app/Http/Controllers/PanierController.php +++ b/app/Http/Controllers/PanierController.php @@ -123,8 +123,7 @@ class PanierController extends Controller /** @var \App\Models\Panier $basket */ $basket = Panier::whereId($request->basket_id)->firstOrFail(); - // TODO: Replace this with deleteOrFail after laravel bump. - $basket->delete(); + $basket->deleteOrFail(); return response()->json(); } diff --git a/app/Http/Controllers/UploadController.php b/app/Http/Controllers/UploadController.php index cf9209b..e7213ac 100644 --- a/app/Http/Controllers/UploadController.php +++ b/app/Http/Controllers/UploadController.php @@ -2,14 +2,15 @@ namespace App\Http\Controllers; +use App\Http\Traits\MediaTools; +use App\Models\Historique; +use App\Models\Media; +use App\Models\Site; +use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Storage; -use Illuminate\Http\Request; -use App\Models\Media; -use App\Models\Site; -use App\Models\Historique; -use App\Http\Traits\MediaTools; +use Illuminate\Support\Str; class UploadController extends Controller { @@ -46,9 +47,10 @@ class UploadController extends Controller if ($request->hasFile('files')) { $filesa = []; - $file = $request->file('files'); + /** @var array<\Illuminate\Http\UploadedFile> */ + $files = $request->file('files'); - foreach ($file as $files) { + foreach ($files as $file) { $is_last_chunk = false; $is_chunked_upload = !empty($headers['content-range']); if ($is_chunked_upload) { @@ -59,8 +61,8 @@ class UploadController extends Controller } } - $extension = strtolower($files->getClientOriginalExtension()); - $originalName = str_replace("." . $extension, "", $files->getClientOriginalName()); + $extension = strtolower($file->getClientOriginalExtension()); + $originalName = str_replace("." . $extension, "", $file->getClientOriginalName()); if (!in_array($extension, $acceptFileTypes)) { return array("false"); } @@ -72,24 +74,28 @@ class UploadController extends Controller } $uploadPath = public_path() . '/uploads/'; - $files->move($uploadPath, $filename); + $file->move($uploadPath, $filename); - // si c'est le dernier morceux d'un fichier + // * si c'est le dernier morceux d'un fichier if ($is_last_chunk) { if ($dossier = opendir($uploadPath)) { $dirFiles = array(); - // on compile tous les chunk du fichier + // * on compile tous les chunk du fichier while (false !== ($fichier = readdir($dossier))) { if ($fichier != '.' && $fichier != '..') { if (strpos($fichier, $uid) !== false) { - $dirFiles[$fichier] = str_replace("." . $extension, "", str_replace($uid . "_", "", $fichier)); + $dirFiles[$fichier] = str_replace( + ".{$extension}", + "", + str_replace("{$uid}_", "", $fichier) + ); } } } closedir($dossier); - // on les trie pour les assembler dans le bon ordre + // * on les trie pour les assembler dans le bon ordre asort($dirFiles, SORT_NUMERIC); - // on les assemble dans un fichier final + // * on les assemble dans un fichier final $filename = $uid . '.' . $extension; foreach ($dirFiles as $key => $fichier) { $file = fopen($uploadPath . $key, 'rb'); @@ -105,20 +111,24 @@ class UploadController extends Controller }//end if }//end if - // si c'est le dernier morceau d'un fichier ou que c'est un envoi simple + // * si c'est le dernier morceau d'un fichier ou que c'est un envoi simple if ($is_last_chunk || !$is_chunked_upload) { $destinationPath = $this->getMediaFolder() . "/"; - // si on upload un média pour remplacer un fichier par un autre + // * si on upload un média pour remplacer un fichier par un autre if ($replaceMediaId != 0) { - // on récupère le média à modifier + // * on récupère le média à modifier /** @var \App\Models\Media|null */ $media = Media::where('id', $replaceMediaId)->first(); - // On déplace le fichier dans le répertoire des médias - Storage::move("uploads/" . $filename, $destinationPath . $filename); + // * On déplace le fichier dans le répertoire des médias + if (!Storage::move("uploads/{$filename}", $destinationPath . $filename)) { + throw new \ErrorException( + "Could not move uploaded file $filename into {$destinationPath}{$filename}" + ); + } - // supprime les fichiers médias stockés sur disque + // * supprime les fichiers médias stockés sur disque $filesfF = Storage::files($media->folder . "/"); $filepath = preg_quote($media->folder . $media->uid, '/'); $matchingFiles = preg_grep('/^' . $filepath . '/', $filesfF); @@ -127,16 +137,20 @@ class UploadController extends Controller $media->isDefault = 0; $media->save(); } else { - // On déplace le fichier dans le répertoire des médias - Storage::move("uploads/" . $filename, $destinationPath . $filename); + // * On déplace le fichier dans le répertoire des médias + if (!Storage::move("uploads/{$filename}", $destinationPath . $filename)) { + throw new \ErrorException( + "Could not move uploaded file $filename into {$destinationPath}{$filename}" + ); + } - // on créé un média en bdd + // * on créé un média en bdd $media = new Media(); $media->dossier_id = $dossier_id; $media->sujet_id = $sujet_id; - // Par défaut FR + // * Par défaut FR $media->langue_id = 1; - // Par défaut propriété de la marque + // * Par défaut propriété de la marque $media->copyright_id = 3; }//end if @@ -147,10 +161,10 @@ class UploadController extends Controller $media->created_by = Auth::user()->id; } $media->uid = $uid; - $media->taille = $this->formatBytes($this->getFileSize($destinationPath . $filename)); + $media->taille = $this->formatBytes(Storage::size($destinationPath . $filename)); switch ($extension) { - // Photo (1) + // * Photo (1) case 'gif': case 'jpeg': case 'jpg': @@ -159,7 +173,7 @@ class UploadController extends Controller case 'pdf': case 'psd': $media->typemedia_id = 1; - $im = new \imagick($destinationPath . $filename); + $im = new \Imagick($destinationPath . $filename); if (in_array($extension, array("pdf", "ai", "psd", "gif"))) { $im->setIteratorIndex(0); @@ -188,12 +202,12 @@ class UploadController extends Controller $this->createThumb($media); } break; - // Illustration/Vectorielle (2) + // * Illustration/Vectorielle (2) case 'svg': $media->typemedia_id = 2; $media->save(); break; - // Vidéo (3) + // * Vidéo (3) case 'mp4': $media->typemedia_id = 3; $getID3 = new \getID3(); @@ -204,7 +218,7 @@ class UploadController extends Controller } $media->save(); break; - // Audio (4) + // * Audio (4) case 'mp3': $media->typemedia_id = 4; $getID3 = new \getID3(); @@ -222,7 +236,7 @@ class UploadController extends Controller $media->addToIndex(); // ---- Historique des actions - $historique = new historique(); + $historique = new Historique(); if ($user = Auth::user()) { $historique->user_id = $user->id; } @@ -266,7 +280,7 @@ class UploadController extends Controller $acceptFileTypes = array('gif','jpeg', 'jpg','png','mp4','mp3','psd','ai','svg','pdf'); if (!$uid) { - $uid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000, mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)); + $uid = Str::uuid(); } $file = $request->file('files'); @@ -281,43 +295,57 @@ class UploadController extends Controller return array("error" => "Ce type de fichier n'est pas accepté."); } - // check the error status + // * check the error status if ($file->getError() != 0) { Log::error('error ' . $file->getError() . ' in file ' . $request->resumableFilename); } - // init the destination file (format .part<#chunk> - // the file is stored in a temporary directory - if (isset($request->resumableIdentifier) && trim($request->resumableIdentifier) != '') { - $temp_dir = 'uploads/' . $request->resumableIdentifier; - } - $dest_file = $temp_dir . '/' . $request->resumableFilename . '.part' . $request->resumableChunkNumber; + $temp_dir = 'uploads'; - // create the temporary directory + /** + * init the destination file (format .part<#chunk> + * the file is stored in a temporary directory + */ + if (isset($request->resumableIdentifier) && trim($request->resumableIdentifier) != '') { + $temp_dir .= "/{$request->resumableIdentifier}"; + } + $dest_file = "{$temp_dir}/{$request->resumableFilename}.part{$request->resumableChunkNumber}"; + + // * create the temporary directory if (!is_dir($temp_dir)) { mkdir($temp_dir, 0777, true); } - // move the temporary file + // * move the temporary file if (!move_uploaded_file($file->getPathname(), $dest_file)) { - Log::error('Error saving (move_uploaded_file) chunk ' . $request->resumableChunkNumber . ' for file ' . $request->resumableFilename); + Log::error( + //phpcs:ignore Generic.Files.LineLength.TooLong + "Error saving (move_uploaded_file) chunk $request->resumableChunkNumber for file $request->resumableFilename" + ); } else { $filename = $uid . '.' . $extension; - // check if all the parts present, and create the final destination file - $isLast = $this->createFileFromChunks($temp_dir, $request->resumableFilename, $request->resumableChunkSize, $request->resumableTotalSize, $request->resumableTotalChunks, $filename); + // * check if all the parts present, and create the final destination file + $isLast = $this->createFileFromChunks( + $temp_dir, + $request->resumableFilename, + $request->resumableChunkSize, + $request->resumableTotalSize, + $request->resumableTotalChunks, + $filename + ); if ($isLast) { $destinationPath = $this->getMediaFolder() . "/"; - // si on upload un média pour remplacer un fichier par un autre + // * si on upload un média pour remplacer un fichier par un autre if ($replaceMediaId != 0) { - // on récupère le média à modifier - /** @var \App\Models\Media|null $media */ - $media = Media::where('id', $replaceMediaId)->first(); + // * on récupère le média à modifier + /** @var \App\Models\Media $media */ + $media = Media::where('id', $replaceMediaId)->firstOrFail(); - // On déplace le fichier dans le répertoire des médias + // * On déplace le fichier dans le répertoire des médias Storage::move("uploads/" . $filename, $destinationPath . $filename); - // supprime les fichiers médias stockés sur disque + // * supprime les fichiers médias stockés sur disque $filesfF = Storage::files($media->folder . "/"); $filepath = preg_quote($media->folder . $media->uid, '/'); $matchingFiles = preg_grep('/^' . $filepath . '/', $filesfF); @@ -326,16 +354,16 @@ class UploadController extends Controller $media->isDefault = 0; $media->save(); } else { - // On déplace le fichier dans le répertoire des médias + // * On déplace le fichier dans le répertoire des médias Storage::move("uploads/" . $filename, $destinationPath . $filename); - // on créé un média en bdd + // * on créé un média en bdd $media = new Media(); $media->dossier_id = $dossier_id; $media->sujet_id = $sujet_id; - // Par défaut FR + // * Par défaut FR $media->langue_id = 1; - // Par défaut propriété de la marque + // * Par défaut propriété de la marque $media->copyright_id = 3; }//end if @@ -349,7 +377,7 @@ class UploadController extends Controller $media->taille = $this->formatBytes($this->getFileSize($destinationPath . $filename)); switch ($extension) { - // Photo (1) + // * Photo (1) case 'gif': case 'jpeg': case 'jpg': @@ -359,7 +387,6 @@ class UploadController extends Controller case 'psd': $media->typemedia_id = 1; $im = new \imagick($destinationPath . $filename); - // $im = new \imagick(realpath($destinationPath.$filename)); if (in_array($extension, array("pdf", "ai", "psd", "gif"))) { $im->setIteratorIndex(0); } @@ -387,12 +414,12 @@ class UploadController extends Controller $this->createThumb($media); } break; - // Illustration/Vectorielle (2) + // * Illustration/Vectorielle (2) case 'svg': $media->typemedia_id = 2; $media->save(); break; - // Vidéo (3) + // * Vidéo (3) case 'mp4': $media->typemedia_id = 3; $getID3 = new \getID3(); @@ -403,7 +430,7 @@ class UploadController extends Controller } $media->save(); break; - // Audio (4) + // * Audio (4) case 'mp3': $media->typemedia_id = 4; $getID3 = new \getID3(); @@ -421,7 +448,7 @@ class UploadController extends Controller $media->addToIndex(); // ---- Historique des actions - $historique = new historique(); + $historique = new Historique(); if ($user = Auth::user()) { $historique->user_id = $user->id; } @@ -445,16 +472,23 @@ class UploadController extends Controller * Check if all the parts exist, and * gather all the parts of the file together * - * @param string $temp_dir - the temporary directory holding all the parts of the file - * @param string $fileName - the original file name - * @param string $chunkSize - each chunk size (in bytes) - * @param string $totalSize - original file size (in bytes) + * @param string $temp_dir The temporary directory holding all the parts of the file. + * @param string $fileName The original file name. + * @param integer $chunkSize Each chunk size (in bytes). + * @param integer $totalSize Original file size (in bytes). + * @param integer $total_files + * @param string $finalName * @return boolean */ - private function createFileFromChunks($temp_dir, $fileName, $chunkSize, $totalSize, $total_files, $finalName) - { - - // count all the parts of this file + private function createFileFromChunks( + string $temp_dir, + string $fileName, + int $chunkSize, + int $totalSize, + int $total_files, + string $finalName + ): bool { + // * count all the parts of this file $total_files_on_server_size = 0; $temp_total = 0; foreach (scandir($temp_dir) as $file) { @@ -462,14 +496,13 @@ class UploadController extends Controller $tempfilesize = filesize($temp_dir . '/' . $file); $total_files_on_server_size = $temp_total + $tempfilesize; } - // check that all the parts are present - // If the Size of all the chunks on the server is equal to the size of the file uploaded. + // * check that all the parts are present + // * If the Size of all the chunks on the server is equal to the size of the file uploaded. if ($total_files_on_server_size >= $totalSize) { - // create the final destination file - if (($fp = fopen('uploads/' . $finalName, 'w')) !== false) { + // * create the final destination file + if (($fp = fopen("uploads/{$finalName}", 'w')) !== false) { for ($i = 1; $i <= $total_files; $i++) { - fwrite($fp, file_get_contents($temp_dir . '/' . $fileName . '.part' . $i)); - // Log::info('writing chunk '.$i); + fwrite($fp, file_get_contents("{$temp_dir}/{$fileName}.part{$i}")); } fclose($fp); } else { @@ -477,8 +510,8 @@ class UploadController extends Controller return false; } - // rename the temporary directory (to avoid access from other - // concurrent chunks uploads) and than delete it + // * rename the temporary directory (to avoid access from other + // * concurrent chunks uploads) and than delete it if (rename($temp_dir, $temp_dir . '_UNUSED')) { $this->rrmdir($temp_dir . '_UNUSED'); } else { @@ -492,10 +525,11 @@ class UploadController extends Controller /** * Delete a directory RECURSIVELY * - * @param string $dir - directory path + * @param string $dir Directory path. + * @return void * @link http://php.net/manual/en/function.rmdir.php */ - private function rrmdir($dir) + private function rrmdir(string $dir): void { if (is_dir($dir)) { $objects = scandir($dir); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index fd6179c..1f06006 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -276,8 +276,7 @@ class UserController extends Controller $media->owner()->associate($userPourRemplacer); $media->saveOrFail(); }); - // TODO: use deleteOrFail after upgrate to laravel 8. - if ($user->delete()) { + if ($user->deleteOrFail()) { session()->flash('success', trans('L\'utilisateur à été supprimé')); return redirect(route('user.index')); } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index c81fd6e..2a1c2f8 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -16,7 +16,7 @@ class Kernel extends HttpKernel protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, - \Fruitcake\Cors\HandleCors::class, + \Illuminate\Http\Middleware\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, @@ -34,7 +34,6 @@ class Kernel extends HttpKernel \App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, - // \Illuminate\Session\Middleware\AuthenticateSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, @@ -57,6 +56,7 @@ class Kernel extends HttpKernel protected $routeMiddleware = [ 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index aeb9d80..c3ee348 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -11,6 +11,7 @@ class Authenticate extends Middleware * * @param \Illuminate\Http\Request $request * @return string|null + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ protected function redirectTo($request) { diff --git a/app/Http/Traits/MediaTools.php b/app/Http/Traits/MediaTools.php index 07531e9..bb91fc0 100644 --- a/app/Http/Traits/MediaTools.php +++ b/app/Http/Traits/MediaTools.php @@ -14,10 +14,11 @@ trait MediaTools } /** - * Create thumbnail for a Media + * Create thumbnail image for a Media * * @param Media $media * @return void + * @throws \ImagickException On errors. */ public function createThumb(Media $media) { @@ -36,11 +37,11 @@ trait MediaTools foreach ($formats as $format) { $fp = public_path("/{$media->folder}{$media->uid}_{$format->libelle}.{$format->extension}"); - $targetWidth = $format->largeur; - if ($format->hauteur == 0) { - $targetHeight = floor(($media->hauteur * $format->largeur) / $media->largeur); + $targetWidth = \floatval($format->largeur); + if (\floatval($format->hauteur) == 0) { + $targetHeight = \floatval(floor(($media->hauteur * $format->largeur) / $media->largeur)); } else { - $targetHeight = $format->hauteur; + $targetHeight = \floatval($format->hauteur); } $im->setImageFormat($format->extension); @@ -53,9 +54,16 @@ trait MediaTools unset($im); } - public function createSysThumb($media) + /** + * Create Sys thumbnail image for a Media. + * + * @param \App\Models\Media $media + * @return void + * @throws \ImagickException On errors. + */ + public function createSysThumb(Media $media) { - $mediaPath = public_path() . "/" . $media->folder . $media->uid . "." . $media->extension; + $mediaPath = public_path("/{$media->folder}{$media->uid}.{$media->extension}"); $im = new \Imagick(); $im->readImage($mediaPath); @@ -63,18 +71,22 @@ trait MediaTools $extension = "png"; $im->setIteratorIndex(0); } else { + /** @var string */ $extension = $media->extension; } /* Handle CMJN - DOESN'T WORK if ($im->getImageColorspace() === \Imagick::COLORSPACE_CMYK){ - $im->transformImageColorspace(\Imagick::COLORSPACE_RGB); - }*/ + $im->transformImageColorspace(\Imagick::COLORSPACE_RGB); + } + */ // * create preview - $format = Format::withoutGlobalScope('App\Scopes\SystemScope')->where('libelle', '=', 'preview')->first(); - $fp = public_path() . "/" . $media->folder . $media->uid . '_preview.' . $extension; + /** @var \App\Models\Format $format */ + $format = Format::withoutGlobalScope('App\Scopes\SystemScope') + ->where('libelle', '=', 'preview')->firstOrFail(); + $fp = public_path("/{$media->folder}{$media->uid}_preview.{$extension}"); if ($media->extension == "gif") { if ($media->largeur >= $format->largeur || $media->hauteur >= $format->hauteur || $media->largeur == "") { $im = $im->coalesceImages(); @@ -94,27 +106,36 @@ trait MediaTools // * create thumb - $format = Format::withoutGlobalScope('App\Scopes\SystemScope')->where('libelle', '=', 'thumb')->first(); + /** @var \App\Models\Format $format */ + $format = Format::withoutGlobalScope('App\Scopes\SystemScope') + ->where('libelle', '=', 'thumb')->firstOrFail(); if ($extension != "png") { $im->setImageBackgroundColor('#ffffff'); $im->setImageAlphaChannel(\Imagick::ALPHACHANNEL_REMOVE); $im->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN); $im->stripImage(); } - $fp = public_path() . "/" . $media->folder . $media->uid . '_thumb.' . $extension; + $fp = public_path("/{$media->folder}{$media->uid}_thumb.{$extension}"); $im->thumbnailImage($format->largeur, $format->hauteur, true); $im->writeImage($fp); $im->destroy(); unset($im); } - public function getMediaFolder() + /** + * Returns the media folder path name + * + * @return string + * @throws \ErrorException If creating the folder fails. + */ + public function getMediaFolder(): string { $mediaPath = "medias/"; $directories = Storage::allDirectories($mediaPath); $selectedFolder = ""; // * on obtient le dernier dossier créé + /** @var string $foldername */ foreach ($directories as $key => $foldername) { if ($selectedFolder < $foldername) { $selectedFolder = $foldername; @@ -123,14 +144,18 @@ trait MediaTools // * si on n'a pas de dossier, on le créé if ($selectedFolder == "") { $selectedFolder = $mediaPath . uniqid(); - Storage::makeDirectory($selectedFolder); + if (!Storage::makeDirectory($selectedFolder)) { + throw new \ErrorException("Could not create $selectedFolder"); + } } else { // * on compte le nombre de fichier $files = Storage::allFiles($selectedFolder); // * si on en a plus de 1000, on créé un nouveau dossier if (count($files) > 1000) { $selectedFolder = $mediaPath . uniqid(); - Storage::makeDirectory($selectedFolder); + if (!Storage::makeDirectory($selectedFolder)) { + throw new \ErrorException("Could not create $selectedFolder"); + } } } return $selectedFolder; @@ -144,31 +169,36 @@ trait MediaTools return $size; } - public function formatBytes($octet, $precision = 2) + /** + * Convert file size to human readable string + * + * @param integer $octet + * @param integer $precision + * @return string + */ + public function formatBytes(int $octet, int $precision = 2): string { // * Array contenant les differents unités $unite = array('octet', 'Ko', 'Mo', 'Go'); - // * octet - if ($octet < 1000) { - return $octet . $unite[0]; - } else { - if ($octet < 1000000) { + switch (true) { + // * octet + case $octet < 1000: + return $octet . $unite[0]; // * ko - $ko = round($octet / 1024, 2); - return $ko . $unite[1]; - } else { + case $octet < 1000000: + return $octet . $unite[1]; // * Mo ou Go + default: if ($octet < 1000000000) { // * Mo - $mo = round($octet / (1024 * 1024), 2); + $mo = round($octet / (1024 * 1024), $precision); return $mo . $unite[2]; } else { // * Go - $go = round($octet / (1024 * 1024 * 1024), 2); + $go = round($octet / (1024 * 1024 * 1024), $precision); return $go . $unite[3]; } - } } } diff --git a/app/Jobs/Arcadia/XArcadiaFlux.php b/app/Jobs/Arcadia/XArcadiaFlux.php index f2e4715..449ba86 100644 --- a/app/Jobs/Arcadia/XArcadiaFlux.php +++ b/app/Jobs/Arcadia/XArcadiaFlux.php @@ -91,7 +91,7 @@ abstract class XArcadiaFlux implements ShouldQueue 'File %s could not be moved to archives (not found)', $filename ), - LogType::warning() + LogType::warning ); return; } @@ -111,7 +111,7 @@ abstract class XArcadiaFlux implements ShouldQueue 'File %s could not be moved to archives', $filename ), - LogType::warning() + LogType::warning ); } } catch (\Exception $e) { @@ -120,7 +120,7 @@ abstract class XArcadiaFlux implements ShouldQueue 'File %s could not be moved to archives', $filename ), - LogType::warning() + LogType::warning ); } } @@ -154,7 +154,7 @@ abstract class XArcadiaFlux implements ShouldQueue /** * Get the concerned disk * - * @return Filesystem + * @return \Illuminate\Contracts\Filesystem\Filesystem */ protected function getDisk(): Filesystem { @@ -164,38 +164,38 @@ abstract class XArcadiaFlux implements ShouldQueue /** * Logs data * - * @param string $message - * @param LogType $logtype + * @param string $message + * @param LogType|null $logtype * @return void * @throws \ErrorException If logtype is not handled. */ protected function log(string $message, LogType $logtype = null): void { if (!$logtype) { - $logtype = LogType::debug(); + $logtype = LogType::debug; } $message = sprintf('%s : %s', get_class($this), $message); - switch ($logtype->value) { - case LogType::debug()->value: + switch ($logtype) { + case LogType::debug: Log::debug($message); break; - case LogType::info()->value: + case LogType::info: Log::info($message); break; - case LogType::log()->value: + case LogType::log: Log::log($message); break; - case LogType::warning()->value: + case LogType::warning: Log::warning($message); break; - case LogType::error()->value: + case LogType::error: Log::error($message); break; - case LogType::critical()->value: + case LogType::critical: Log::critical($message); break; default: - throw new \ErrorException(sprintf('%s : unhandled log type %s', get_class($this), $logtype->label)); + throw new \ErrorException(sprintf('%s : unhandled log type %s', get_class($this), $logtype->name)); } //end switch $this->consolePrint($message, $logtype); } @@ -212,21 +212,21 @@ abstract class XArcadiaFlux implements ShouldQueue { $this->clearProgressBarFromLine(); if ($this->console) { - switch ($logtype->value) { - case LogType::debug()->value: - case LogType::info()->value: - case LogType::log()->value: + switch ($logtype) { + case LogType::debug: + case LogType::info: + case LogType::log: $this->console->info($message); break; - case LogType::warning()->value: + case LogType::warning: $this->console->comment($message); break; - case LogType::error()->value: - case LogType::critical()->value: + case LogType::error: + case LogType::critical: $this->console->error($message); break; default: - throw new \ErrorException(sprintf('%s : unhandled log type %s', get_class($this), $logtype->label)); + throw new \ErrorException(sprintf('%s : unhandled log type %s', get_class($this), $logtype->name)); } } } diff --git a/app/Jobs/Arcadia/XmlArcadiaMediasIn.php b/app/Jobs/Arcadia/XmlArcadiaMediasIn.php index abf99f1..093dc0b 100644 --- a/app/Jobs/Arcadia/XmlArcadiaMediasIn.php +++ b/app/Jobs/Arcadia/XmlArcadiaMediasIn.php @@ -4,7 +4,6 @@ namespace App\Jobs\Arcadia; use App\Exceptions\AbortXmlImportException; use App\Exceptions\ElasticSearchException; -use App\Lib\Utils; use App\Models\ArcadiaLink; use App\Models\Media; use Illuminate\Database\Eloquent\ModelNotFoundException; @@ -137,10 +136,7 @@ class XmlArcadiaMediasIn extends XmlJobs __LINE__, $e ); - // ! Someting went wrong report($report); - // ! TODO: Remove this after adding kwaadpepper/exception-handler. - Utils::sendEmailErrorManually($report); throw new AbortXmlImportException($report->getMessage()); } //end try }); diff --git a/app/Jobs/Arcadia/XmlJobs.php b/app/Jobs/Arcadia/XmlJobs.php index a79dee6..2bc0f8e 100644 --- a/app/Jobs/Arcadia/XmlJobs.php +++ b/app/Jobs/Arcadia/XmlJobs.php @@ -5,9 +5,9 @@ namespace App\Jobs\Arcadia; use App\Enums\LogType; use App\Exceptions\AbortXmlImportException; use App\Exceptions\InvalidXmlException; -use App\Lib\Utils; use Illuminate\Contracts\Filesystem\FileNotFoundException; use Illuminate\Database\QueryException; +use Illuminate\Mail\Message; use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Mail; @@ -78,7 +78,6 @@ abstract class XmlJobs extends XArcadiaFlux callable $saveCallback = null, callable $afterSaveCallback = null ): void { - /** @var Filesystem */ $disk = $this->getDisk(); $this->log('Démarrage du traitement'); @@ -86,7 +85,7 @@ abstract class XmlJobs extends XArcadiaFlux $files = $disk->files(); - $total = count(array_filter($files, function ($filename) { + $total = count(array_filter($files, function (string $filename) { if ($this->fileHasToBeIgnored($filename)) { return false; } @@ -95,6 +94,7 @@ abstract class XmlJobs extends XArcadiaFlux $this->startProgressBar($total); + /** @var string $filename */ foreach ($files as $filename) { if ($this->fileHasToBeIgnored($filename)) { continue; @@ -121,7 +121,7 @@ abstract class XmlJobs extends XArcadiaFlux throw new InvalidXmlException('XML is Invalid (simplexml_load_string returned false)'); } } catch (\ErrorException $e) { - throw new InvalidXmlException('XML is Invalid', 0, $e); + throw new InvalidXmlException('XML is Invalid', 0, 1, __FILE__, __LINE__, $e); } $data = $this->extract($xmlContent); @@ -176,7 +176,7 @@ abstract class XmlJobs extends XArcadiaFlux $message, $e->getLine() ), - LogType::critical() + LogType::critical ); $this->sendInvalidXmlEmail($filename, $e); $this->moveToInvalid($filename); @@ -189,18 +189,14 @@ abstract class XmlJobs extends XArcadiaFlux $e->getMessage(), $e->getLine() ), - LogType::error() + LogType::error ); report($e); - // ! TODO: Remove this after adding kwaadpepper/exception-handler. - Utils::sendEmailErrorManually($e); continue; // * ignore the file } catch (QueryException $e) { - $this->log(implode(' ', $e->errorInfo), LogType::critical()); + $this->log(implode(' ', $e->errorInfo), LogType::critical); report($e); - // ! TODO: Remove this after adding kwaadpepper/exception-handler. - Utils::sendEmailErrorManually($e); continue; } catch (FileNotFoundException $e) { // This happens because of concurent xml jobs read. @@ -212,7 +208,7 @@ abstract class XmlJobs extends XArcadiaFlux $message, $e->getLine() ), - LogType::debug() + LogType::debug ); continue; // * ignore the file @@ -224,11 +220,9 @@ abstract class XmlJobs extends XArcadiaFlux $e->getMessage(), $e->getLine() ), - LogType::critical() + LogType::critical ); report($e); - // ! TODO: Remove this after adding kwaadpepper/exception-handler. - Utils::sendEmailErrorManually($e); continue; // * ignore the file } //end try @@ -387,7 +381,7 @@ abstract class XmlJobs extends XArcadiaFlux ), 'filename' => $filename, 'exception' => $e->getPrevious() - ], function ($m) { + ], function (Message $m) { $m->to( config('mail.contactsList.invalidXml'), 'XML Exception Handler' @@ -409,7 +403,7 @@ abstract class XmlJobs extends XArcadiaFlux 'File %s could not be moved to invalid folder name', $filename ), - LogType::warning() + LogType::warning ); } } diff --git a/app/Lib/Utils.php b/app/Lib/Utils.php deleted file mode 100644 index c1b3a47..0000000 --- a/app/Lib/Utils.php +++ /dev/null @@ -1,129 +0,0 @@ - - */ -class Utils -{ - /** - * Manually send an exception to team instead of going trough the error handler - * (requires package kwaadpepper/exception-handler) - * - * @param \Throwable $e - * @return void - */ - public static function sendEmailErrorManually(\Throwable $e) - { - Mail::send([ - 'html' => 'exception-handler.exception', - 'text' => 'exception-handler.exception-plain' - ], [ - 'appName' => config('app.name'), - 'code' => $e->getCode(), - 'line' => $e->getLine(), - 'ename' => \get_class($e), - 'emessage' => self::getAnonymizedMessage($e->getMessage()), - 'file' => str_replace(\realpath(\sprintf('%s/../', \app_path())), '', $e->getFile()), - 'stackTrace' => self::getAnonymizedStackTrace($e), - 'uri' => app()->runningInConsole() ? - 'CONSOLE' : ( - (request() and request()->fullUrl()) ? - request()->fullUrl() : 'none') - ], function ($m) { - /** @var \Illuminate\Mail\Message $m */ - $m->to( - config('mail.contactsList.serviceweb'), - sprintf('%s Exception Handler', config('app.name')) - )->subject('Need help !, an error occured in your application, please check Logs ASAP'); - }); - Log::alert(sprintf('Envoie d\'une erreur par mail : %s', json_encode($e))); - } - - /** - * Anonymize at least Sql queries - * - * @param string $message - * @return string - */ - private static function getAnonymizedMessage(string $message): string - { - $message = \preg_replace('/^(.*)( \(SQL:.*\))$/', '$1', $message) ?? $message; - return $message; - } - - /** - * Anonymize stack trace - * - * @param \Exception $e - * @return string - */ - private static function getAnonymizedStackTrace(\Throwable $e): string - { - $projectPath = \realpath(\sprintf('%s/../', \app_path())); - $traceStack = $e->getTrace(); - $traceStr = ''; - $maxStackStage = 0; - foreach ($traceStack as $stackStage => $stack) { - $maxStackStage = $stackStage; - $traceStr .= \sprintf( - '#%s %s(%d): ', - $stackStage, - str_replace($projectPath, '', $stack['file'] ?? ''), - $stack['line'] ?? '' - ); - if (isset($stack['class'])) { - $traceStr .= "{$stack['class']}->{$stack['function']}("; - if (isset($stack['args'])) { - $traceStr .= self::handleArgs($stack); - } - $traceStr .= ")\n"; - } elseif (isset($stack['function'])) { - $traceStr .= "{$stack['function']}("; - if (isset($stack['args'])) { - $traceStr .= self::handleArgs($stack); - } - $traceStr .= ")\n"; - } - }//end foreach - $maxStackStage++; - $traceStr .= "#$maxStackStage {main}"; - return $traceStr; - } - - /** - * Handle Args - * - * @param array $stack - * @return string - */ - private static function handleArgs(array $stack): string - { - $traceArgs = ''; - $argsCount = count($stack['args']); - for ($i = 0; $i < $argsCount; $i++) { - $type = \gettype($stack['args'][$i]); - switch ($type) { - case 'object': - $traceArgs .= sprintf('Object(%s)', \get_class($stack['args'][$i])); - break; - case 'array': - $traceArgs .= sprintf('Array(%d)', \count($stack['args'][$i])); - break; - case 'string': - $traceArgs .= sprintf('String(%d)', \strlen($stack['args'][$i])); - break; - default: - $traceArgs .= \gettype($stack['args'][$i]); - } - $traceArgs .= ($i !== ($argsCount - 1) ? ',' : ''); - } - return $traceArgs; - } -} diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index f4d070f..83fe3d7 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -18,4 +18,14 @@ class EventServiceProvider extends ServiceProvider SendEmailVerificationNotification::class, ], ]; + + /** + * Determine if events and listeners should be automatically discovered. + * + * @return boolean + */ + public function shouldDiscoverEvents() + { + return false; + } } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index a93b8f0..aed4b9a 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -32,12 +32,10 @@ class RouteServiceProvider extends ServiceProvider $this->routes(function () { Route::middleware('web') - ->namespace($this->namespace) ->group(base_path('routes/web.php')); - Route::prefix('api') - ->middleware('api') - ->namespace($this->namespace) + Route::middleware('api') + ->prefix('api') ->group(base_path('routes/api.php')); }); @@ -58,7 +56,7 @@ class RouteServiceProvider extends ServiceProvider protected function configureRateLimiting() { RateLimiter::for('api', function (Request $request) { - return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); + return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); }); } } diff --git a/composer.json b/composer.json index d378f10..6b88dc5 100644 --- a/composer.json +++ b/composer.json @@ -8,30 +8,27 @@ ], "license": "MIT", "require": { - "php": "^7.3|^8.0", + "php": "^8.1", "ext-json": "*", - "adldap2/adldap2-laravel": "^6.0", + "adldap2/adldap2-laravel": "^6.1.6", "elasticquent/elasticquent": "dev-master", - "fideloper/proxy": "^4.4", - "fruitcake/laravel-cors": "^2.0", - "guzzlehttp/guzzle": "^7.0.1", + "guzzlehttp/guzzle": "^7.2", "james-heinrich/getid3": "^1.9", - "kwaadpepper/enum": "^2.1", - "laravel/framework": "^8.75", - "laravel/sanctum": "^2.11", - "laravel/tinker": "^2.5", + "laravel/framework": "^9.2", + "laravel/sanctum": "^2.14.1", + "laravel/tinker": "^2.7", "laravel/ui": "^3.0", - "laravelcollective/html": "^6.3", - "slevomat/coding-standard": "^7.0" + "laravelcollective/html": "^6.3" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.2", - "facade/ignition": "^2.5", "fakerphp/faker": "^1.9.1", "laravel/sail": "^1.0.1", "mockery/mockery": "^1.4.4", - "nunomaduro/collision": "^5.10", - "phpunit/phpunit": "^9.5.10" + "nunomaduro/collision": "^6.1", + "phpunit/phpunit": "^9.5.10", + "spatie/laravel-ignition": "^1.0", + "slevomat/coding-standard": "^7.1" }, "autoload": { "psr-4": { @@ -66,6 +63,9 @@ } }, "config": { + "platform": { + "php": "8.1" + }, "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true, diff --git a/composer.lock b/composer.lock index 11f4877..38055cb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "54f3ff7b1a54f0c3526ce1a200e4e6ef", + "content-hash": "e690757a597d0cca2b46c8f6687363cf", "packages": [ { "name": "adldap2/adldap2", @@ -129,62 +129,6 @@ }, "time": "2022-02-09T13:04:53+00:00" }, - { - "name": "asm89/stack-cors", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/asm89/stack-cors.git", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/asm89/stack-cors/zipball/73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0", - "symfony/http-foundation": "^4|^5|^6", - "symfony/http-kernel": "^4|^5|^6" - }, - "require-dev": { - "phpunit/phpunit": "^7|^9", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "psr-4": { - "Asm89\\Stack\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alexander", - "email": "iam.asm89@gmail.com" - } - ], - "description": "Cross-origin resource sharing library and stack middleware", - "homepage": "https://github.com/asm89/stack-cors", - "keywords": [ - "cors", - "stack" - ], - "support": { - "issues": "https://github.com/asm89/stack-cors/issues", - "source": "https://github.com/asm89/stack-cors/tree/v2.1.1" - }, - "time": "2022-01-18T09:12:03+00:00" - }, { "name": "brick/math", "version": "0.9.3", @@ -246,36 +190,38 @@ "time": "2021-08-15T20:50:18+00:00" }, { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", + "name": "dflydev/dot-access-data", + "version": "v3.0.1", "source": { "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "0992cc19268b259a39e86f296da5f0677841f42c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/0992cc19268b259a39e86f296da5f0677841f42c", + "reference": "0992cc19268b259a39e86f296da5f0677841f42c", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "composer/composer": "*", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0" + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "scrutinizer/ocular": "1.6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^3.14" }, - "type": "composer-plugin", + "type": "library", "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + "branch-alias": { + "dev-main": "3.x-dev" + } }, "autoload": { "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + "Dflydev\\DotAccessData\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -284,41 +230,39 @@ ], "authors": [ { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" }, { - "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com" } ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcbf", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" + "access", + "data", + "dot", + "notation" ], "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.1" }, - "time": "2022-02-04T12:51:07+00:00" + "time": "2021-08-13T13:06:58+00:00" }, { "name": "doctrine/inflector", @@ -550,27 +494,27 @@ }, { "name": "egulias/email-validator", - "version": "2.1.25", + "version": "3.1.2", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4" + "reference": "ee0db30118f661fb166bcffbf5d82032df484697" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4", - "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697", + "reference": "ee0db30118f661fb166bcffbf5d82032df484697", "shasum": "" }, "require": { - "doctrine/lexer": "^1.0.1", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.10" + "doctrine/lexer": "^1.2", + "php": ">=7.2", + "symfony/polyfill-intl-idn": "^1.15" }, "require-dev": { - "dominicsayers/isemail": "^3.0.7", - "phpunit/phpunit": "^4.8.36|^7.5.15", - "satooshi/php-coveralls": "^1.0.1" + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^8.5.8|^9.3.3", + "vimeo/psalm": "^4" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -578,7 +522,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -606,7 +550,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/2.1.25" + "source": "https://github.com/egulias/EmailValidator/tree/3.1.2" }, "funding": [ { @@ -614,7 +558,7 @@ "type": "github" } ], - "time": "2020-12-29T14:50:06+00:00" + "time": "2021-10-11T09:18:27+00:00" }, { "name": "elasticquent/elasticquent", @@ -853,98 +797,32 @@ "time": "2021-11-16T11:51:30+00:00" }, { - "name": "fideloper/proxy", - "version": "4.4.1", + "name": "fruitcake/php-cors", + "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0" + "url": "https://github.com/fruitcake/php-cors.git", + "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/c073b2bd04d1c90e04dc1b787662b558dd65ade0", - "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e", + "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e", "shasum": "" }, "require": { - "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0", - "php": ">=5.4.0" + "php": "^7.4|^8.0", + "symfony/http-foundation": "^4.4|^5.4|^6" }, "require-dev": { - "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Fideloper\\Proxy\\TrustedProxyServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Fideloper\\Proxy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Fidao", - "email": "fideloper@gmail.com" - } - ], - "description": "Set trusted proxies for Laravel", - "keywords": [ - "load balancing", - "proxy", - "trusted proxy" - ], - "support": { - "issues": "https://github.com/fideloper/TrustedProxy/issues", - "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.1" - }, - "time": "2020-10-22T13:48:01+00:00" - }, - { - "name": "fruitcake/laravel-cors", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/fruitcake/laravel-cors.git", - "reference": "783a74f5e3431d7b9805be8afb60fd0a8f743534" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/783a74f5e3431d7b9805be8afb60fd0a8f743534", - "reference": "783a74f5e3431d7b9805be8afb60fd0a8f743534", - "shasum": "" - }, - "require": { - "asm89/stack-cors": "^2.0.1", - "illuminate/contracts": "^6|^7|^8|^9", - "illuminate/support": "^6|^7|^8|^9", - "php": ">=7.2" - }, - "require-dev": { - "laravel/framework": "^6|^7.24|^8", - "orchestra/testbench-dusk": "^4|^5|^6|^7", - "phpunit/phpunit": "^6|^7|^8|^9", + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^9", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" - }, - "laravel": { - "providers": [ - "Fruitcake\\Cors\\CorsServiceProvider" - ] + "dev-main": "1.1-dev" } }, "autoload": { @@ -962,20 +840,20 @@ "homepage": "https://fruitcake.nl" }, { - "name": "Barry vd. Heuvel", + "name": "Barryvdh", "email": "barryvdh@gmail.com" } ], - "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application", + "description": "Cross-origin resource sharing library for the Symfony HttpFoundation", + "homepage": "https://github.com/fruitcake/php-cors", "keywords": [ - "api", "cors", - "crossdomain", - "laravel" + "laravel", + "symfony" ], "support": { - "issues": "https://github.com/fruitcake/laravel-cors/issues", - "source": "https://github.com/fruitcake/laravel-cors/tree/v2.2.0" + "issues": "https://github.com/fruitcake/php-cors/issues", + "source": "https://github.com/fruitcake/php-cors/tree/v1.2.0" }, "funding": [ { @@ -987,7 +865,7 @@ "type": "github" } ], - "time": "2022-02-23T14:25:13+00:00" + "time": "2022-02-20T15:07:15+00:00" }, { "name": "graham-campbell/result-type", @@ -1441,118 +1319,57 @@ }, "time": "2021-09-22T16:34:51+00:00" }, - { - "name": "kwaadpepper/enum", - "version": "2.1.2", - "source": { - "type": "git", - "url": "https://github.com/Kwaadpepper/enum.git", - "reference": "bbd08723895cad5a41bc0d57e565fe64fa13ca41" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Kwaadpepper/enum/zipball/bbd08723895cad5a41bc0d57e565fe64fa13ca41", - "reference": "bbd08723895cad5a41bc0d57e565fe64fa13ca41", - "shasum": "" - }, - "require": { - "php": "^7.3" - }, - "require-dev": { - "orchestra/testbench": "^5", - "phpunit/php-code-coverage": "^9.2", - "phpunit/phpunit": "~9.0", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Kwaadpepper\\Enum\\EnumServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Kwaadpepper\\Enum\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jérémy Munsch", - "email": "github@jeremydev.ovh", - "homepage": "https://jeremydev.ovh" - } - ], - "description": "Enums to use for any project", - "homepage": "https://github.com/kwaadpepper/enum", - "keywords": [ - "enum", - "laravel" - ], - "support": { - "issues": "https://github.com/Kwaadpepper/enum/issues", - "source": "https://github.com/Kwaadpepper/enum/tree/2.1.2" - }, - "time": "2021-11-18T16:52:08+00:00" - }, { "name": "laravel/framework", - "version": "v8.83.8", + "version": "v9.9.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "cf430301ad17656b3d918995bcdd0454c3c119b9" + "reference": "4d5a07640891b772188d7737348886a0222737d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/cf430301ad17656b3d918995bcdd0454c3c119b9", - "reference": "cf430301ad17656b3d918995bcdd0454c3c119b9", + "url": "https://api.github.com/repos/laravel/framework/zipball/4d5a07640891b772188d7737348886a0222737d8", + "reference": "4d5a07640891b772188d7737348886a0222737d8", "shasum": "" }, "require": { - "doctrine/inflector": "^1.4|^2.0", - "dragonmantank/cron-expression": "^3.0.2", - "egulias/email-validator": "^2.1.10", - "ext-json": "*", + "doctrine/inflector": "^2.0", + "dragonmantank/cron-expression": "^3.1", + "egulias/email-validator": "^3.1", "ext-mbstring": "*", "ext-openssl": "*", + "fruitcake/php-cors": "^1.2", "laravel/serializable-closure": "^1.0", - "league/commonmark": "^1.3|^2.0.2", - "league/flysystem": "^1.1", + "league/commonmark": "^2.2", + "league/flysystem": "^3.0", "monolog/monolog": "^2.0", "nesbot/carbon": "^2.53.1", - "opis/closure": "^3.6", - "php": "^7.3|^8.0", - "psr/container": "^1.0", - "psr/log": "^1.0|^2.0", - "psr/simple-cache": "^1.0", + "php": "^8.0.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/log": "^1.0|^2.0|^3.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", "ramsey/uuid": "^4.2.2", - "swiftmailer/swiftmailer": "^6.3", - "symfony/console": "^5.4", - "symfony/error-handler": "^5.4", - "symfony/finder": "^5.4", - "symfony/http-foundation": "^5.4", - "symfony/http-kernel": "^5.4", - "symfony/mime": "^5.4", - "symfony/process": "^5.4", - "symfony/routing": "^5.4", - "symfony/var-dumper": "^5.4", + "symfony/console": "^6.0", + "symfony/error-handler": "^6.0", + "symfony/finder": "^6.0", + "symfony/http-foundation": "^6.0", + "symfony/http-kernel": "^6.0", + "symfony/mailer": "^6.0", + "symfony/mime": "^6.0", + "symfony/process": "^6.0", + "symfony/routing": "^6.0", + "symfony/var-dumper": "^6.0", "tijsverkoyen/css-to-inline-styles": "^2.2.2", "vlucas/phpdotenv": "^5.4.1", - "voku/portable-ascii": "^1.6.1" + "voku/portable-ascii": "^2.0" }, "conflict": { "tightenco/collect": "<5.5.33" }, "provide": { - "psr/container-implementation": "1.0", - "psr/simple-cache-implementation": "1.0" + "psr/container-implementation": "1.1|2.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0" }, "replace": { "illuminate/auth": "self.version", @@ -1560,6 +1377,7 @@ "illuminate/bus": "self.version", "illuminate/cache": "self.version", "illuminate/collections": "self.version", + "illuminate/conditionable": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", "illuminate/container": "self.version", @@ -1590,19 +1408,22 @@ "require-dev": { "aws/aws-sdk-php": "^3.198.1", "doctrine/dbal": "^2.13.3|^3.1.4", - "filp/whoops": "^2.14.3", - "guzzlehttp/guzzle": "^6.5.5|^7.0.1", - "league/flysystem-cached-adapter": "^1.0", + "fakerphp/faker": "^1.9.2", + "guzzlehttp/guzzle": "^7.2", + "league/flysystem-aws-s3-v3": "^3.0", + "league/flysystem-ftp": "^3.0", + "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.4.4", - "orchestra/testbench-core": "^6.27", + "orchestra/testbench-core": "^7.1", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.5.19|^9.5.8", + "phpstan/phpstan": "^1.4.7", + "phpunit/phpunit": "^9.5.8", "predis/predis": "^1.1.9", - "symfony/cache": "^5.4" + "symfony/cache": "^6.0" }, "suggest": { "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.198.1).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.198.1).", "brianium/paratest": "Required to run tests in parallel (^6.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", "ext-bcmath": "Required to use the multiple_of validation rule.", @@ -1614,27 +1435,29 @@ "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", "filp/whoops": "Required for friendly error pages in development (^2.14.3).", - "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.5.5|^7.0.1).", + "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.2).", "laravel/tinker": "Required to use the tinker console command (^2.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", - "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", - "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", "mockery/mockery": "Required to use mocking (^1.4.4).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^8.5.19|^9.5.8).", + "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8).", "predis/predis": "Required to use the predis connector (^1.1.9).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0|^7.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.4).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^5.4).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", - "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^6.0).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^6.0).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.0).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.0).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.x-dev" + "dev-master": "9.x-dev" } }, "autoload": { @@ -1648,7 +1471,8 @@ "Illuminate\\": "src/Illuminate/", "Illuminate\\Support\\": [ "src/Illuminate/Macroable/", - "src/Illuminate/Collections/" + "src/Illuminate/Collections/", + "src/Illuminate/Conditionable/" ] } }, @@ -1672,7 +1496,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-04-12T13:49:56+00:00" + "time": "2022-04-19T15:01:23+00:00" }, { "name": "laravel/sanctum", @@ -2001,42 +1825,54 @@ }, { "name": "league/commonmark", - "version": "1.6.7", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "2b8185c13bc9578367a5bf901881d1c1b5bbd09b" + "reference": "32a49eb2b38fe5e5c417ab748a45d0beaab97955" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/2b8185c13bc9578367a5bf901881d1c1b5bbd09b", - "reference": "2b8185c13bc9578367a5bf901881d1c1b5bbd09b", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/32a49eb2b38fe5e5c417ab748a45d0beaab97955", + "reference": "32a49eb2b38fe5e5c417ab748a45d0beaab97955", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^7.1 || ^8.0" - }, - "conflict": { - "scrutinizer/ocular": "1.7.*" + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" }, "require-dev": { - "cebe/markdown": "~1.0", - "commonmark/commonmark.js": "0.29.2", - "erusev/parsedown": "~1.0", + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.30.0", + "commonmark/commonmark.js": "0.30.0", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", "ext-json": "*", "github/gfm": "0.29.0", - "michelf/php-markdown": "~1.4", - "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan": "^0.12.90", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", - "scrutinizer/ocular": "^1.5", - "symfony/finder": "^4.2" + "michelf/php-markdown": "^1.4", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^0.12.88 || ^1.0.0", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" }, - "bin": [ - "bin/commonmark" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + } + }, "autoload": { "psr-4": { "League\\CommonMark\\": "src" @@ -2054,7 +1890,7 @@ "role": "Lead Developer" } ], - "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", "homepage": "https://commonmark.thephpleague.com", "keywords": [ "commonmark", @@ -2068,6 +1904,7 @@ ], "support": { "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", "issues": "https://github.com/thephpleague/commonmark/issues", "rss": "https://github.com/thephpleague/commonmark/releases.atom", "source": "https://github.com/thephpleague/commonmark" @@ -2090,58 +1927,134 @@ "type": "tidelift" } ], - "time": "2022-01-13T17:18:13+00:00" + "time": "2022-04-07T22:37:05+00:00" }, { - "name": "league/flysystem", - "version": "1.1.9", + "name": "league/config", + "version": "v1.1.1", "source": { "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99" + "url": "https://github.com/thephpleague/config.git", + "reference": "a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/094defdb4a7001845300334e7c1ee2335925ef99", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99", + "url": "https://api.github.com/repos/thephpleague/config/zipball/a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e", + "reference": "a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "league/mime-type-detection": "^1.3", - "php": "^7.2.5 || ^8.0" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" }, "require-dev": { - "phpspec/prophecy": "^1.11.1", - "phpunit/phpunit": "^8.5.8" - }, - "suggest": { - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + "phpstan/phpstan": "^0.12.90", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "1.2-dev" } }, "autoload": { "psr-4": { - "League\\Flysystem\\": "src/" + "League\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2021-08-14T12:15:32+00:00" + }, + { + "name": "league/flysystem", + "version": "3.0.17", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "29eb78cac0be0c22237c5e0f6f98234d97037d79" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/29eb78cac0be0c22237c5e0f6f98234d97037d79", + "reference": "29eb78cac0be0c22237c5e0f6f98234d97037d79", + "shasum": "" + }, + "require": { + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "conflict": { + "aws/aws-sdk-php": "3.209.31 || 3.210.0", + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1", + "symfony/http-client": "<5.2" + }, + "require-dev": { + "async-aws/s3": "^1.5", + "async-aws/simple-s3": "^1.0", + "aws/aws-sdk-php": "^3.198.1", + "composer/semver": "^3.0", + "ext-fileinfo": "*", + "ext-ftp": "*", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.5", + "google/cloud-storage": "^1.23", + "microsoft/azure-storage-blob": "^1.1", + "phpseclib/phpseclib": "^2.0", + "phpstan/phpstan": "^0.12.26", + "phpunit/phpunit": "^9.5.11", + "sabre/dav": "^4.3.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2151,40 +2064,42 @@ "authors": [ { "name": "Frank de Jonge", - "email": "info@frenky.net" + "email": "info@frankdejonge.nl" } ], - "description": "Filesystem abstraction: Many filesystems, one API.", + "description": "File storage abstraction for PHP", "keywords": [ - "Cloud Files", "WebDAV", - "abstraction", "aws", "cloud", - "copy.com", - "dropbox", - "file systems", + "file", "files", "filesystem", "filesystems", "ftp", - "rackspace", - "remote", "s3", "sftp", "storage" ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.1.9" + "source": "https://github.com/thephpleague/flysystem/tree/3.0.17" }, "funding": [ { "url": "https://offset.earth/frankdejonge", - "type": "other" + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" } ], - "time": "2021-12-09T09:40:50+00:00" + "time": "2022-04-14T14:57:13+00:00" }, { "name": "league/mime-type-detection", @@ -2437,6 +2352,153 @@ ], "time": "2022-02-13T18:13:33+00:00" }, + { + "name": "nette/schema", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/9a39cef03a5b34c7de64f551538cbba05c2be5df", + "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df", + "shasum": "" + }, + "require": { + "nette/utils": "^2.5.7 || ^3.1.5 || ^4.0", + "php": ">=7.1 <8.2" + }, + "require-dev": { + "nette/tester": "^2.3 || ^2.4", + "phpstan/phpstan-nette": "^0.12", + "tracy/tracy": "^2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📐 Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.2.2" + }, + "time": "2021-10-15T11:40:02+00:00" + }, + { + "name": "nette/utils", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "0af4e3de4df9f1543534beab255ccf459e7a2c99" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/0af4e3de4df9f1543534beab255ccf459e7a2c99", + "reference": "0af4e3de4df9f1543534beab255ccf459e7a2c99", + "shasum": "" + }, + "require": { + "php": ">=7.2 <8.2" + }, + "conflict": { + "nette/di": "<3.0.6" + }, + "require-dev": { + "nette/tester": "~2.0", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v3.2.7" + }, + "time": "2022-01-24T11:29:14+00:00" + }, { "name": "nikic/php-parser", "version": "v4.13.2", @@ -2493,71 +2555,6 @@ }, "time": "2021-11-30T19:35:32+00:00" }, - { - "name": "opis/closure", - "version": "3.6.3", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/3d81e4309d2a927abbe66df935f4bb60082805ad", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0 || ^8.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6.x-dev" - } - }, - "autoload": { - "files": [ - "functions.php" - ], - "psr-4": { - "Opis\\Closure\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ], - "support": { - "issues": "https://github.com/opis/closure/issues", - "source": "https://github.com/opis/closure/tree/3.6.3" - }, - "time": "2022-01-27T09:35:39+00:00" - }, { "name": "phpoption/phpoption", "version": "1.8.1", @@ -2629,68 +2626,29 @@ ], "time": "2021-12-04T23:24:31+00:00" }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.4.4", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "d8e9fd97ca11f2f24fc1aafbcfb1f78bce762267" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/d8e9fd97ca11f2f24fc1aafbcfb1f78bce762267", - "reference": "d8e9fd97ca11f2f24fc1aafbcfb1f78bce762267", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.4.4" - }, - "time": "2022-04-14T12:24:06+00:00" - }, { "name": "psr/container", - "version": "1.1.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -2717,9 +2675,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -2983,25 +2941,25 @@ }, { "name": "psr/simple-cache", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/8707bf3cea6f710bf6ef05491234e3ab06f6432a", + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -3016,7 +2974,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -3028,9 +2986,9 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" + "source": "https://github.com/php-fig/simple-cache/tree/2.0.0" }, - "time": "2017-10-23T01:57:42+00:00" + "time": "2021-10-29T13:22:09+00:00" }, { "name": "psy/psysh", @@ -3235,25 +3193,24 @@ }, { "name": "ramsey/uuid", - "version": "4.2.3", + "version": "4.3.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" + "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", + "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", "shasum": "" }, "require": { "brick/math": "^0.8 || ^0.9", + "ext-ctype": "*", "ext-json": "*", - "php": "^7.2 || ^8.0", - "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php80": "^1.14" + "php": "^8.0", + "ramsey/collection": "^1.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -3290,9 +3247,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "4.x-dev" - }, "captainhook": { "force-install": true } @@ -3317,7 +3271,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.2.3" + "source": "https://github.com/ramsey/uuid/tree/4.3.1" }, "funding": [ { @@ -3329,7 +3283,7 @@ "type": "tidelift" } ], - "time": "2021-09-25T23:10:38+00:00" + "time": "2022-03-27T21:42:02+00:00" }, { "name": "react/promise", @@ -3407,241 +3361,44 @@ ], "time": "2022-02-11T10:27:51+00:00" }, - { - "name": "slevomat/coding-standard", - "version": "7.1", - "source": { - "type": "git", - "url": "https://github.com/slevomat/coding-standard.git", - "reference": "b521bd358b5f7a7d69e9637fd139e036d8adeb6f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/b521bd358b5f7a7d69e9637fd139e036d8adeb6f", - "reference": "b521bd358b5f7a7d69e9637fd139e036d8adeb6f", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": "^1.4.1", - "squizlabs/php_codesniffer": "^3.6.2" - }, - "require-dev": { - "phing/phing": "2.17.2", - "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.4.10|1.5.2", - "phpstan/phpstan-deprecation-rules": "1.0.0", - "phpstan/phpstan-phpunit": "1.0.0|1.1.0", - "phpstan/phpstan-strict-rules": "1.1.0", - "phpunit/phpunit": "7.5.20|8.5.21|9.5.19" - }, - "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", - "support": { - "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.1" - }, - "funding": [ - { - "url": "https://github.com/kukulich", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", - "type": "tidelift" - } - ], - "time": "2022-03-29T12:44:16+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.6.2", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2021-12-12T21:44:58+00:00" - }, - { - "name": "swiftmailer/swiftmailer", - "version": "v6.3.0", - "source": { - "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c", - "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c", - "shasum": "" - }, - "require": { - "egulias/email-validator": "^2.0|^3.1", - "php": ">=7.0.0", - "symfony/polyfill-iconv": "^1.0", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "symfony/phpunit-bridge": "^4.4|^5.4" - }, - "suggest": { - "ext-intl": "Needed to support internationalized email addresses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "autoload": { - "files": [ - "lib/swift_required.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Corbyn" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "https://swiftmailer.symfony.com", - "keywords": [ - "email", - "mail", - "mailer" - ], - "support": { - "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.3.0" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", - "type": "tidelift" - } - ], - "abandoned": "symfony/mailer", - "time": "2021-10-18T15:26:12+00:00" - }, { "name": "symfony/console", - "version": "v5.4.7", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6" + "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/900275254f0a1a2afff1ab0e11abd5587a10e1d6", - "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6", + "url": "https://api.github.com/repos/symfony/console/zipball/70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", + "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/string": "^5.4|^6.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3681,7 +3438,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.7" + "source": "https://github.com/symfony/console/tree/v6.0.7" }, "funding": [ { @@ -3697,25 +3454,24 @@ "type": "tidelift" } ], - "time": "2022-03-31T17:09:19+00:00" + "time": "2022-03-31T17:18:25+00:00" }, { "name": "symfony/css-selector", - "version": "v5.4.3", + "version": "v6.0.3", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "b0a190285cd95cb019237851205b8140ef6e368e" + "reference": "1955d595c12c111629cc814d3f2a2ff13580508a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/b0a190285cd95cb019237851205b8140ef6e368e", - "reference": "b0a190285cd95cb019237851205b8140ef6e368e", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/1955d595c12c111629cc814d3f2a2ff13580508a", + "reference": "1955d595c12c111629cc814d3f2a2ff13580508a", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -3747,7 +3503,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.4.3" + "source": "https://github.com/symfony/css-selector/tree/v6.0.3" }, "funding": [ { @@ -3763,29 +3519,29 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.1", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3814,7 +3570,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1" }, "funding": [ { @@ -3830,31 +3586,31 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/error-handler", - "version": "v5.4.7", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "060bc01856a1846e3e4385261bc9ed11a1dd7b6a" + "reference": "e600c54e5b30555eecea3ffe4314e58f832e78ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/060bc01856a1846e3e4385261bc9ed11a1dd7b6a", - "reference": "060bc01856a1846e3e4385261bc9ed11a1dd7b6a", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/e600c54e5b30555eecea3ffe4314e58f832e78ee", + "reference": "e600c54e5b30555eecea3ffe4314e58f832e78ee", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "symfony/var-dumper": "^5.4|^6.0" }, "require-dev": { "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" + "symfony/http-kernel": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" }, "bin": [ "Resources/bin/patch-type-declarations" @@ -3885,7 +3641,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.7" + "source": "https://github.com/symfony/error-handler/tree/v6.0.7" }, "funding": [ { @@ -3901,44 +3657,42 @@ "type": "tidelift" } ], - "time": "2022-03-18T16:21:29+00:00" + "time": "2022-03-18T16:21:55+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.3", + "version": "v6.0.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d" + "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/dec8a9f58d20df252b9cd89f1c6c1530f747685d", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6472ea2dd415e925b90ca82be64b8bc6157f3934", + "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<5.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" + "symfony/stopwatch": "^5.4|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -3970,7 +3724,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.3" }, "funding": [ { @@ -3986,24 +3740,24 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.1", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "psr/event-dispatcher": "^1" }, "suggest": { @@ -4012,7 +3766,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -4049,7 +3803,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.1" }, "funding": [ { @@ -4065,26 +3819,24 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/finder", - "version": "v5.4.3", + "version": "v6.0.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d" + "reference": "8661b74dbabc23223f38c9b99d3f8ade71170430" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d", + "url": "https://api.github.com/repos/symfony/finder/zipball/8661b74dbabc23223f38c9b99d3f8ade71170430", + "reference": "8661b74dbabc23223f38c9b99d3f8ade71170430", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -4112,7 +3864,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.3" + "source": "https://github.com/symfony/finder/tree/v6.0.3" }, "funding": [ { @@ -4128,33 +3880,32 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:34:36+00:00" + "time": "2022-01-26T17:23:29+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.6", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "34e89bc147633c0f9dd6caaaf56da3b806a21465" + "reference": "c816b26f03b6902dba79b352c84a17f53d815f0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/34e89bc147633c0f9dd6caaaf56da3b806a21465", - "reference": "34e89bc147633c0f9dd6caaaf56da3b806a21465", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c816b26f03b6902dba79b352c84a17f53d815f0d", + "reference": "c816b26f03b6902dba79b352c84a17f53d815f0d", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0" + "symfony/cache": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/mime": "^5.4|^6.0" }, "suggest": { "symfony/mime": "To use the file extension guesser" @@ -4185,7 +3936,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.6" + "source": "https://github.com/symfony/http-foundation/tree/v6.0.7" }, "funding": [ { @@ -4201,67 +3952,64 @@ "type": "tidelift" } ], - "time": "2022-03-05T21:03:43+00:00" + "time": "2022-03-24T14:13:59+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.7", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "509243b9b3656db966284c45dffce9316c1ecc5c" + "reference": "9c03dab07a6aa336ffaadc15352b1d14f4ce01f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/509243b9b3656db966284c45dffce9316c1ecc5c", - "reference": "509243b9b3656db966284c45dffce9316c1ecc5c", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9c03dab07a6aa336ffaadc15352b1d14f4ce01f5", + "reference": "9c03dab07a6aa336ffaadc15352b1d14f4ce01f5", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "psr/log": "^1|^2|^3", + "symfony/error-handler": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.0", - "symfony/config": "<5.0", - "symfony/console": "<4.4", - "symfony/dependency-injection": "<5.3", - "symfony/doctrine-bridge": "<5.0", - "symfony/form": "<5.0", - "symfony/http-client": "<5.0", - "symfony/mailer": "<5.0", - "symfony/messenger": "<5.0", - "symfony/translation": "<5.0", - "symfony/twig-bridge": "<5.0", - "symfony/validator": "<5.0", + "symfony/cache": "<5.4", + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/doctrine-bridge": "<5.4", + "symfony/form": "<5.4", + "symfony/http-client": "<5.4", + "symfony/mailer": "<5.4", + "symfony/messenger": "<5.4", + "symfony/translation": "<5.4", + "symfony/twig-bridge": "<5.4", + "symfony/validator": "<5.4", "twig/twig": "<2.13" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/dom-crawler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/css-selector": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/dom-crawler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", "symfony/http-client-contracts": "^1.1|^2|^3", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/routing": "^5.4|^6.0", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", "symfony/translation-contracts": "^1.1|^2|^3", "twig/twig": "^2.13|^3.0.4" }, @@ -4297,7 +4045,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.7" + "source": "https://github.com/symfony/http-kernel/tree/v6.0.7" }, "funding": [ { @@ -4313,42 +4061,114 @@ "type": "tidelift" } ], - "time": "2022-04-02T06:04:20+00:00" + "time": "2022-04-02T06:35:11+00:00" }, { - "name": "symfony/mime", - "version": "v5.4.7", + "name": "symfony/mailer", + "version": "v6.0.7", "source": { "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "92d27a34dea2e199fa9b687e3fff3a7d169b7b1c" + "url": "https://github.com/symfony/mailer.git", + "reference": "f7343f94e7afecca2ad840b078f9d80200e1bd27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/92d27a34dea2e199fa9b687e3fff3a7d169b7b1c", - "reference": "92d27a34dea2e199fa9b687e3fff3a7d169b7b1c", + "url": "https://api.github.com/repos/symfony/mailer/zipball/f7343f94e7afecca2ad840b078f9d80200e1bd27", + "reference": "f7343f94e7afecca2ad840b078f9d80200e1bd27", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "egulias/email-validator": "^2.1.10|^3", + "php": ">=8.0.2", + "psr/event-dispatcher": "^1", + "psr/log": "^1|^2|^3", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/mime": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3" + }, + "conflict": { + "symfony/http-kernel": "<5.4" + }, + "require-dev": { + "symfony/http-client-contracts": "^1.1|^2|^3", + "symfony/messenger": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mailer\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps sending emails", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/mailer/tree/v6.0.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-03-18T16:06:28+00:00" + }, + { + "name": "symfony/mime", + "version": "v6.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "74266e396f812a2301536397a6360b6e6913c0d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/74266e396f812a2301536397a6360b6e6913c0d8", + "reference": "74266e396f812a2301536397a6360b6e6913c0d8", + "shasum": "" + }, + "require": { + "php": ">=8.0.2", "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "^1.0" }, "conflict": { "egulias/email-validator": "~3.0.0", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<4.4" + "symfony/mailer": "<5.4" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/property-access": "^4.4|^5.1|^6.0", - "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.2|^6.0" + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/property-access": "^5.4|^6.0", + "symfony/property-info": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -4380,7 +4200,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.7" + "source": "https://github.com/symfony/mime/tree/v6.0.7" }, "funding": [ { @@ -4396,7 +4216,7 @@ "type": "tidelift" } ], - "time": "2022-03-11T16:08:05+00:00" + "time": "2022-03-13T20:10:05+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4480,89 +4300,6 @@ ], "time": "2021-10-20T20:35:02+00:00" }, - { - "name": "symfony/polyfill-iconv", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f1aed619e28cb077fc83fac8c4c0383578356e40", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-iconv": "*" - }, - "suggest": { - "ext-iconv": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Iconv\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Iconv extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "iconv", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-04T09:04:05+00:00" - }, { "name": "symfony/polyfill-intl-grapheme", "version": "v1.25.0", @@ -4974,85 +4711,6 @@ ], "time": "2021-05-27T09:17:38+00:00" }, - { - "name": "symfony/polyfill-php73", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-06-05T21:20:04+00:00" - }, { "name": "symfony/polyfill-php80", "version": "v1.25.0", @@ -5217,21 +4875,20 @@ }, { "name": "symfony/process", - "version": "v5.4.7", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb" + "reference": "e13f6757e267d687e20ec5b26ccfcbbe511cd8f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/38a44b2517b470a436e1c944bf9b9ba3961137fb", - "reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb", + "url": "https://api.github.com/repos/symfony/process/zipball/e13f6757e267d687e20ec5b26ccfcbbe511cd8f4", + "reference": "e13f6757e267d687e20ec5b26ccfcbbe511cd8f4", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -5259,7 +4916,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.7" + "source": "https://github.com/symfony/process/tree/v6.0.7" }, "funding": [ { @@ -5275,41 +4932,39 @@ "type": "tidelift" } ], - "time": "2022-03-18T16:18:52+00:00" + "time": "2022-03-18T16:21:55+00:00" }, { "name": "symfony/routing", - "version": "v5.4.3", + "version": "v6.0.5", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "44b29c7a94e867ccde1da604792f11a469958981" + "reference": "a738b152426ac7fcb94bdab8188264652238bef1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/44b29c7a94e867ccde1da604792f11a469958981", - "reference": "44b29c7a94e867ccde1da604792f11a469958981", + "url": "https://api.github.com/repos/symfony/routing/zipball/a738b152426ac7fcb94bdab8188264652238bef1", + "reference": "a738b152426ac7fcb94bdab8188264652238bef1", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "conflict": { "doctrine/annotations": "<1.12", - "symfony/config": "<5.3", - "symfony/dependency-injection": "<4.4", - "symfony/yaml": "<4.4" + "symfony/config": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/yaml": "<5.4" }, "require-dev": { "doctrine/annotations": "^1.12", "psr/log": "^1|^2|^3", - "symfony/config": "^5.3|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0" + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "symfony/config": "For using the all-in-one router or any loader", @@ -5349,7 +5004,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.3" + "source": "https://github.com/symfony/routing/tree/v6.0.5" }, "funding": [ { @@ -5365,26 +5020,25 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-31T19:46:53+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.1", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c" + "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e517458f278c2131ca9f262f8fbaf01410f2c65c", + "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.0.2", + "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -5395,7 +5049,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -5432,7 +5086,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.1" }, "funding": [ { @@ -5448,38 +5102,37 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:07:29+00:00" + "time": "2022-03-13T20:10:05+00:00" }, { "name": "symfony/string", - "version": "v5.4.3", + "version": "v6.0.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10" + "reference": "522144f0c4c004c80d56fa47e40e17028e2eefc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10", + "url": "https://api.github.com/repos/symfony/string/zipball/522144f0c4c004c80d56fa47e40e17028e2eefc2", + "reference": "522144f0c4c004c80d56fa47e40e17028e2eefc2", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -5518,7 +5171,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.3" + "source": "https://github.com/symfony/string/tree/v6.0.3" }, "funding": [ { @@ -5534,52 +5187,50 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/translation", - "version": "v5.4.7", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e1eb790575202ee3ac2659f55b93b05853726f8e" + "reference": "b2792b39d74cf41ea3065f27fd2ddf0b556ac7a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e1eb790575202ee3ac2659f55b93b05853726f8e", - "reference": "e1eb790575202ee3ac2659f55b93b05853726f8e", + "url": "https://api.github.com/repos/symfony/translation/zipball/b2792b39d74cf41ea3065f27fd2ddf0b556ac7a1", + "reference": "b2792b39d74cf41ea3065f27fd2ddf0b556ac7a1", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^2.3" + "symfony/translation-contracts": "^2.3|^3.0" }, "conflict": { - "symfony/config": "<4.4", - "symfony/console": "<5.3", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4" + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/twig-bundle": "<5.4", + "symfony/yaml": "<5.4" }, "provide": { - "symfony/translation-implementation": "2.3" + "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", + "symfony/config": "^5.4|^6.0", "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", "symfony/http-client-contracts": "^1.1|^2.0|^3.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/intl": "^5.4|^6.0", "symfony/polyfill-intl-icu": "^1.21", "symfony/service-contracts": "^1.1.2|^2|^3", - "symfony/yaml": "^4.4|^5.0|^6.0" + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", @@ -5615,7 +5266,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.7" + "source": "https://github.com/symfony/translation/tree/v6.0.7" }, "funding": [ { @@ -5631,24 +5282,24 @@ "type": "tidelift" } ], - "time": "2022-03-24T17:09:09+00:00" + "time": "2022-03-31T17:18:25+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.5.1", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "1211df0afa701e45a04253110e959d4af4ef0f07" + "reference": "c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/1211df0afa701e45a04253110e959d4af4ef0f07", - "reference": "1211df0afa701e45a04253110e959d4af4ef0f07", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9", + "reference": "c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=8.0.2" }, "suggest": { "symfony/translation-implementation": "" @@ -5656,7 +5307,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -5693,7 +5344,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.0.1" }, "funding": [ { @@ -5709,36 +5360,35 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.6", + "version": "v6.0.6", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "294e9da6e2e0dd404e983daa5aa74253d92c05d0" + "reference": "38358405ae948963c50a3aae3dfea598223ba15e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/294e9da6e2e0dd404e983daa5aa74253d92c05d0", - "reference": "294e9da6e2e0dd404e983daa5aa74253d92c05d0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/38358405ae948963c50a3aae3dfea598223ba15e", + "reference": "38358405ae948963c50a3aae3dfea598223ba15e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4" + "symfony/console": "<5.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -5782,7 +5432,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.6" + "source": "https://github.com/symfony/var-dumper/tree/v6.0.6" }, "funding": [ { @@ -5798,7 +5448,7 @@ "type": "tidelift" } ], - "time": "2022-03-02T12:42:23+00:00" + "time": "2022-03-02T12:58:14+00:00" }, { "name": "tightenco/collect", @@ -5989,16 +5639,16 @@ }, { "name": "voku/portable-ascii", - "version": "1.6.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a" + "reference": "b56450eed252f6801410d810c8e1727224ae0743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/87337c91b9dfacee02452244ee14ab3c43bc485a", - "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b56450eed252f6801410d810c8e1727224ae0743", + "reference": "b56450eed252f6801410d810c8e1727224ae0743", "shasum": "" }, "require": { @@ -6035,7 +5685,7 @@ ], "support": { "issues": "https://github.com/voku/portable-ascii/issues", - "source": "https://github.com/voku/portable-ascii/tree/1.6.1" + "source": "https://github.com/voku/portable-ascii/tree/2.0.1" }, "funding": [ { @@ -6059,7 +5709,7 @@ "type": "tidelift" } ], - "time": "2022-01-24T18:55:24+00:00" + "time": "2022-03-08T17:03:00+00:00" }, { "name": "webmozart/assert", @@ -6206,6 +5856,81 @@ ], "time": "2022-02-09T07:52:32+00:00" }, + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.2", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2022-02-04T12:51:07+00:00" + }, { "name": "doctrine/instantiator", "version": "1.4.1", @@ -6276,149 +6001,6 @@ ], "time": "2022-03-03T08:28:38+00:00" }, - { - "name": "facade/flare-client-php", - "version": "1.9.1", - "source": { - "type": "git", - "url": "https://github.com/facade/flare-client-php.git", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/b2adf1512755637d0cef4f7d1b54301325ac78ed", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed", - "shasum": "" - }, - "require": { - "facade/ignition-contracts": "~1.0", - "illuminate/pipeline": "^5.5|^6.0|^7.0|^8.0", - "php": "^7.1|^8.0", - "symfony/http-foundation": "^3.3|^4.1|^5.0", - "symfony/mime": "^3.4|^4.0|^5.1", - "symfony/var-dumper": "^3.4|^4.0|^5.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "phpunit/phpunit": "^7.5.16", - "spatie/phpunit-snapshot-assertions": "^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Facade\\FlareClient\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Send PHP errors to Flare", - "homepage": "https://github.com/facade/flare-client-php", - "keywords": [ - "exception", - "facade", - "flare", - "reporting" - ], - "support": { - "issues": "https://github.com/facade/flare-client-php/issues", - "source": "https://github.com/facade/flare-client-php/tree/1.9.1" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2021-09-13T12:16:46+00:00" - }, - { - "name": "facade/ignition", - "version": "2.17.5", - "source": { - "type": "git", - "url": "https://github.com/facade/ignition.git", - "reference": "1d71996f83c9a5a7807331b8986ac890352b7a0c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/1d71996f83c9a5a7807331b8986ac890352b7a0c", - "reference": "1d71996f83c9a5a7807331b8986ac890352b7a0c", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "facade/flare-client-php": "^1.9.1", - "facade/ignition-contracts": "^1.0.2", - "illuminate/support": "^7.0|^8.0", - "monolog/monolog": "^2.0", - "php": "^7.2.5|^8.0", - "symfony/console": "^5.0", - "symfony/var-dumper": "^5.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "livewire/livewire": "^2.4", - "mockery/mockery": "^1.3", - "orchestra/testbench": "^5.0|^6.0", - "psalm/plugin-laravel": "^1.2" - }, - "suggest": { - "laravel/telescope": "^3.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, - "laravel": { - "providers": [ - "Facade\\Ignition\\IgnitionServiceProvider" - ], - "aliases": { - "Flare": "Facade\\Ignition\\Facades\\Flare" - } - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Facade\\Ignition\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A beautiful error page for Laravel applications.", - "homepage": "https://github.com/facade/ignition", - "keywords": [ - "error", - "flare", - "laravel", - "page" - ], - "support": { - "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", - "forum": "https://twitter.com/flareappio", - "issues": "https://github.com/facade/ignition/issues", - "source": "https://github.com/facade/ignition" - }, - "time": "2022-02-23T18:31:24+00:00" - }, { "name": "facade/ignition-contracts", "version": "1.0.2", @@ -6663,16 +6245,16 @@ }, { "name": "laravel/sail", - "version": "v1.13.9", + "version": "v1.13.10", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "7bb294fe99fc42c3b1bee83fb667cd7698b3c385" + "reference": "cbf55e1a392724313f7726c38578b5e008df6a0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/7bb294fe99fc42c3b1bee83fb667cd7698b3c385", - "reference": "7bb294fe99fc42c3b1bee83fb667cd7698b3c385", + "url": "https://api.github.com/repos/laravel/sail/zipball/cbf55e1a392724313f7726c38578b5e008df6a0f", + "reference": "cbf55e1a392724313f7726c38578b5e008df6a0f", "shasum": "" }, "require": { @@ -6719,7 +6301,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2022-04-04T15:21:51+00:00" + "time": "2022-04-14T18:29:22+00:00" }, { "name": "maximebf/debugbar", @@ -6920,37 +6502,37 @@ }, { "name": "nunomaduro/collision", - "version": "v5.11.0", + "version": "v6.2.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461" + "reference": "c379636dc50e829edb3a8bcb944a01aa1aed8f25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/8b610eef8582ccdc05d8f2ab23305e2d37049461", - "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/c379636dc50e829edb3a8bcb944a01aa1aed8f25", + "reference": "c379636dc50e829edb3a8bcb944a01aa1aed8f25", "shasum": "" }, "require": { - "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.14.3", - "php": "^7.3 || ^8.0", - "symfony/console": "^5.0" + "facade/ignition-contracts": "^1.0.2", + "filp/whoops": "^2.14.5", + "php": "^8.0.0", + "symfony/console": "^6.0.2" }, "require-dev": { - "brianium/paratest": "^6.1", - "fideloper/proxy": "^4.4.1", - "fruitcake/laravel-cors": "^2.0.3", - "laravel/framework": "8.x-dev", - "nunomaduro/larastan": "^0.6.2", - "nunomaduro/mock-final-classes": "^1.0", - "orchestra/testbench": "^6.0", - "phpstan/phpstan": "^0.12.64", - "phpunit/phpunit": "^9.5.0" + "brianium/paratest": "^6.4.1", + "laravel/framework": "^9.7", + "nunomaduro/larastan": "^1.0.2", + "nunomaduro/mock-final-classes": "^1.1.0", + "orchestra/testbench": "^7.3.0", + "phpunit/phpunit": "^9.5.11" }, "type": "library", "extra": { + "branch-alias": { + "dev-develop": "6.x-dev" + }, "laravel": { "providers": [ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" @@ -7003,7 +6585,7 @@ "type": "patreon" } ], - "time": "2022-01-10T16:22:52+00:00" + "time": "2022-04-05T15:31:38+00:00" }, { "name": "phar-io/manifest", @@ -7343,6 +6925,50 @@ }, "time": "2021-12-08T12:19:24+00:00" }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.4.4", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "d8e9fd97ca11f2f24fc1aafbcfb1f78bce762267" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/d8e9fd97ca11f2f24fc1aafbcfb1f78bce762267", + "reference": "d8e9fd97ca11f2f24fc1aafbcfb1f78bce762267", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.4.4" + }, + "time": "2022-04-14T12:24:06+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "9.2.15", @@ -8728,6 +8354,409 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "slevomat/coding-standard", + "version": "7.1", + "source": { + "type": "git", + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "b521bd358b5f7a7d69e9637fd139e036d8adeb6f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/b521bd358b5f7a7d69e9637fd139e036d8adeb6f", + "reference": "b521bd358b5f7a7d69e9637fd139e036d8adeb6f", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "php": "^7.2 || ^8.0", + "phpstan/phpdoc-parser": "^1.4.1", + "squizlabs/php_codesniffer": "^3.6.2" + }, + "require-dev": { + "phing/phing": "2.17.2", + "php-parallel-lint/php-parallel-lint": "1.3.2", + "phpstan/phpstan": "1.4.10|1.5.2", + "phpstan/phpstan-deprecation-rules": "1.0.0", + "phpstan/phpstan-phpunit": "1.0.0|1.1.0", + "phpstan/phpstan-strict-rules": "1.1.0", + "phpunit/phpunit": "7.5.20|8.5.21|9.5.19" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "support": { + "issues": "https://github.com/slevomat/coding-standard/issues", + "source": "https://github.com/slevomat/coding-standard/tree/7.1" + }, + "funding": [ + { + "url": "https://github.com/kukulich", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" + } + ], + "time": "2022-03-29T12:44:16+00:00" + }, + { + "name": "spatie/backtrace", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/backtrace.git", + "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", + "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "ext-json": "*", + "phpunit/phpunit": "^9.3", + "symfony/var-dumper": "^5.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Backtrace\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van de Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "A better backtrace", + "homepage": "https://github.com/spatie/backtrace", + "keywords": [ + "Backtrace", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/backtrace/issues", + "source": "https://github.com/spatie/backtrace/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spatie", + "type": "github" + }, + { + "url": "https://spatie.be/open-source/support-us", + "type": "other" + } + ], + "time": "2021-11-09T10:57:15+00:00" + }, + { + "name": "spatie/flare-client-php", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/flare-client-php.git", + "reference": "ceab058852a1278d9f57a7b95f1c348e4956d866" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/ceab058852a1278d9f57a7b95f1c348e4956d866", + "reference": "ceab058852a1278d9f57a7b95f1c348e4956d866", + "shasum": "" + }, + "require": { + "illuminate/pipeline": "^8.0|^9.0", + "php": "^8.0", + "spatie/backtrace": "^1.2", + "symfony/http-foundation": "^5.0|^6.0", + "symfony/mime": "^5.2|^6.0", + "symfony/process": "^5.2|^6.0", + "symfony/var-dumper": "^5.2|^6.0" + }, + "require-dev": { + "dms/phpunit-arraysubset-asserts": "^0.3.0", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/phpunit-snapshot-assertions": "^4.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\FlareClient\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Send PHP errors to Flare", + "homepage": "https://github.com/spatie/flare-client-php", + "keywords": [ + "exception", + "flare", + "reporting", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/flare-client-php/issues", + "source": "https://github.com/spatie/flare-client-php/tree/1.1.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-03-11T13:21:28+00:00" + }, + { + "name": "spatie/ignition", + "version": "1.2.7", + "source": { + "type": "git", + "url": "https://github.com/spatie/ignition.git", + "reference": "2f059cf42b48f7c522efbba1c05ad59fc2c1a3f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/ignition/zipball/2f059cf42b48f7c522efbba1c05ad59fc2c1a3f2", + "reference": "2f059cf42b48f7c522efbba1c05ad59fc2c1a3f2", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "monolog/monolog": "^2.0", + "php": "^8.0", + "spatie/flare-client-php": "^1.1", + "symfony/console": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "require-dev": { + "mockery/mockery": "^1.4", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "symfony/process": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Ignition\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Spatie", + "email": "info@spatie.be", + "role": "Developer" + } + ], + "description": "A beautiful error page for PHP applications.", + "homepage": "https://flareapp.io/ignition", + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/ignition/issues", + "source": "https://github.com/spatie/ignition" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-03-29T08:48:34+00:00" + }, + { + "name": "spatie/laravel-ignition", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-ignition.git", + "reference": "924d1ae878874ad0bb49f63b69a9af759a34ee78" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/924d1ae878874ad0bb49f63b69a9af759a34ee78", + "reference": "924d1ae878874ad0bb49f63b69a9af759a34ee78", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "illuminate/support": "^8.77|^9.0", + "monolog/monolog": "^2.3", + "php": "^8.0", + "spatie/flare-client-php": "^1.0.1", + "spatie/ignition": "^1.2.4", + "symfony/console": "^5.0|^6.0", + "symfony/var-dumper": "^5.0|^6.0" + }, + "require-dev": { + "filp/whoops": "^2.14", + "livewire/livewire": "^2.8|dev-develop", + "mockery/mockery": "^1.4", + "nunomaduro/larastan": "^1.0", + "orchestra/testbench": "^6.23|^7.0", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/laravel-ray": "^1.27" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\LaravelIgnition\\IgnitionServiceProvider" + ], + "aliases": { + "Flare": "Spatie\\LaravelIgnition\\Facades\\Flare" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\LaravelIgnition\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Spatie", + "email": "info@spatie.be", + "role": "Developer" + } + ], + "description": "A beautiful error page for Laravel applications.", + "homepage": "https://flareapp.io/ignition", + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/laravel-ignition/issues", + "source": "https://github.com/spatie/laravel-ignition" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-04-14T18:04:51+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.6.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2021-12-12T21:44:58+00:00" + }, { "name": "symfony/debug", "version": "v4.4.37", @@ -8855,9 +8884,12 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.3|^8.0", + "php": "^8.1", "ext-json": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "platform-overrides": { + "php": "8.1" + }, + "plugin-api-version": "2.3.0" } diff --git a/config/app.php b/config/app.php index e9a255b..547350b 100644 --- a/config/app.php +++ b/config/app.php @@ -1,5 +1,7 @@ env('APP_URL', 'http://localhost'), - 'asset_url' => env('ASSET_URL', null), + 'asset_url' => env('ASSET_URL'), /* |-------------------------------------------------------------------------- @@ -189,51 +191,12 @@ return [ | */ - 'aliases' => [ - - 'App' => Illuminate\Support\Facades\App::class, - 'Arr' => Illuminate\Support\Arr::class, - 'Artisan' => Illuminate\Support\Facades\Artisan::class, - 'Auth' => Illuminate\Support\Facades\Auth::class, - 'Blade' => Illuminate\Support\Facades\Blade::class, - 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, - 'Bus' => Illuminate\Support\Facades\Bus::class, - 'Cache' => Illuminate\Support\Facades\Cache::class, - 'Config' => Illuminate\Support\Facades\Config::class, - 'Cookie' => Illuminate\Support\Facades\Cookie::class, - 'Crypt' => Illuminate\Support\Facades\Crypt::class, - 'Date' => Illuminate\Support\Facades\Date::class, - 'DB' => Illuminate\Support\Facades\DB::class, - 'Eloquent' => Illuminate\Database\Eloquent\Model::class, - 'Event' => Illuminate\Support\Facades\Event::class, - 'File' => Illuminate\Support\Facades\File::class, - 'Gate' => Illuminate\Support\Facades\Gate::class, - 'Hash' => Illuminate\Support\Facades\Hash::class, - 'Http' => Illuminate\Support\Facades\Http::class, - 'Js' => Illuminate\Support\Js::class, - 'Lang' => Illuminate\Support\Facades\Lang::class, - 'Log' => Illuminate\Support\Facades\Log::class, - 'Mail' => Illuminate\Support\Facades\Mail::class, - 'Notification' => Illuminate\Support\Facades\Notification::class, - 'Password' => Illuminate\Support\Facades\Password::class, - 'Queue' => Illuminate\Support\Facades\Queue::class, - 'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class, - 'Redirect' => Illuminate\Support\Facades\Redirect::class, - // 'Redis' => Illuminate\Support\Facades\Redis::class, - 'Request' => Illuminate\Support\Facades\Request::class, - 'Response' => Illuminate\Support\Facades\Response::class, - 'Route' => Illuminate\Support\Facades\Route::class, - 'Schema' => Illuminate\Support\Facades\Schema::class, - 'Session' => Illuminate\Support\Facades\Session::class, - 'Storage' => Illuminate\Support\Facades\Storage::class, - 'Str' => Illuminate\Support\Str::class, - 'URL' => Illuminate\Support\Facades\URL::class, - 'Validator' => Illuminate\Support\Facades\Validator::class, - 'View' => Illuminate\Support\Facades\View::class, + 'aliases' => Facade::defaultAliases()->merge([ 'Adldap' => Adldap\Laravel\Facades\Adldap::class, 'Form' => Collective\Html\FormFacade::class, 'Html' => Collective\Html\HtmlFacade::class, - 'Es' => Elasticquent\ElasticquentElasticsearchFacade::class, - ], + 'Es' => Elasticquent\ElasticquentElasticsearchFacade::class + ])->toArray(), + ]; diff --git a/config/broadcasting.php b/config/broadcasting.php index a26e31d..eb72755 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -37,7 +37,10 @@ return [ 'app_id' => env('PUSHER_APP_ID'), 'options' => [ 'cluster' => env('PUSHER_APP_CLUSTER'), - 'encrypted' => true, + 'useTLS' => true, + ], + 'client_options' => [ + // * Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html ], ], diff --git a/config/cache.php b/config/cache.php index d2977ad..0f2c960 100644 --- a/config/cache.php +++ b/config/cache.php @@ -97,12 +97,12 @@ return [ | Cache Key Prefix |-------------------------------------------------------------------------- | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. + | When utilizing the APC, database, memcached, Redis, or DynamoDB cache + | stores there might be other applications using the same cache. For + | that reason, you may prefix every cache key to avoid collisions. | */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'), ]; diff --git a/config/database.php b/config/database.php index 4190c62..bcbbbfd 100644 --- a/config/database.php +++ b/config/database.php @@ -69,7 +69,7 @@ return [ 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, - 'schema' => 'public', + 'search_path' => 'public', 'sslmode' => 'prefer', ], @@ -83,6 +83,8 @@ return [ 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, + // 'encrypt' => env('DB_ENCRYPT', 'yes'), + // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), ], ], @@ -121,14 +123,16 @@ return [ 'default' => [ 'host' => env('REDIS_HOST', '127.0.0.1'), - 'password' => env('REDIS_PASSWORD', null), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT', '6379'), 'database' => env('REDIS_DB', '0'), ], 'cache' => [ 'host' => env('REDIS_HOST', '127.0.0.1'), - 'password' => env('REDIS_PASSWORD', null), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT', '6379'), 'database' => env('REDIS_CACHE_DB', '1'), ], diff --git a/config/filesystems.php b/config/filesystems.php index 2c9629b..b296044 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -13,7 +13,7 @@ return [ | */ - 'default' => env('FILESYSTEM_DRIVER', 'local'), + 'default' => env('FILESYSTEM_DISK', 'local'), /* |-------------------------------------------------------------------------- @@ -22,7 +22,7 @@ return [ | | Here you may configure as many filesystem "disks" as you wish, and you | may even configure multiple disks of the same driver. Defaults have - | been setup for each driver as an example of the required options. + | been set up for each driver as an example of the required values. | | Supported Drivers: "local", "ftp", "sftp", "s3" | @@ -33,6 +33,7 @@ return [ 'local' => [ 'driver' => 'local', 'root' => public_path(), + 'throw' => true, ], 'public' => [ @@ -40,20 +41,24 @@ return [ 'root' => storage_path('app/public'), 'url' => env('APP_URL') . '/storage', 'visibility' => 'public', + 'throw' => true, ], 'arcadia' => [ 'driver' => 'local', 'root' => storage_path('export_arcadia'), + 'throw' => true, ], 'arcadia_link_s' => [ 'driver' => 'local', 'root' => storage_path('arcadia_link/send'), + 'throw' => true, ], 'arcadia_link_r' => [ 'driver' => 'local', 'root' => storage_path('arcadia_link/receive'), + 'throw' => true, ], 's3' => [ @@ -64,6 +69,7 @@ return [ 'bucket' => env('AWS_BUCKET'), 'endpoint' => env('AWS_ENDPOINT'), 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), + 'throw' => true, ], ], diff --git a/config/ldcweb.php b/config/ldcweb.php new file mode 100644 index 0000000..7c62d71 --- /dev/null +++ b/config/ldcweb.php @@ -0,0 +1,5 @@ + env('PROJECT_UUID') +]; diff --git a/config/logging.php b/config/logging.php index 870b230..2e2c320 100644 --- a/config/logging.php +++ b/config/logging.php @@ -79,10 +79,11 @@ return [ 'papertrail' => [ 'driver' => 'monolog', 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => SyslogUdpHandler::class, + 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 'handler_with' => [ 'host' => env('PAPERTRAIL_URL'), 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'), ], ], diff --git a/config/mail.php b/config/mail.php index 3795e21..217e395 100644 --- a/config/mail.php +++ b/config/mail.php @@ -42,7 +42,6 @@ return [ 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'timeout' => null, - 'auth_mode' => null, ], 'ses' => [ @@ -59,7 +58,7 @@ return [ 'sendmail' => [ 'transport' => 'sendmail', - 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'), + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), ], 'log' => [ diff --git a/config/sanctum.php b/config/sanctum.php index 20676d0..5644cc4 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -1,5 +1,7 @@ explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( '%s%s', 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', - env('APP_URL') ? ',' . parse_url(env('APP_URL'), PHP_URL_HOST) : '' + Sanctum::currentApplicationUrlWithPort() ))), /* diff --git a/config/services.php b/config/services.php index c2bd239..e7b5c10 100644 --- a/config/services.php +++ b/config/services.php @@ -18,6 +18,7 @@ return [ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), + 'scheme' => 'https', ], 'postmark' => [ diff --git a/config/session.php b/config/session.php index b096861..d2e3239 100644 --- a/config/session.php +++ b/config/session.php @@ -72,7 +72,7 @@ return [ | */ - 'connection' => env('SESSION_CONNECTION', null), + 'connection' => env('SESSION_CONNECTION'), /* |-------------------------------------------------------------------------- @@ -100,7 +100,7 @@ return [ | */ - 'store' => env('SESSION_STORE', null), + 'store' => env('SESSION_STORE'), /* |-------------------------------------------------------------------------- @@ -155,7 +155,7 @@ return [ | */ - 'domain' => env('SESSION_DOMAIN', null), + 'domain' => env('SESSION_DOMAIN'), /* |-------------------------------------------------------------------------- diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 5cdba5b..fa1ca52 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -5,12 +5,15 @@ namespace Database\Factories; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; +/** + * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User> + */ class UserFactory extends Factory { /** * Define the model's default state. * - * @return array + * @return array */ public function definition() { @@ -18,8 +21,8 @@ class UserFactory extends Factory 'name' => $this->faker->name(), 'email' => $this->faker->unique()->safeEmail(), 'email_verified_at' => now(), + // * password 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', -// password 'remember_token' => Str::random(10), ]; } @@ -27,7 +30,8 @@ class UserFactory extends Factory /** * Indicate that the model's email address should be unverified. * - * @return \Illuminate\Database\Eloquent\Factories\Factory + * @return static + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ public function unverified() { diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 621a24e..cf6b776 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateUsersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -33,4 +33,4 @@ class CreateUsersTable extends Migration { Schema::dropIfExists('users'); } -} +}; diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php index 0ee0a36..fcacb80 100644 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreatePasswordResetsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ class CreatePasswordResetsTable extends Migration { Schema::dropIfExists('password_resets'); } -} +}; diff --git a/database/migrations/2019_05_15_080601_create_marques_table.php b/database/migrations/2019_05_15_080601_create_marques_table.php index af4b723..cdfb730 100644 --- a/database/migrations/2019_05_15_080601_create_marques_table.php +++ b/database/migrations/2019_05_15_080601_create_marques_table.php @@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateMarquesTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ class CreateMarquesTable extends Migration { Schema::dropIfExists('marques'); } -} +}; diff --git a/database/migrations/2021_06_09_101909_create_format_restrictions_table.php b/database/migrations/2021_06_09_101909_create_format_restrictions_table.php index ae7373b..34dbbb6 100644 --- a/database/migrations/2021_06_09_101909_create_format_restrictions_table.php +++ b/database/migrations/2021_06_09_101909_create_format_restrictions_table.php @@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateFormatRestrictionsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -43,4 +43,4 @@ class CreateFormatRestrictionsTable extends Migration { Schema::dropIfExists('format_restrictions'); } -} +}; diff --git a/database/migrations/2021_06_09_115021_create_settings_table.php b/database/migrations/2021_06_09_115021_create_settings_table.php index 5338db9..fb351ec 100644 --- a/database/migrations/2021_06_09_115021_create_settings_table.php +++ b/database/migrations/2021_06_09_115021_create_settings_table.php @@ -5,7 +5,7 @@ use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateSettingsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -21,7 +21,7 @@ class CreateSettingsTable extends Migration $table->timestamps(); }); - $seeder = new SettingsSeeder; + $seeder = new SettingsSeeder(); $seeder->run(); } @@ -34,4 +34,4 @@ class CreateSettingsTable extends Migration { Schema::dropIfExists('settings'); } -} +}; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 57b73b5..71f673f 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -2,6 +2,7 @@ namespace Database\Seeders; +use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder diff --git a/lang/en.json b/lang/en.json new file mode 100644 index 0000000..04bff9f --- /dev/null +++ b/lang/en.json @@ -0,0 +1,15 @@ +{ + "error_occured_in_app_check_trace": "An error occured on :appName", + "check_trace": "Please check logs in order to fix this.", + "uri": "uri", + "date": "date", + "code": "code", + "file": "file", + "line": "line", + "anonymized_stack_trace": "anonymized stack trace", + "The :attribute must contain at least one letter.": "The :attribute must contain at least one letter.", + "The :attribute must contain at least one number.": "The :attribute must contain at least one number.", + "The :attribute must contain at least one symbol.": "The :attribute must contain at least one symbol.", + "The :attribute must contain at least one uppercase and one lowercase letter.": "The :attribute must contain at least one uppercase and one lowercase letter.", + "The given :attribute has appeared in a data leak. Please choose a different :attribute.": "The given :attribute has appeared in a data leak. Please choose a different :attribute." +} diff --git a/resources/lang/en/auth.php b/lang/en/auth.php similarity index 100% rename from resources/lang/en/auth.php rename to lang/en/auth.php diff --git a/resources/lang/en/pagination.php b/lang/en/pagination.php similarity index 100% rename from resources/lang/en/pagination.php rename to lang/en/pagination.php diff --git a/resources/lang/en/passwords.php b/lang/en/passwords.php similarity index 100% rename from resources/lang/en/passwords.php rename to lang/en/passwords.php diff --git a/resources/lang/en/validation-inline.php b/lang/en/validation-inline.php similarity index 100% rename from resources/lang/en/validation-inline.php rename to lang/en/validation-inline.php diff --git a/resources/lang/en/validation.php b/lang/en/validation.php similarity index 100% rename from resources/lang/en/validation.php rename to lang/en/validation.php diff --git a/resources/lang/fr.json b/lang/fr.json similarity index 100% rename from resources/lang/fr.json rename to lang/fr.json diff --git a/resources/lang/fr/auth.php b/lang/fr/auth.php similarity index 100% rename from resources/lang/fr/auth.php rename to lang/fr/auth.php diff --git a/resources/lang/fr/pagination.php b/lang/fr/pagination.php similarity index 100% rename from resources/lang/fr/pagination.php rename to lang/fr/pagination.php diff --git a/resources/lang/fr/passwords.php b/lang/fr/passwords.php similarity index 100% rename from resources/lang/fr/passwords.php rename to lang/fr/passwords.php diff --git a/resources/lang/fr/validation-inline.php b/lang/fr/validation-inline.php similarity index 100% rename from resources/lang/fr/validation-inline.php rename to lang/fr/validation-inline.php diff --git a/resources/lang/fr/validation-nova-inline.php b/lang/fr/validation-nova-inline.php similarity index 100% rename from resources/lang/fr/validation-nova-inline.php rename to lang/fr/validation-nova-inline.php diff --git a/resources/lang/fr/validation-nova.php b/lang/fr/validation-nova.php similarity index 100% rename from resources/lang/fr/validation-nova.php rename to lang/fr/validation-nova.php diff --git a/resources/lang/fr/validation.php b/lang/fr/validation.php similarity index 100% rename from resources/lang/fr/validation.php rename to lang/fr/validation.php diff --git a/phpunit.xml b/phpunit.xml index 9b8245f..1b245ce 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -18,14 +18,14 @@ - - - - - - - - - + + + + + + + + + diff --git a/resources/lang/en.json b/resources/lang/en.json deleted file mode 100644 index 4dc6cad..0000000 --- a/resources/lang/en.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "error_occured_in_app_check_trace": "An error occured on :appName", - "check_trace": "Please check logs in order to fix this.", - "uri": "uri", - "date": "date", - "code": "code", - "file": "file", - "line": "line", - "anonymized_stack_trace": "anonymized stack trace" -} diff --git a/server.php b/server.php deleted file mode 100644 index 1e44b88..0000000 --- a/server.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ - -$uri = urldecode( - parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ?? '' -); - -// This file allows us to emulate Apache's "mod_rewrite" functionality from the -// built-in PHP web server. This provides a convenient way to test a Laravel -// application without having installed a "real" web server software here. -if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { - return false; -} - -require_once __DIR__.'/public/index.php';