diff --git a/.env.example b/.env.example index 2c7686d..b3744a1 100644 --- a/.env.example +++ b/.env.example @@ -14,15 +14,6 @@ DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD= -DB_CONNECTION_OLD=mysql -DB_HOST_OLD=127.0.0.1 -DB_PORT_OLD=3306 -DB_DATABASE_OLD=ldccrm_12_2020 -DB_USERNAME_OLD=root -DB_PASSWORD_OLD= - -MIGRATIONPAGINATION=20000 - BROADCAST_DRIVER=log CACHE_DRIVER=apc QUEUE_CONNECTION=database @@ -42,18 +33,14 @@ MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS=null MAIL_FROM_NAME="${APP_NAME}" -AWS_ACCESS_KEY_ID= -AWS_SECRET_ACCESS_KEY= -AWS_DEFAULT_REGION=us-east-1 -AWS_BUCKET= - -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_APP_CLUSTER=mt1 - -MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" -MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" - # Sentry SENTRY_LARAVEL_DSN= + +# ADMIN SECURE +# - API ENDPOINT (Optional) +LDC_WEB_API_ENDPOINT="https://ldc-web.ldc.fr/api/ldc-networks" +# - API KEY +LDC_WEB_API_KEY="" +# - LIST SEPARATED WITH ',' (Optional) +LDC_WEB_CIDR_MANUAL_ALLOWED_LIST="" + diff --git a/.env.testing.example b/.env.testing.example index a69adf0..4cad0e0 100644 --- a/.env.testing.example +++ b/.env.testing.example @@ -14,15 +14,6 @@ DB_DATABASE=testing_ldccrm_12_2020 DB_USERNAME=root DB_PASSWORD=DBPASSWORD -DB_CONNECTION_OLD=mysql -DB_HOST_OLD=127.0.0.1 -DB_PORT_OLD=3306 -DB_DATABASE_OLD="ldc-crm" -DB_USERNAME_OLD=root -DB_PASSWORD_OLD= - -MIGRATIONPAGINATION=20000 - BROADCAST_DRIVER=log CACHE_DRIVER=file QUEUE_CONNECTION=database diff --git a/Dockerfile b/Dockerfile index 0c9015f..303e014 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/ldcweb-production-8.2:latest +FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/ldcweb-production-8.3:latest COPY --chown=www-data:www-data . /app/srcs USER root RUN chmod -R 755 /app/srcs/storage diff --git a/MIG/CPlatosChiffrement.class.php b/MIG/CPlatosChiffrement.class.php deleted file mode 100644 index 01de94e..0000000 --- a/MIG/CPlatosChiffrement.class.php +++ /dev/null @@ -1,69 +0,0 @@ -setBlockLength(128); - // keys are null-padded to the closest valid size - // longer than the longest key and it's truncated - $cipher->setKeyLength(128); - $cipher->setKey($key); - // the IV defaults to all-NULLs if not explicitly defined - $cipher->setIV($iv); - $cipher->disablePadding(); - $length = strlen($text); - $pad = 32 - ($length % 32); - $text = str_pad($text, $length + $pad, chr(0)); - return base64_encode($cipher->encrypt($text)); - } - private function decryptRJ256($key, $iv, $text) - { - $cipher = new Rijndael('cbc'); // could use CRYPT_RIJNDAEL_MODE_CBC - $cipher->setBlockLength(128); - // keys are null-padded to the closest valid size - // longer than the longest key and it's truncated - $cipher->setKeyLength(128); - $cipher->setKey($key); - // the IV defaults to all-NULLs if not explicitly defined - $cipher->setIV($iv); - $cipher->disablePadding(); - return $cipher->decrypt(base64_decode($text)); - } -} diff --git a/MIG/Db.php b/MIG/Db.php deleted file mode 100644 index 0f47bbd..0000000 --- a/MIG/Db.php +++ /dev/null @@ -1,96 +0,0 @@ - \PDO::ERRMODE_EXCEPTION)); - } catch (\Exception $e) { - die($e->getMessage()); - } - } - return self::$instance; - } - - public function request($statement, $params = false) - { - try { - $db = self::Instance(); - $query = $db->prepare($statement); - if ($params) { - $query->execute($params); - } else { - $query->execute(); - } - } catch (\PDOException $e) { - die($e->getMessage()); - } - $query->setFetchMode(\PDO::FETCH_ASSOC); - $result = $query->fetch(); - $query->closeCursor(); - return ($result); - } - - public function requestAll($statement, $params = false) - { - try { - $db = self::Instance(); - $query = $db->prepare($statement); - if ($params) { - $query->execute($params); - } else { - $query->execute(); - } - } catch (\PDOException $e) { - die($e->getMessage()); - } - $query->setFetchMode(\PDO::FETCH_ASSOC); - $result = $query->fetchAll(); - $query->closeCursor(); - return ($result); - } - - public function requestPush($statement, $params = false) - { - try { - $db = self::Instance(); - $query = $db->prepare($statement); - if ($params) - $query->execute($params); - else - $query->execute(); - return true; - } catch (\PDOException $e) { - die($e->getMessage()); - } - } - - public function requestPushInsert($statement, $params) - { - try { - $db = self::Instance(); - $query = $db->prepare($statement); - $query->execute($params); - return $db->lastInsertId(); - } catch (\PDOException $e) { - file_put_contents("errors_sql.txt", implode(',', $params) . PHP_EOL, FILE_APPEND); - } - } -} diff --git a/MIG/export.php b/MIG/export.php deleted file mode 100644 index 82f1a3e..0000000 --- a/MIG/export.php +++ /dev/null @@ -1,91 +0,0 @@ -requestAll("SELECT * -FROM useraccount -INNER JOIN siteuser su ON useraccount.user_id = su.siteuser_useraccountId -WHERE su.siteuser_siteId = :siteid -AND user_status = 1 -AND user_lastUpdateDate >= '2018-03-01' -AND (user_emailCheckStatus <> 0 OR user_emailCheckStatus IS NULL) -AND (user_lastCnxDateHeure IS NOT NULL AND user_lastCnxDateHeure <> '0000-00-00 00:00:00')", ['siteid' => $siteId]); - -foreach ($accounts as $account) { - $isSingleOptin = false; - - $oldCRMid = $account['user_id']; - - $civility = $account['user_civilite']; - $firstname = $account['user_prenom']; - $lastname = $account['user_nom']; - - $birthdate = $account['user_dateNaissance']; - - $address1 = !empty($account['user_adresse1']) ? $account['user_adresse1'] : null; - $address2 = !empty($account['user_adresse2']) ? $account['user_adresse2'] : null; - $postcode = (!empty($account['user_codePostal']) && $account['user_codePostal'] !== 0 ? $account['user_codePostal'] : null); - $city = !empty($account['user_ville']) ? $account['user_ville'] : null; - - $optin = $account['user_inscritNewsletter']; - $haschcode = $account['user_hashcode']; - $status = $account['user_status']; - - $created_at = $account['user_creationDate']; - $updated_at = $account['user_lastUpdateDate']; - - $email = $account['user_email']; - $password = CPlatosChiffrement::decrypt($account['user_pwd']); - - $last_cnx = $account['user_lastCnxDateHeure']; - - if (empty($firstname) && empty($lastname)) - $isSingleOptin = true; - - // Récupération des champs complémentaires - $fields = [['fieldkey' => 'created_at', 'fieldvalue' => $created_at], ['fieldkey' => 'updated_at', 'fieldvalue' => $updated_at], ['fieldkey' => 'last_cnx', 'fieldvalue' => $last_cnx]]; - - if (!$isSingleOptin) { - $crmUser = $apiCrm->createCustomer($email, $password, $firstname, $lastname, $optin, $birthdate, null, $address1, $address2, $city, $postcode, "France"); - if ($crmUser->status === 'OK') { - $newCRMId = $crmUser->user->crm_id; - $activate = $apiCrm->activateCustomer($newCRMId); - if ($activate->status === 'NOK') { - file_put_contents("Export_errors.txt", "OLD CRM ID : $oldCRMid - NEW CRM ID : $newCRMId - ACTIVATE API ERROR : " . $activate->code . " - " . $activate->message . PHP_EOL, FILE_APPEND); - } - } else { - file_put_contents("Export_errors.txt", "OLD CRM ID : $oldCRMid - API ERROR : " . $crmUser->code . " - " . $crmUser->message . PHP_EOL, FILE_APPEND); - continue; - } - } else { - $result = $apiCrm->createSingleOptin($email); - - if ($result->status === 'OK') { - $newCRMId = "SINGLEOPTIN"; - } else { - file_put_contents("Export_errors.txt", "OLD CRM ID : $oldCRMid - API ERROR : " . $crmUser->code . " - " . $crmUser->message . PHP_EOL, FILE_APPEND); - continue; - } - } - write("$oldCRMid;$newCRMId;$email;" . json_encode($fields) . PHP_EOL, $siteName); -} - -function write($text, $siteName) -{ - if (!file_exists("Export_$siteName.csv")) - file_put_contents("Export_$siteName.csv", "\xEF\xBB\xBF", FILE_APPEND); // BOM UTF-8 - file_put_contents("Export_$siteName.csv", $text, FILE_APPEND); -} diff --git a/MIG/make_tmp_table.sql b/MIG/make_tmp_table.sql deleted file mode 100644 index 54f2600..0000000 --- a/MIG/make_tmp_table.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE `legaulois_migration` ( - `id` BIGINT(20) NOT NULL AUTO_INCREMENT, - `user_id` BIGINT(20) NOT NULL DEFAULT '0', - `pwd` VARCHAR(255) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) -COLLATE='utf8_unicode_ci' -ENGINE=InnoDB -AUTO_INCREMENT=0; diff --git a/MIG/migrate.php b/MIG/migrate.php deleted file mode 100644 index 588a177..0000000 --- a/MIG/migrate.php +++ /dev/null @@ -1,80 +0,0 @@ -fieldkey){ - case 'created_at': - if (!$isSingleOptin) { - $query = "UPDATE customers SET created_at = :nvalue WHERE id = :newid"; - $db->requestPush($query, ['nvalue' => $otherField->fieldvalue, 'newid' => $newCrmId]); - $query = "UPDATE customer_infos SET created_at = :nvalue WHERE customer_id = :newid AND brand_id = :brandid"; - $db->requestPush($query, ['nvalue' => $otherField->fieldvalue, 'newid' => $newCrmId, 'brandid' => $newBrandId]); - $query = "UPDATE customer_login SET created_at = :nvalue WHERE customer_id = :newid AND brand_id = :brandid"; - $db->requestPush($query, ['nvalue' => $otherField->fieldvalue, 'newid' => $newCrmId, 'brandid' => $newBrandId]); - $query = "UPDATE customer_opt_in_history SET created_at = :nvalue WHERE customer_id = :newid AND brand_id = :brandid"; - $db->requestPush($query, ['nvalue' => $otherField->fieldvalue, 'newid' => $newCrmId, 'brandid' => $newBrandId]); - }else{ - $query = "UPDATE single_optin SET created_at = :nvalue, updated_at = :nvalue WHERE email = :email AND brand_id = :brandid"; - $db->requestPush($query, ['nvalue' => $otherField->fieldvalue, 'email' => $email, 'brandid' => $newBrandId]); - } - break; - case 'updated_at': - if (!$isSingleOptin) { - $query = "UPDATE customers SET updated_at = :nvalue WHERE id = :newid"; - $db->requestPush($query, ['nvalue' => $otherField->fieldvalue, 'newid' => $newCrmId]); - $query = "UPDATE customer_infos SET updated_at = :nvalue WHERE customer_id = :newid AND brand_id = :brandid"; - $db->requestPush($query, ['nvalue' => $otherField->fieldvalue, 'newid' => $newCrmId, 'brandid' => $newBrandId]); - $query = "UPDATE customer_login SET updated_at = :nvalue WHERE customer_id = :newid AND brand_id = :brandid"; - $db->requestPush($query, ['nvalue' => $otherField->fieldvalue, 'newid' => $newCrmId, 'brandid' => $newBrandId]); - $query = "UPDATE customer_opt_in_history SET updated_at = :nvalue WHERE customer_id = :newid AND brand_id = :brandid"; - $db->requestPush($query, ['nvalue' => $otherField->fieldvalue, 'newid' => $newCrmId, 'brandid' => $newBrandId]); - } - break; - case 'last_cnx': - if (!$isSingleOptin) { - $query = "UPDATE customer_login SET last_connection = :nvalue WHERE customer_id = :newid AND brand_id = :brandid"; - $db->requestPush($query, ['nvalue' => $otherField->fieldvalue, 'newid' => $newCrmId, 'brandid' => $newBrandId]); - } - break; - - } - //var_dump($otherField); - } -} diff --git a/MIG/pwd.php b/MIG/pwd.php deleted file mode 100644 index f1b43f2..0000000 --- a/MIG/pwd.php +++ /dev/null @@ -1,89 +0,0 @@ -requestPush("CREATE TABLE IF NOT EXISTS $table ( - `id` BIGINT(20) NOT NULL AUTO_INCREMENT, - `user_id` BIGINT(20) NOT NULL DEFAULT '0', - `firstname` VARCHAR(255) NOT NULL DEFAULT '0', - `lastname` VARCHAR(255) NOT NULL DEFAULT '0', - `birthdate` VARCHAR(255) NULL DEFAULT '0', - `address` VARCHAR(255) NULL DEFAULT '0', - `address2` VARCHAR(255) NULL DEFAULT '0', - `city` VARCHAR(255) NULL DEFAULT '0', - `postcode` VARCHAR(255) NULL DEFAULT '0', - `optin` INT(11) NOT NULL DEFAULT '0', - `email` VARCHAR(255) NOT NULL DEFAULT '0', - `pwd` VARCHAR(255) NOT NULL DEFAULT '0', - `created_at` TIMESTAMP NOT NULL, - `updated_at` TIMESTAMP NOT NULL, - `last_cnx` TIMESTAMP NOT NULL, - PRIMARY KEY (`id`) -) COLLATE='utf8_unicode_ci' ENGINE=InnoDB AUTO_INCREMENT=0;"); - -$getAccounts = function ($skip) use ($db, $siteId, $maxdate){ - return $db->requestAll("SELECT * -FROM useraccount -INNER JOIN siteuser su ON useraccount.user_id = su.siteuser_useraccountId -WHERE su.siteuser_siteId = :siteid -AND user_id >= 701697 -AND user_status = 1 -AND user_lastUpdateDate >= :maxdate -AND (user_emailCheckStatus <> 0 OR user_emailCheckStatus IS NULL) -AND (user_lastCnxDateHeure IS NOT NULL AND user_lastCnxDateHeure <> '0000-00-00 00:00:00') -AND user_lastCnxDateHeure >= :maxdate -AND user_email IS NOT NULL LIMIT 4600 OFFSET ". ($skip * 4600), ['siteid' => $siteId, 'maxdate' => $maxdate]); -}; -$k = 0; -while (count($accounts = $getAccounts($k++))) { - $sql = []; - $toto = ""; - foreach ($accounts as $account){ - $crm_id = $account['user_id']; - $civility = $account['user_civilite']; - $firstname = ucfirst($account['user_prenom']); - $lastname = ucfirst($account['user_nom']); - $birthdate = $account['user_dateNaissance']; - $address1 = !empty($account['user_adresse1']) ? $account['user_adresse1'] : null; - $address2 = !empty($account['user_adresse2']) ? $account['user_adresse2'] : null; - $postcode = (!empty($account['user_codePostal']) && $account['user_codePostal'] !== 0 ? $account['user_codePostal'] : null); - $city = !empty($account['user_ville']) ? $account['user_ville'] : null; - $optin = $account['user_inscritNewsletter']; - $haschcode = $account['user_hashcode']; - $status = $account['user_status']; - $created_at = $account['user_creationDate']; - $updated_at = $account['user_lastUpdateDate']; - $email = strtolower($account['user_email']); - //$password = CPlatosChiffrement::decrypt($account['user_pwd']); - $password = "toto"; - $last_cnx = $account['user_lastCnxDateHeure']; - $datas = [ - $crm_id, - $firstname, - $lastname, - $birthdate, - $address1, - $address2, - $city, - $postcode, - $optin, - $email, - $password, - $created_at, - $updated_at, - $last_cnx - ]; - $toto = "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - $db->requestPushInsert("INSERT INTO $table (user_id, firstname, lastname, birthdate, address, address2, city, postcode, optin, email, pwd, created_at, updated_at, last_cnx) VALUES $toto", $datas); - } -} diff --git a/app/Console/Commands/LdcWebStatusChecker.php b/app/Console/Commands/LdcWebStatusChecker.php deleted file mode 100644 index c68f2d4..0000000 --- a/app/Console/Commands/LdcWebStatusChecker.php +++ /dev/null @@ -1,79 +0,0 @@ - 0) { - foreach ($files as $file) { - $data['logs'] = $data['logs'] + filesize($file); - } - } - - $data['code']['version'] = app()->version(); - - // 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); - curl_exec($ch); - curl_close($ch); - return 0; - } -} diff --git a/app/Console/Commands/MigrateCrmUsers.php b/app/Console/Commands/MigrateCrmUsers.php deleted file mode 100644 index 246e5d3..0000000 --- a/app/Console/Commands/MigrateCrmUsers.php +++ /dev/null @@ -1,72 +0,0 @@ -ask('What is the tmp table name with users data ?'); - - try { - DB::connection(config('database.oldDB'))->table($table)->exists(); - } catch (\Exception $e) { - $this->error(sprintf('%s table not found on old crm database', $table)); - return -1; - } - - $brandname = $this->ask('What is the brand name ?'); - $brand = Brand::query()->where('name', 'LIKE', "%$brandname%")->first(); - if (!$brand) { - if (!$this->confirm(sprintf('Would you like to use %s ? ', $brandname))) { - $this->info('Command cancelled'); - return 0; - } - if ($this->confirm('Would you like to create a new one ?')) { - $brand = new Brand(); - $brand->name = $brandname; - $brand->save(); - } else { - $this->info('Command cancelled'); - return 0; - } - } - - $mgOldData = new MigrateOldData(); - $mgOldData->runMigration($brand, $table); - } catch (\Exception $e) { - $this->error(sprintf('Failed %s', $e)); - return -1; - } //end try - return 0; - } -} diff --git a/app/Enums/CustomerExportType.php b/app/Enums/CustomerExportType.php index 254c87e..73a18b5 100644 --- a/app/Enums/CustomerExportType.php +++ b/app/Enums/CustomerExportType.php @@ -16,8 +16,9 @@ enum CustomerExportType: int * Optionnal labels definition */ private const LABELS = [ - self::singleOptin->name => 'Les single optins uniquement', + self::singleOptin->name => 'Les single-optins uniquement', self::customer->name => 'Les clients uniquement acceptant de recevoir les newsletters', - self::both->name => 'La totalité des client acceptant de recevoir les newsletters', + self::both->name => 'La totalité des single-optins ainsi que des clients acceptant + de recevoir les newsletters', ]; } diff --git a/app/Exceptions/AbortRowImportException.php b/app/Exceptions/AbortRowImportException.php deleted file mode 100644 index fde07b6..0000000 --- a/app/Exceptions/AbortRowImportException.php +++ /dev/null @@ -1,13 +0,0 @@ - 2020) - * - * @author Jérémy Munsch - */ -class AbortRowImportException extends \RuntimeException -{ -} diff --git a/app/Http/Controllers/Api/V4/StatsController.php b/app/Http/Controllers/Api/V4/StatsController.php index ae36f79..c741c8e 100644 --- a/app/Http/Controllers/Api/V4/StatsController.php +++ b/app/Http/Controllers/Api/V4/StatsController.php @@ -70,7 +70,7 @@ class StatsController extends Controller ->whereIn('answer_id', $answers->pluck('id')) ->get()->map(function ($custAnswer) { return [ - 'answer_id' => $custAnswer->answer_id, + 'answer_id' => $custAnswer->answer_id, 'created_at' => $custAnswer->created_at->isoFormat('YYYY-MM-DD'), ]; })->groupBy(['created_at', 'answer_id'])->map(function ($day) { diff --git a/app/Http/Requests/Api/V2/GetBrandStatsRequest.php b/app/Http/Requests/Api/V2/GetBrandStatsRequest.php index 5fd1a0f..4dcccbf 100644 --- a/app/Http/Requests/Api/V2/GetBrandStatsRequest.php +++ b/app/Http/Requests/Api/V2/GetBrandStatsRequest.php @@ -22,7 +22,7 @@ class GetBrandStatsRequest extends BaseApiRequest public function rules(): array { try { - if (Carbon::parse($this->end)->floatDiffInMonths(Carbon::parse($this->start)) > 3) { + if (Carbon::parse($this->end)->floatDiffInMonths(Carbon::parse($this->start), true) > 3) { throw ValidationException::withMessages([ 'Vous devez sélectionner une période de maximum 3 mois' ]); @@ -36,7 +36,7 @@ class GetBrandStatsRequest extends BaseApiRequest throw $e; } return [ - 'start' => 'required|date|date_format:Y-m-d', + 'start' => 'required|date|date_format:Y-m-d|before_or_equal:end', 'end' => 'required|date|date_format:Y-m-d|after_or_equal:start', ]; } diff --git a/app/Http/Requests/Api/V2/GetQuestionStatsRequest.php b/app/Http/Requests/Api/V2/GetQuestionStatsRequest.php index b84b760..4434152 100644 --- a/app/Http/Requests/Api/V2/GetQuestionStatsRequest.php +++ b/app/Http/Requests/Api/V2/GetQuestionStatsRequest.php @@ -23,7 +23,7 @@ class GetQuestionStatsRequest extends BaseApiRequest public function rules(): array { try { - if (Carbon::parse($this->end)->floatDiffInMonths(Carbon::parse($this->start)) > 3) { + if (Carbon::parse($this->end)->floatDiffInMonths(Carbon::parse($this->start), true) > 3) { throw ValidationException::withMessages([ 'Vous devez sélectionner une période de maximum 3 mois' ]); @@ -37,7 +37,7 @@ class GetQuestionStatsRequest extends BaseApiRequest throw $e; } return [ - 'start' => 'required|date|date_format:Y-m-d', + 'start' => 'required|date|date_format:Y-m-d|before_or_equal:end', 'end' => 'required|date|date_format:Y-m-d|after_or_equal:start', ]; } diff --git a/app/Http/Requests/Api/V4/GetBrandStatsRequest.php b/app/Http/Requests/Api/V4/GetBrandStatsRequest.php index 7ef8d79..e69d30b 100644 --- a/app/Http/Requests/Api/V4/GetBrandStatsRequest.php +++ b/app/Http/Requests/Api/V4/GetBrandStatsRequest.php @@ -19,7 +19,7 @@ class GetBrandStatsRequest extends BaseApiRequest public function rules(): array { try { - if (Carbon::parse($this->end)->floatDiffInMonths(Carbon::parse($this->start)) > 3) { + if (Carbon::parse($this->end)->floatDiffInMonths(Carbon::parse($this->start), true) > 3) { throw ValidationException::withMessages([ 'Vous devez sélectionner une période de maximum 3 mois' ]); @@ -27,13 +27,13 @@ class GetBrandStatsRequest extends BaseApiRequest } catch (\Exception $e) { if (\get_class($e) !== ValidationException::class) { throw ValidationException::withMessages([ - 'Les dates séléectionnées ne sembles pas être valides' + 'Les dates sélectionnées ne sembles pas être valides' ]); } throw $e; } return [ - 'start' => 'required|date|date_format:Y-m-d', + 'start' => 'required|date|date_format:Y-m-d|before_or_equal:end', 'end' => 'required|date|date_format:Y-m-d|after_or_equal:start', ]; } diff --git a/app/Http/Requests/Api/V4/GetQuestionStatsRequest.php b/app/Http/Requests/Api/V4/GetQuestionStatsRequest.php index 374ff19..43b9fd5 100644 --- a/app/Http/Requests/Api/V4/GetQuestionStatsRequest.php +++ b/app/Http/Requests/Api/V4/GetQuestionStatsRequest.php @@ -19,7 +19,7 @@ class GetQuestionStatsRequest extends BaseApiRequest public function rules(): array { try { - if (Carbon::parse($this->end)->floatDiffInMonths(Carbon::parse($this->start)) > 3) { + if (Carbon::parse($this->end)->floatDiffInMonths(Carbon::parse($this->start), true) > 3) { throw ValidationException::withMessages([ 'Vous devez sélectionner une période de maximum 3 mois' ]); @@ -33,7 +33,7 @@ class GetQuestionStatsRequest extends BaseApiRequest throw $e; } return [ - 'start' => 'required|date|date_format:Y-m-d', + 'start' => 'required|date|date_format:Y-m-d|before_or_equal:end', 'end' => 'required|date|date_format:Y-m-d|after_or_equal:start', ]; } diff --git a/app/Http/Requests/Bo/StatsByBrandRequest.php b/app/Http/Requests/Bo/StatsByBrandRequest.php index 3e2e3a8..926d35b 100644 --- a/app/Http/Requests/Bo/StatsByBrandRequest.php +++ b/app/Http/Requests/Bo/StatsByBrandRequest.php @@ -30,9 +30,9 @@ class StatsByBrandRequest extends FormRequest { if ($this->post()) { try { - if ((Carbon::parse($this->end)->diffInDays(Carbon::parse($this->start)) + 1) > 365) { + if ((Carbon::parse($this->end)->diffInDays(Carbon::parse($this->start)->addDay(), true)) > 365) { throw ValidationException::withMessages([ - 'Vous devez sélectionner une période de maximum 1 ans' + 'Vous devez sélectionner une période de maximum 1 an' ]); } } catch (\Exception $e) { diff --git a/app/Http/Requests/Bo/StatsByQuestionRequest.php b/app/Http/Requests/Bo/StatsByQuestionRequest.php index b5b7aab..284b7ca 100644 --- a/app/Http/Requests/Bo/StatsByQuestionRequest.php +++ b/app/Http/Requests/Bo/StatsByQuestionRequest.php @@ -30,7 +30,7 @@ class StatsByQuestionRequest extends FormRequest { if ($this->post()) { try { - if ((Carbon::parse($this->end)->diffInDays(Carbon::parse($this->start)) + 1) > 365) { + if ((Carbon::parse($this->end)->diffInDays(Carbon::parse($this->start)->addDay(), true)) > 365) { throw ValidationException::withMessages([ 'Vous devez sélectionner une période de maximum 1 ans' ]); diff --git a/app/Http/Resources/Api/V2/ApiResponse.php b/app/Http/Resources/Api/V2/ApiResponse.php index df4778b..3d60a62 100644 --- a/app/Http/Resources/Api/V2/ApiResponse.php +++ b/app/Http/Resources/Api/V2/ApiResponse.php @@ -36,8 +36,8 @@ class ApiResponse extends JsonResource { //phpcs:enable return [ - 'status' => $this->status->value(), - 'data' => (array)($this->data ?? []), + 'status' => $this->status->value(), + 'data' => (array)($this->data ?? []), 'version' => '3.0.6' ]; } diff --git a/app/Http/Resources/Api/V4/QuestionStatsResource.php b/app/Http/Resources/Api/V4/QuestionStatsResource.php index f210551..b01ead1 100644 --- a/app/Http/Resources/Api/V4/QuestionStatsResource.php +++ b/app/Http/Resources/Api/V4/QuestionStatsResource.php @@ -37,7 +37,7 @@ class QuestionStatsResource extends JsonResourceCollection //phpcs:enable return [ 'answers' => (new AnswersResource($this->question->answers))->toArray($request), - 'stats' => $this->collection->toArray() + 'stats' => $this->collection->toArray() ]; } } diff --git a/app/Lib/MigrateOldData.php b/app/Lib/MigrateOldData.php deleted file mode 100644 index f33ed2f..0000000 --- a/app/Lib/MigrateOldData.php +++ /dev/null @@ -1,251 +0,0 @@ -table = $table; - $this->brand = $brand; - $this->instruct(); - $this->up(); - } - - /** - * Instruct. - * - * @return array - * @phpcs:disable Generic.Metrics.CyclomaticComplexity.TooHigh - */ - public function instruct(): array - { - //phpcs:enable - $this->initFile(); - $cleanDegeu = function (string $str) { - return html_entity_decode( - trim(str_replace('\\', '', ucwords(stripcslashes(strtolower($str))))), - ENT_QUOTES | ENT_HTML5, - 'UTF-8' - ); - }; - return [ - 'Users' => [ - 'table' => $this->table, - 'model' => Customer::class, - 'comment' => sprintf('Migrating %s customers', $this->brand->name), - 'bind' => [ - 'email' => [ - 'apply' => function ($v, $model) use ($cleanDegeu) { - $v = \mb_convert_encoding($v, "UTF-8"); - $v = explode('#|#', $v); - $oldId = $v[0]; - $first_name = $cleanDegeu($v[1]); - $last_name = $cleanDegeu($v[2]); - $birth_date = $v[3]; - $address = $cleanDegeu($v[4]); - $address2 = $cleanDegeu($v[5]); - $city = $cleanDegeu($v[6]); - $postcode = $v[7]; - $user_inscritNewsletter = $v[8]; - $email = strtolower($v[9]); - $pwd = $v[10]; - $created_at = $v[11]; - $updated_at = $v[12]; - $last_cnx = $v[13]; - - // * Just save Single optin. - if (empty($first_name) && empty($last_name)) { - $sglOptin = SingleOptin::query()->where('email', strtolower($email)) - ->whereHas('brand', function (Builder $q) { - $q->where('id', $this->brand->id); - })->firstOrNew(); - $sglOptin->email = strtolower($email); - $sglOptin->brand_id = $this->brand->id; - $sglOptin->save(); - } else { - // * Validate Data. - $d = [ - 'first_name' => $first_name, - 'last_name' => $last_name, - 'address' => $address, - 'address2' => $address2, - 'city' => $city, - 'postcode' => $postcode, - ]; - - $validator = Validator::make($d, [ - 'first_name' => 'min:2', - 'last_name' => 'min:2' - ]); - - if ($validator->fails()) { - throw new AbortRowImportException(); - } - - $rules = [ - 'address' => 'string|min:2', - 'address2' => 'string|min:2', - 'city' => 'string|min:2', - 'postcode' => 'digits_between:4,5' - ]; - - $validate = function (array $data, array $rule) { - return Validator::make($data, $rule)->fails(); - }; - - foreach ($rules as $key => $rule) { - if ($validate([$key => $d[$key]], [$key => $rule])) { - ${$key} = null; - } - } - - $model = Customer::where('email', $email)->firstOrNew(); - $model->email = $email; - $model->created_at = $created_at; - $model->updated_at = $updated_at; - $model->save(); - - // * Filtre birthdate puisque c'est du sale dans la vielle crm. - try { - $expl = explode('-', $birth_date); - $d = Carbon::parse($birth_date); - if ( - $d->toDateString() === sprintf( - '%s-%s-%s', - $expl[2] ?? '', - $expl[1] ?? '', - $expl[0] ?? '' - ) - ) { - $birth_date = $d->toDateString(); - } - } catch (InvalidFormatException $e) { - $birth_date = ''; - } - - - if ($birth_date === '0000-00-00') { - $birth_date = ''; - } - - $city = !empty($city) ? $city : null; - $postcode = !empty($postcode) ? $postcode : null; - $address = !empty($address) ? $address : null; - $address2 = !empty($address2) ? $address2 : null; - - $cInfo = new CustomerInfo(); - $cInfo->hashcode = Str::uuid(); - $cInfo->firstname = ucfirst(strtolower($first_name)); - $cInfo->lastname = ucfirst(strtolower($last_name)); - $cInfo->birth_date = !strlen($birth_date) ? null : $birth_date; - $cInfo->address = $address; - $cInfo->address2 = $address2; - $cInfo->city = $city; - $cInfo->postcode = $postcode; - $cInfo->opt_in = $user_inscritNewsletter ? true : false; - $cInfo->brand_id = $this->brand->id; - $cInfo->customer_id = $model->id; - $cInfo->created_at = $created_at; - $cInfo->updated_at = $updated_at; - $cInfo->save(); - - $cLogin = new CustomerLogin(); - $cLogin->password = Hash::make(trim($pwd)); - $cLogin->brand_id = $this->brand->id; - $cLogin->customer_id = $model->id; - $cLogin->status = true; - $cLogin->created_at = $created_at; - $cLogin->updated_at = $updated_at; - $cLogin->last_connection = $last_cnx; - $cLogin->save(); - - $this->write( - [ - 'new' => $model->id, - 'old' => $oldId, - 'hashcode' => $cInfo->hashcode, - 'created_at' => $created_at, - 'updated_at' => $updated_at - ] - ); - } //end if - throw new AbortRowImportException(); - }, - 'name' => [ - 'user_id', - 'firstname', - 'lastname', - 'birthdate', - 'address', - 'address2', - 'city', - 'postcode', - 'optin', - 'email', - 'pwd', - 'created_at', - 'updated_at', - 'last_cnx' - ] - ], - ] - ], - ]; - } - - /** - * Create the migration file. - * - * @return void - */ - public function initFile(): void - { - File::put(storage_path('crm_migration.csv'), sprintf('new;old;hashcode;created_at;updated_at') . PHP_EOL); - } - - /** - * Write date in the migration file. - * - * @param array $data - * @return void - */ - public function write(array $data): void - { - foreach ($data as &$d) { - $d = sprintf('"%s"', $d); - } - File::append(storage_path('crm_migration.csv'), implode(';', $data) . PHP_EOL); - } -} diff --git a/app/Models/Question.php b/app/Models/Question.php index 581dc98..c52efad 100644 --- a/app/Models/Question.php +++ b/app/Models/Question.php @@ -15,8 +15,8 @@ use Illuminate\Database\Eloquent\Model; * @property-read \Illuminate\Support\Carbon $created_at Created date. * @property-read \Illuminate\Support\Carbon $updated_at Updated date. * - * @property-read \App\Models\Answer $answers Answer hasMany relation. - * @property-read \App\Models\Brand $brand Brand BelongsTo relation. + * @property-read \Illuminate\Support\Collection $answers Answer hasMany relation. + * @property-read \App\Models\Brand $brand Brand BelongsTo relation. */ class Question extends Model { diff --git a/composer.json b/composer.json index 2c01fad..fa60577 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "ldc/ldccrm", - "version": "4.0.8", + "version": "4.0.9", "type": "project", "description": "LDC CRM", "license": "MIT", @@ -12,7 +12,7 @@ "laravel" ], "platform": { - "php": "^8.2" + "php": "^8.3" }, "repositories": [ { @@ -21,37 +21,38 @@ } ], "require": { - "php": "^8.2", + "php": "^8.3", "ext-curl": "*", "ext-dom": "*", "ext-json": "*", "arondeparon/laravel-request-sanitizer": "^5.0", "axlon/laravel-postal-code-validation": "^3.2", - "diglactic/laravel-breadcrumbs": "^8.1", + "diglactic/laravel-breadcrumbs": "^9.0", "doctrine/dbal": "^3.0", "doctrine/inflector": "^2.0", "guzzlehttp/guzzle": "^7.4", - "laravel/framework": "^10.0", + "laravel/framework": "^11.0", "laravel/tinker": "^2.8", "laravel/ui": "^4.2", "league/csv": "^9.7", "mews/purifier": "^3.4", "propaganistas/laravel-phone": "^5.0", - "rennokki/laravel-eloquent-query-cache": "^3.0", - "sentry/sentry-laravel": "^3.4", - "uwil/k8s-laravel": "^1.2" + "rennokki/laravel-eloquent-query-cache": "^3.5", + "sentry/sentry-laravel": "^4.10", + "uwil/admin-secure-laravel": "^3.0", + "uwil/k8s-laravel": "^1.4" }, "require-dev": { "brianium/paratest": "^7.2", "fakerphp/faker": "^1.9.1", "laravel-lang/common": "^4.0", "mockery/mockery": "^1.4.4", - "nunomaduro/collision": "^7.0", + "nunomaduro/collision": "^8.1", "phpunit/phpunit": "^10.0", "respect/validation": "^2.2", "slevomat/coding-standard": "^8.10", "spatie/laravel-ignition": "^2.3", - "symfony/process": "^6.2" + "symfony/process": "^7.2" }, "config": { "optimize-autoloader": true, diff --git a/composer.lock b/composer.lock index fdf7694..2517076 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": "4e3cf86d01b922ba7dab01a54647db8e", + "content-hash": "c88d1720f6f7d02f5197fd3eede6c5ca", "packages": [ { "name": "arondeparon/laravel-request-sanitizer", @@ -264,72 +264,6 @@ ], "time": "2023-12-11T17:09:12+00:00" }, - { - "name": "clue/stream-filter", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/clue/stream-filter.git", - "reference": "049509fef80032cb3f051595029ab75b49a3c2f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/clue/stream-filter/zipball/049509fef80032cb3f051595029ab75b49a3c2f7", - "reference": "049509fef80032cb3f051595029ab75b49a3c2f7", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "Clue\\StreamFilter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering" - } - ], - "description": "A simple and modern approach to stream filtering in PHP", - "homepage": "https://github.com/clue/stream-filter", - "keywords": [ - "bucket brigade", - "callback", - "filter", - "php_user_filter", - "stream", - "stream_filter_append", - "stream_filter_register" - ], - "support": { - "issues": "https://github.com/clue/stream-filter/issues", - "source": "https://github.com/clue/stream-filter/tree/v1.7.0" - }, - "funding": [ - { - "url": "https://clue.engineering/support", - "type": "custom" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2023-12-20T15:40:13+00:00" - }, { "name": "dflydev/dot-access-data", "version": "v3.0.3", @@ -407,31 +341,31 @@ }, { "name": "diglactic/laravel-breadcrumbs", - "version": "v8.1.1", + "version": "v9.0.0", "source": { "type": "git", "url": "https://github.com/diglactic/laravel-breadcrumbs.git", - "reference": "f72a78eb3e26aea507d7888a65f15e5790864e21" + "reference": "88e8f01e013e811215770e27b40a74014c28f2c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/diglactic/laravel-breadcrumbs/zipball/f72a78eb3e26aea507d7888a65f15e5790864e21", - "reference": "f72a78eb3e26aea507d7888a65f15e5790864e21", + "url": "https://api.github.com/repos/diglactic/laravel-breadcrumbs/zipball/88e8f01e013e811215770e27b40a74014c28f2c4", + "reference": "88e8f01e013e811215770e27b40a74014c28f2c4", "shasum": "" }, "require": { "facade/ignition-contracts": "^1.0", - "laravel/framework": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0", - "php": "^7.2 || ^8.0" + "laravel/framework": "^8.0 || ^9.0 || ^10.0 || ^11.0", + "php": "^7.3 || ^8.0" }, "conflict": { "davejamesmiller/laravel-breadcrumbs": "*" }, "require-dev": { - "orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", - "php-coveralls/php-coveralls": "^2.4", - "phpunit/phpunit": "^8.5 || ^9.5", - "spatie/phpunit-snapshot-assertions": "^2.2 || ^4.2" + "orchestra/testbench": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "php-coveralls/php-coveralls": "^2.7", + "phpunit/phpunit": "^9.5 || ^10.5", + "spatie/phpunit-snapshot-assertions": "^4.2 || ^5.1" }, "type": "library", "extra": { @@ -472,9 +406,9 @@ ], "support": { "issues": "https://github.com/diglactic/laravel-breadcrumbs/issues", - "source": "https://github.com/diglactic/laravel-breadcrumbs/tree/v8.1.1" + "source": "https://github.com/diglactic/laravel-breadcrumbs/tree/v9.0.0" }, - "time": "2023-04-17T23:24:15+00:00" + "time": "2024-03-12T00:42:39+00:00" }, { "name": "doctrine/cache", @@ -1051,6 +985,102 @@ ], "time": "2024-10-09T13:47:03+00:00" }, + { + "name": "dxw/cidr", + "version": "v3.2.0", + "source": { + "type": "git", + "url": "https://github.com/dxw/cidr.git", + "reference": "b07dd398f5a93441f57a687982bc7d0ffb96729a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dxw/cidr/zipball/b07dd398f5a93441f57a687982bc7d0ffb96729a", + "reference": "b07dd398f5a93441f57a687982bc7d0ffb96729a", + "shasum": "" + }, + "require": { + "dxw/result": "^1.0", + "php": "^7.4||^8.1", + "phpseclib/phpseclib": "^2.0" + }, + "require-dev": { + "dxw/php-cs-fixer-config": "^2.0", + "kahlan/kahlan": "^5.2", + "vimeo/psalm": "^5.14" + }, + "type": "library", + "autoload": { + "psr-4": { + "Dxw\\CIDR\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "dxw", + "email": "team@govpress.com", + "homepage": "https://www.dxw.com" + } + ], + "description": "IP address matching with CIDR ranges", + "homepage": "https://github.com/dxw/cidr", + "support": { + "issues": "https://github.com/dxw/cidr/issues", + "source": "https://github.com/dxw/cidr/tree/v3.2.0" + }, + "time": "2023-08-14T10:14:13+00:00" + }, + { + "name": "dxw/result", + "version": "v1.0.6", + "source": { + "type": "git", + "url": "https://github.com/dxw/result.git", + "reference": "d554bb10f0cf74056ccd26526688e194652eef79" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dxw/result/zipball/d554bb10f0cf74056ccd26526688e194652eef79", + "reference": "d554bb10f0cf74056ccd26526688e194652eef79", + "shasum": "" + }, + "require": { + "php": "^7.4||^8.1" + }, + "require-dev": { + "dxw/php-cs-fixer-config": "^2.1", + "kahlan/kahlan": "^5.2", + "vimeo/psalm": "^4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Dxw\\Result\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mallory Adams", + "email": "mallory@dxw.com", + "homepage": "https://www.dxw.com/" + } + ], + "description": "Result values", + "homepage": "https://github.com/dxw/result", + "support": { + "issues": "https://github.com/dxw/result/issues", + "source": "https://github.com/dxw/result/tree/v1.0.6" + }, + "time": "2023-07-19T11:14:28+00:00" + }, { "name": "egulias/email-validator", "version": "4.0.3", @@ -1859,64 +1889,6 @@ ], "time": "2023-12-03T19:50:20+00:00" }, - { - "name": "http-interop/http-factory-guzzle", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/http-interop/http-factory-guzzle.git", - "reference": "8f06e92b95405216b237521cc64c804dd44c4a81" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/http-interop/http-factory-guzzle/zipball/8f06e92b95405216b237521cc64c804dd44c4a81", - "reference": "8f06e92b95405216b237521cc64c804dd44c4a81", - "shasum": "" - }, - "require": { - "guzzlehttp/psr7": "^1.7||^2.0", - "php": ">=7.3", - "psr/http-factory": "^1.0" - }, - "provide": { - "psr/http-factory-implementation": "^1.0" - }, - "require-dev": { - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^9.5" - }, - "suggest": { - "guzzlehttp/psr7": "Includes an HTTP factory starting in version 2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Http\\Factory\\Guzzle\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "An HTTP Factory using Guzzle PSR7", - "keywords": [ - "factory", - "http", - "psr-17", - "psr-7" - ], - "support": { - "issues": "https://github.com/http-interop/http-factory-guzzle/issues", - "source": "https://github.com/http-interop/http-factory-guzzle/tree/1.2.0" - }, - "time": "2021-07-21T13:50:14+00:00" - }, { "name": "jean85/pretty-package-versions", "version": "2.1.0", @@ -1978,23 +1950,23 @@ }, { "name": "laravel/framework", - "version": "v10.48.25", + "version": "v11.37.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "f132b23b13909cc22c615c01b0c5640541c3da0c" + "reference": "6cb103d2024b087eae207654b3f4b26646119ba5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/f132b23b13909cc22c615c01b0c5640541c3da0c", - "reference": "f132b23b13909cc22c615c01b0c5640541c3da0c", + "url": "https://api.github.com/repos/laravel/framework/zipball/6cb103d2024b087eae207654b3f4b26646119ba5", + "reference": "6cb103d2024b087eae207654b3f4b26646119ba5", "shasum": "" }, "require": { "brick/math": "^0.9.3|^0.10.2|^0.11|^0.12", "composer-runtime-api": "^2.2", "doctrine/inflector": "^2.0.5", - "dragonmantank/cron-expression": "^3.3.2", + "dragonmantank/cron-expression": "^3.4", "egulias/email-validator": "^3.2.1|^4.0", "ext-ctype": "*", "ext-filter": "*", @@ -2003,44 +1975,45 @@ "ext-openssl": "*", "ext-session": "*", "ext-tokenizer": "*", - "fruitcake/php-cors": "^1.2", + "fruitcake/php-cors": "^1.3", + "guzzlehttp/guzzle": "^7.8.2", "guzzlehttp/uri-template": "^1.0", - "laravel/prompts": "^0.1.9", - "laravel/serializable-closure": "^1.3", - "league/commonmark": "^2.2.1", - "league/flysystem": "^3.8.0", + "laravel/prompts": "^0.1.18|^0.2.0|^0.3.0", + "laravel/serializable-closure": "^1.3|^2.0", + "league/commonmark": "^2.6", + "league/flysystem": "^3.25.1", + "league/flysystem-local": "^3.25.1", + "league/uri": "^7.5.1", "monolog/monolog": "^3.0", - "nesbot/carbon": "^2.67", - "nunomaduro/termwind": "^1.13", - "php": "^8.1", + "nesbot/carbon": "^2.72.2|^3.4", + "nunomaduro/termwind": "^2.0", + "php": "^8.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.7", - "symfony/console": "^6.2", - "symfony/error-handler": "^6.2", - "symfony/finder": "^6.2", - "symfony/http-foundation": "^6.4", - "symfony/http-kernel": "^6.2", - "symfony/mailer": "^6.2", - "symfony/mime": "^6.2", - "symfony/process": "^6.2", - "symfony/routing": "^6.2", - "symfony/uid": "^6.2", - "symfony/var-dumper": "^6.2", + "symfony/console": "^7.0.3", + "symfony/error-handler": "^7.0.3", + "symfony/finder": "^7.0.3", + "symfony/http-foundation": "^7.2.0", + "symfony/http-kernel": "^7.0.3", + "symfony/mailer": "^7.0.3", + "symfony/mime": "^7.0.3", + "symfony/polyfill-php83": "^1.31", + "symfony/process": "^7.0.3", + "symfony/routing": "^7.0.3", + "symfony/uid": "^7.0.3", + "symfony/var-dumper": "^7.0.3", "tijsverkoyen/css-to-inline-styles": "^2.2.5", - "vlucas/phpdotenv": "^5.4.1", - "voku/portable-ascii": "^2.0" + "vlucas/phpdotenv": "^5.6.1", + "voku/portable-ascii": "^2.0.2" }, "conflict": { - "carbonphp/carbon-doctrine-types": ">=3.0", - "doctrine/dbal": ">=4.0", - "mockery/mockery": "1.6.8", - "phpunit/phpunit": ">=11.0.0", "tightenco/collect": "<5.5.33" }, "provide": { "psr/container-implementation": "1.1|2.0", + "psr/log-implementation": "1.0|2.0|3.0", "psr/simple-cache-implementation": "1.0|2.0|3.0" }, "replace": { @@ -2049,6 +2022,7 @@ "illuminate/bus": "self.version", "illuminate/cache": "self.version", "illuminate/collections": "self.version", + "illuminate/concurrency": "self.version", "illuminate/conditionable": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", @@ -2076,36 +2050,38 @@ "illuminate/testing": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", - "illuminate/view": "self.version" + "illuminate/view": "self.version", + "spatie/once": "*" }, "require-dev": { "ably/ably-php": "^1.0", - "aws/aws-sdk-php": "^3.235.5", - "doctrine/dbal": "^3.5.1", + "aws/aws-sdk-php": "^3.322.9", "ext-gmp": "*", - "fakerphp/faker": "^1.21", - "guzzlehttp/guzzle": "^7.5", - "league/flysystem-aws-s3-v3": "^3.0", - "league/flysystem-ftp": "^3.0", - "league/flysystem-path-prefixing": "^3.3", - "league/flysystem-read-only": "^3.3", - "league/flysystem-sftp-v3": "^3.0", - "mockery/mockery": "^1.5.1", - "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^8.23.4", - "pda/pheanstalk": "^4.0", - "phpstan/phpstan": "~1.11.11", - "phpunit/phpunit": "^10.0.7", - "predis/predis": "^2.0.2", - "symfony/cache": "^6.2", - "symfony/http-client": "^6.2.4", - "symfony/psr-http-message-bridge": "^2.0" + "fakerphp/faker": "^1.24", + "guzzlehttp/promises": "^2.0.3", + "guzzlehttp/psr7": "^2.4", + "league/flysystem-aws-s3-v3": "^3.25.1", + "league/flysystem-ftp": "^3.25.1", + "league/flysystem-path-prefixing": "^3.25.1", + "league/flysystem-read-only": "^3.25.1", + "league/flysystem-sftp-v3": "^3.25.1", + "mockery/mockery": "^1.6.10", + "orchestra/testbench-core": "^9.6", + "pda/pheanstalk": "^5.0.6", + "php-http/discovery": "^1.15", + "phpstan/phpstan": "^1.11.5", + "phpunit/phpunit": "^10.5.35|^11.3.6", + "predis/predis": "^2.3", + "resend/resend-php": "^0.10.0", + "symfony/cache": "^7.0.3", + "symfony/http-client": "^7.0.3", + "symfony/psr-http-message-bridge": "^7.0.3", + "symfony/translation": "^7.0.3" }, "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.235.5).", - "brianium/paratest": "Required to run tests in parallel (^6.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^3.5.1).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.322.9).", + "brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).", "ext-apcu": "Required to use the APC cache driver.", "ext-fileinfo": "Required to use the Filesystem class.", "ext-ftp": "Required to use the Flysystem FTP driver.", @@ -2114,42 +2090,45 @@ "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.", "ext-pdo": "Required to use all database features.", "ext-posix": "Required to use all features of the queue worker.", - "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0|^6.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 and the ping methods on schedules (^7.5).", "laravel/tinker": "Required to use the tinker console command (^2.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-path-prefixing": "Required to use the scoped driver (^3.3).", - "league/flysystem-read-only": "Required to use read-only disks (^3.3)", - "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", - "mockery/mockery": "Required to use mocking (^1.5.1).", - "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 (^9.5.8|^10.0.7).", - "predis/predis": "Required to use the predis connector (^2.0.2).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.25.1).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.25.1).", + "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.25.1).", + "league/flysystem-read-only": "Required to use read-only disks (^3.25.1)", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.25.1).", + "mockery/mockery": "Required to use mocking (^1.6).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", + "php-http/discovery": "Required to use PSR-7 bridging features (^1.15).", + "phpunit/phpunit": "Required to use assertions and run tests (^10.5|^11.0).", + "predis/predis": "Required to use the predis connector (^2.3).", "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 (^6.0|^7.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^6.2).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^6.2).", - "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.2).", - "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.2).", - "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.2).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." + "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^7.0).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^7.0).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.0).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.0).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "11.x-dev" } }, "autoload": { "files": [ + "src/Illuminate/Collections/functions.php", "src/Illuminate/Collections/helpers.php", "src/Illuminate/Events/functions.php", "src/Illuminate/Filesystem/functions.php", "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Log/functions.php", + "src/Illuminate/Support/functions.php", "src/Illuminate/Support/helpers.php" ], "psr-4": { @@ -2181,25 +2160,25 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-11-26T15:32:57+00:00" + "time": "2025-01-02T20:10:21+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.25", + "version": "v0.3.2", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "7b4029a84c37cb2725fc7f011586e2997040bc95" + "reference": "0e0535747c6b8d6d10adca8b68293cf4517abb0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/7b4029a84c37cb2725fc7f011586e2997040bc95", - "reference": "7b4029a84c37cb2725fc7f011586e2997040bc95", + "url": "https://api.github.com/repos/laravel/prompts/zipball/0e0535747c6b8d6d10adca8b68293cf4517abb0f", + "reference": "0e0535747c6b8d6d10adca8b68293cf4517abb0f", "shasum": "" }, "require": { + "composer-runtime-api": "^2.2", "ext-mbstring": "*", - "illuminate/collections": "^10.0|^11.0", "php": "^8.1", "symfony/console": "^6.2|^7.0" }, @@ -2208,8 +2187,9 @@ "laravel/framework": ">=10.17.0 <10.25.0" }, "require-dev": { + "illuminate/collections": "^10.0|^11.0", "mockery/mockery": "^1.5", - "pestphp/pest": "^2.3", + "pestphp/pest": "^2.3|^3.4", "phpstan/phpstan": "^1.11", "phpstan/phpstan-mockery": "^1.1" }, @@ -2219,7 +2199,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "0.1.x-dev" + "dev-main": "0.3.x-dev" } }, "autoload": { @@ -2237,38 +2217,38 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.25" + "source": "https://github.com/laravel/prompts/tree/v0.3.2" }, - "time": "2024-08-12T22:06:33+00:00" + "time": "2024-11-12T14:59:47+00:00" }, { "name": "laravel/serializable-closure", - "version": "v1.3.7", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "4f48ade902b94323ca3be7646db16209ec76be3d" + "reference": "613b2d4998f85564d40497e05e89cb6d9bd1cbe8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/4f48ade902b94323ca3be7646db16209ec76be3d", - "reference": "4f48ade902b94323ca3be7646db16209ec76be3d", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/613b2d4998f85564d40497e05e89cb6d9bd1cbe8", + "reference": "613b2d4998f85564d40497e05e89cb6d9bd1cbe8", "shasum": "" }, "require": { - "php": "^7.3|^8.0" + "php": "^8.1" }, "require-dev": { - "illuminate/support": "^8.0|^9.0|^10.0|^11.0", - "nesbot/carbon": "^2.61|^3.0", - "pestphp/pest": "^1.21.3", - "phpstan/phpstan": "^1.8.2", - "symfony/var-dumper": "^5.4.11|^6.2.0|^7.0.0" + "illuminate/support": "^10.0|^11.0", + "nesbot/carbon": "^2.67|^3.0", + "pestphp/pest": "^2.36", + "phpstan/phpstan": "^2.0", + "symfony/var-dumper": "^6.2.0|^7.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -2300,7 +2280,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2024-11-14T18:34:49+00:00" + "time": "2024-12-16T15:26:28+00:00" }, { "name": "laravel/tinker", @@ -2622,16 +2602,16 @@ }, { "name": "league/csv", - "version": "9.21.0", + "version": "9.20.1", "source": { "type": "git", "url": "https://github.com/thephpleague/csv.git", - "reference": "72196d11ebba22d868954cb39c0c7346207430cc" + "reference": "491d1e79e973a7370c7571dc0fe4a7241f4936ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/csv/zipball/72196d11ebba22d868954cb39c0c7346207430cc", - "reference": "72196d11ebba22d868954cb39c0c7346207430cc", + "url": "https://api.github.com/repos/thephpleague/csv/zipball/491d1e79e973a7370c7571dc0fe4a7241f4936ee", + "reference": "491d1e79e973a7370c7571dc0fe4a7241f4936ee", "shasum": "" }, "require": { @@ -2705,7 +2685,7 @@ "type": "github" } ], - "time": "2025-01-08T19:27:58+00:00" + "time": "2024-12-18T10:11:15+00:00" }, { "name": "league/flysystem", @@ -2895,6 +2875,180 @@ ], "time": "2024-09-21T08:32:55+00:00" }, + { + "name": "league/uri", + "version": "7.5.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "81fb5145d2644324614cc532b28efd0215bda430" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/81fb5145d2644324614cc532b28efd0215bda430", + "reference": "81fb5145d2644324614cc532b28efd0215bda430", + "shasum": "" + }, + "require": { + "league/uri-interfaces": "^7.5", + "php": "^8.1" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-components": "Needed to easily manipulate URI objects components", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.5.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-12-08T08:40:02+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "7.5.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interfaces and classes for URI representation and interaction", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.5.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-12-08T08:18:47+00:00" + }, { "name": "mews/purifier", "version": "3.4.2", @@ -3078,42 +3232,41 @@ }, { "name": "nesbot/carbon", - "version": "2.72.6", + "version": "3.8.4", "source": { "type": "git", - "url": "https://github.com/CarbonPHP/carbon.git", - "reference": "1e9d50601e7035a4c61441a208cb5bed73e108c5" + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "129700ed449b1f02d70272d2ac802357c8c30c58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/1e9d50601e7035a4c61441a208cb5bed73e108c5", - "reference": "1e9d50601e7035a4c61441a208cb5bed73e108c5", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/129700ed449b1f02d70272d2ac802357c8c30c58", + "reference": "129700ed449b1f02d70272d2ac802357c8c30c58", "shasum": "" }, "require": { - "carbonphp/carbon-doctrine-types": "*", + "carbonphp/carbon-doctrine-types": "<100.0", "ext-json": "*", - "php": "^7.1.8 || ^8.0", + "php": "^8.1", "psr/clock": "^1.0", + "symfony/clock": "^6.3 || ^7.0", "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" + "symfony/translation": "^4.4.18 || ^5.2.1|| ^6.0 || ^7.0" }, "provide": { "psr/clock-implementation": "1.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", - "doctrine/orm": "^2.7 || ^3.0", - "friendsofphp/php-cs-fixer": "^3.0", - "kylekatarnls/multi-tester": "^2.0", - "ondrejmirtes/better-reflection": "<6", - "phpmd/phpmd": "^2.9", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.99 || ^1.7.14", - "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", - "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", - "squizlabs/php_codesniffer": "^3.4" + "doctrine/dbal": "^3.6.3 || ^4.0", + "doctrine/orm": "^2.15.2 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.57.2", + "kylekatarnls/multi-tester": "^2.5.3", + "ondrejmirtes/better-reflection": "^6.25.0.4", + "phpmd/phpmd": "^2.15.0", + "phpstan/extension-installer": "^1.3.1", + "phpstan/phpstan": "^1.11.2", + "phpunit/phpunit": "^10.5.20", + "squizlabs/php_codesniffer": "^3.9.0" }, "bin": [ "bin/carbon" @@ -3181,7 +3334,7 @@ "type": "tidelift" } ], - "time": "2024-12-27T09:28:11+00:00" + "time": "2024-12-27T09:25:35+00:00" }, { "name": "nette/schema", @@ -3391,32 +3544,31 @@ }, { "name": "nunomaduro/termwind", - "version": "v1.17.0", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "5369ef84d8142c1d87e4ec278711d4ece3cbf301" + "reference": "52915afe6a1044e8b9cee1bcff836fb63acf9cda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/5369ef84d8142c1d87e4ec278711d4ece3cbf301", - "reference": "5369ef84d8142c1d87e4ec278711d4ece3cbf301", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/52915afe6a1044e8b9cee1bcff836fb63acf9cda", + "reference": "52915afe6a1044e8b9cee1bcff836fb63acf9cda", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^8.1", - "symfony/console": "^6.4.15" + "php": "^8.2", + "symfony/console": "^7.1.8" }, "require-dev": { - "illuminate/console": "^10.48.24", - "illuminate/support": "^10.48.24", + "illuminate/console": "^11.33.2", "laravel/pint": "^1.18.2", + "mockery/mockery": "^1.6.12", "pestphp/pest": "^2.36.0", - "pestphp/pest-plugin-mock": "2.0.0", "phpstan/phpstan": "^1.12.11", "phpstan/phpstan-strict-rules": "^1.6.1", - "symfony/var-dumper": "^6.4.15", + "symfony/var-dumper": "^7.1.8", "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -3425,6 +3577,9 @@ "providers": [ "Termwind\\Laravel\\TermwindServiceProvider" ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -3456,7 +3611,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v1.17.0" + "source": "https://github.com/nunomaduro/termwind/tree/v2.3.0" }, "funding": [ { @@ -3472,7 +3627,7 @@ "type": "github" } ], - "time": "2024-11-21T10:36:35+00:00" + "time": "2024-11-21T10:39:51+00:00" }, { "name": "nyholm/psr7", @@ -3552,387 +3707,6 @@ ], "time": "2024-09-09T07:06:30+00:00" }, - { - "name": "php-http/client-common", - "version": "2.7.2", - "source": { - "type": "git", - "url": "https://github.com/php-http/client-common.git", - "reference": "0cfe9858ab9d3b213041b947c881d5b19ceeca46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/client-common/zipball/0cfe9858ab9d3b213041b947c881d5b19ceeca46", - "reference": "0cfe9858ab9d3b213041b947c881d5b19ceeca46", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0", - "php-http/httplug": "^2.0", - "php-http/message": "^1.6", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0 || ^2.0", - "symfony/options-resolver": "~4.0.15 || ~4.1.9 || ^4.2.1 || ^5.0 || ^6.0 || ^7.0", - "symfony/polyfill-php80": "^1.17" - }, - "require-dev": { - "doctrine/instantiator": "^1.1", - "guzzlehttp/psr7": "^1.4", - "nyholm/psr7": "^1.2", - "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", - "phpspec/prophecy": "^1.10.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.33 || ^9.6.7" - }, - "suggest": { - "ext-json": "To detect JSON responses with the ContentTypePlugin", - "ext-libxml": "To detect XML responses with the ContentTypePlugin", - "php-http/cache-plugin": "PSR-6 Cache plugin", - "php-http/logger-plugin": "PSR-3 Logger plugin", - "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" - }, - "type": "library", - "autoload": { - "psr-4": { - "Http\\Client\\Common\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Common HTTP Client implementations and tools for HTTPlug", - "homepage": "http://httplug.io", - "keywords": [ - "client", - "common", - "http", - "httplug" - ], - "support": { - "issues": "https://github.com/php-http/client-common/issues", - "source": "https://github.com/php-http/client-common/tree/2.7.2" - }, - "time": "2024-09-24T06:21:48+00:00" - }, - { - "name": "php-http/discovery", - "version": "1.20.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/discovery.git", - "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/82fe4c73ef3363caed49ff8dd1539ba06044910d", - "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0|^2.0", - "php": "^7.1 || ^8.0" - }, - "conflict": { - "nyholm/psr7": "<1.0", - "zendframework/zend-diactoros": "*" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "*", - "psr/http-factory-implementation": "*", - "psr/http-message-implementation": "*" - }, - "require-dev": { - "composer/composer": "^1.0.2|^2.0", - "graham-campbell/phpspec-skip-example-extension": "^5.0", - "php-http/httplug": "^1.0 || ^2.0", - "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3", - "sebastian/comparator": "^3.0.5 || ^4.0.8", - "symfony/phpunit-bridge": "^6.4.4 || ^7.0.1" - }, - "type": "composer-plugin", - "extra": { - "class": "Http\\Discovery\\Composer\\Plugin", - "plugin-optional": true - }, - "autoload": { - "psr-4": { - "Http\\Discovery\\": "src/" - }, - "exclude-from-classmap": [ - "src/Composer/Plugin.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations", - "homepage": "http://php-http.org", - "keywords": [ - "adapter", - "client", - "discovery", - "factory", - "http", - "message", - "psr17", - "psr7" - ], - "support": { - "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.20.0" - }, - "time": "2024-10-02T11:20:13+00:00" - }, - { - "name": "php-http/httplug", - "version": "2.4.1", - "source": { - "type": "git", - "url": "https://github.com/php-http/httplug.git", - "reference": "5cad731844891a4c282f3f3e1b582c46839d22f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/5cad731844891a4c282f3f3e1b582c46839d22f4", - "reference": "5cad731844891a4c282f3f3e1b582c46839d22f4", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0", - "php-http/promise": "^1.1", - "psr/http-client": "^1.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "require-dev": { - "friends-of-phpspec/phpspec-code-coverage": "^4.1 || ^5.0 || ^6.0", - "phpspec/phpspec": "^5.1 || ^6.0 || ^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eric GELOEN", - "email": "geloen.eric@gmail.com" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "description": "HTTPlug, the HTTP client abstraction for PHP", - "homepage": "http://httplug.io", - "keywords": [ - "client", - "http" - ], - "support": { - "issues": "https://github.com/php-http/httplug/issues", - "source": "https://github.com/php-http/httplug/tree/2.4.1" - }, - "time": "2024-09-23T11:39:58+00:00" - }, - { - "name": "php-http/message", - "version": "1.16.2", - "source": { - "type": "git", - "url": "https://github.com/php-http/message.git", - "reference": "06dd5e8562f84e641bf929bfe699ee0f5ce8080a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/06dd5e8562f84e641bf929bfe699ee0f5ce8080a", - "reference": "06dd5e8562f84e641bf929bfe699ee0f5ce8080a", - "shasum": "" - }, - "require": { - "clue/stream-filter": "^1.5", - "php": "^7.2 || ^8.0", - "psr/http-message": "^1.1 || ^2.0" - }, - "provide": { - "php-http/message-factory-implementation": "1.0" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.6", - "ext-zlib": "*", - "guzzlehttp/psr7": "^1.0 || ^2.0", - "laminas/laminas-diactoros": "^2.0 || ^3.0", - "php-http/message-factory": "^1.0.2", - "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", - "slim/slim": "^3.0" - }, - "suggest": { - "ext-zlib": "Used with compressor/decompressor streams", - "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", - "laminas/laminas-diactoros": "Used with Diactoros Factories", - "slim/slim": "Used with Slim Framework PSR-7 implementation" - }, - "type": "library", - "autoload": { - "files": [ - "src/filters.php" - ], - "psr-4": { - "Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "HTTP Message related tools", - "homepage": "http://php-http.org", - "keywords": [ - "http", - "message", - "psr-7" - ], - "support": { - "issues": "https://github.com/php-http/message/issues", - "source": "https://github.com/php-http/message/tree/1.16.2" - }, - "time": "2024-10-02T11:34:13+00:00" - }, - { - "name": "php-http/message-factory", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/message-factory.git", - "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/message-factory/zipball/4d8778e1c7d405cbb471574821c1ff5b68cc8f57", - "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Factory interfaces for PSR-7 HTTP Message", - "homepage": "http://php-http.org", - "keywords": [ - "factory", - "http", - "message", - "stream", - "uri" - ], - "support": { - "issues": "https://github.com/php-http/message-factory/issues", - "source": "https://github.com/php-http/message-factory/tree/1.1.0" - }, - "abandoned": "psr/http-factory", - "time": "2023-04-14T14:16:17+00:00" - }, - { - "name": "php-http/promise", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/php-http/promise.git", - "reference": "fc85b1fba37c169a69a07ef0d5a8075770cc1f83" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/fc85b1fba37c169a69a07ef0d5a8075770cc1f83", - "reference": "fc85b1fba37c169a69a07ef0d5a8075770cc1f83", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "friends-of-phpspec/phpspec-code-coverage": "^4.3.2 || ^6.3", - "phpspec/phpspec": "^5.1.2 || ^6.2 || ^7.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Http\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Joel Wurtz", - "email": "joel.wurtz@gmail.com" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Promise used for asynchronous HTTP requests", - "homepage": "http://httplug.io", - "keywords": [ - "promise" - ], - "support": { - "issues": "https://github.com/php-http/promise/issues", - "source": "https://github.com/php-http/promise/tree/1.3.1" - }, - "time": "2024-03-15T13:55:21+00:00" - }, { "name": "phpoption/phpoption", "version": "1.9.3", @@ -4008,6 +3782,116 @@ ], "time": "2024-07-20T21:41:07+00:00" }, + { + "name": "phpseclib/phpseclib", + "version": "2.0.48", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "eaa7be704b8b93a6913b69eb7f645a59d7731b61" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/eaa7be704b8b93a6913b69eb7f645a59d7731b61", + "reference": "eaa7be704b8b93a6913b69eb7f645a59d7731b61", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phing/phing": "~2.7", + "phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4", + "squizlabs/php_codesniffer": "~2.0" + }, + "suggest": { + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations.", + "ext-xml": "Install the XML extension to load XML formatted public keys." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/2.0.48" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2024-12-14T21:03:54+00:00" + }, { "name": "propaganistas/laravel-phone", "version": "5.3.3", @@ -4910,112 +4794,42 @@ ], "time": "2024-11-30T17:53:54+00:00" }, - { - "name": "sentry/sdk", - "version": "3.6.0", - "source": { - "type": "git", - "url": "https://github.com/getsentry/sentry-php-sdk.git", - "reference": "24c235ff2027401cbea099bf88689e1a1f197c7a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php-sdk/zipball/24c235ff2027401cbea099bf88689e1a1f197c7a", - "reference": "24c235ff2027401cbea099bf88689e1a1f197c7a", - "shasum": "" - }, - "require": { - "http-interop/http-factory-guzzle": "^1.0", - "sentry/sentry": "^3.22", - "symfony/http-client": "^4.3|^5.0|^6.0|^7.0" - }, - "type": "metapackage", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Sentry", - "email": "accounts@sentry.io" - } - ], - "description": "This is a metapackage shipping sentry/sentry with a recommended HTTP client.", - "homepage": "http://sentry.io", - "keywords": [ - "crash-reporting", - "crash-reports", - "error-handler", - "error-monitoring", - "log", - "logging", - "sentry" - ], - "support": { - "issues": "https://github.com/getsentry/sentry-php-sdk/issues", - "source": "https://github.com/getsentry/sentry-php-sdk/tree/3.6.0" - }, - "funding": [ - { - "url": "https://sentry.io/", - "type": "custom" - }, - { - "url": "https://sentry.io/pricing/", - "type": "custom" - } - ], - "time": "2023-12-04T10:49:33+00:00" - }, { "name": "sentry/sentry", - "version": "3.22.1", + "version": "4.10.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "8859631ba5ab15bc1af420b0eeed19ecc6c9d81d" + "reference": "2af937d47d8aadb8dab0b1d7b9557e495dd12856" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/8859631ba5ab15bc1af420b0eeed19ecc6c9d81d", - "reference": "8859631ba5ab15bc1af420b0eeed19ecc6c9d81d", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/2af937d47d8aadb8dab0b1d7b9557e495dd12856", + "reference": "2af937d47d8aadb8dab0b1d7b9557e495dd12856", "shasum": "" }, "require": { + "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "guzzlehttp/promises": "^1.5.3|^2.0", + "guzzlehttp/psr7": "^1.8.4|^2.1.1", "jean85/pretty-package-versions": "^1.5|^2.0.4", "php": "^7.2|^8.0", - "php-http/async-client-implementation": "^1.0", - "php-http/client-common": "^1.5|^2.0", - "php-http/discovery": "^1.15", - "php-http/httplug": "^1.1|^2.0", - "php-http/message": "^1.5", - "php-http/message-factory": "^1.1", - "psr/http-factory": "^1.0", - "psr/http-factory-implementation": "^1.0", "psr/log": "^1.0|^2.0|^3.0", - "symfony/options-resolver": "^3.4.43|^4.4.30|^5.0.11|^6.0|^7.0", - "symfony/polyfill-php80": "^1.17" + "symfony/options-resolver": "^4.4.30|^5.0.11|^6.0|^7.0" }, "conflict": { - "php-http/client-common": "1.8.0", "raven/raven": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19|3.4.*", + "friendsofphp/php-cs-fixer": "^3.4", + "guzzlehttp/promises": "^2.0.3", "guzzlehttp/psr7": "^1.8.4|^2.1.1", - "http-interop/http-factory-guzzle": "^1.0", "monolog/monolog": "^1.6|^2.0|^3.0", - "nikic/php-parser": "^4.10.3", - "php-http/mock-client": "^1.3", "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.3", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5.14|^9.4", - "symfony/phpunit-bridge": "^5.2|^6.0", + "phpunit/phpunit": "^8.5|^9.6", + "symfony/phpunit-bridge": "^5.2|^6.0|^7.0", "vimeo/psalm": "^4.17" }, "suggest": { @@ -5040,7 +4854,7 @@ "email": "accounts@sentry.io" } ], - "description": "A PHP SDK for Sentry (http://sentry.io)", + "description": "PHP SDK for Sentry (http://sentry.io)", "homepage": "http://sentry.io", "keywords": [ "crash-reporting", @@ -5049,11 +4863,13 @@ "error-monitoring", "log", "logging", - "sentry" + "profiling", + "sentry", + "tracing" ], "support": { "issues": "https://github.com/getsentry/sentry-php/issues", - "source": "https://github.com/getsentry/sentry-php/tree/3.22.1" + "source": "https://github.com/getsentry/sentry-php/tree/4.10.0" }, "funding": [ { @@ -5065,38 +4881,39 @@ "type": "custom" } ], - "time": "2023-11-13T11:47:28+00:00" + "time": "2024-11-06T07:44:19+00:00" }, { "name": "sentry/sentry-laravel", - "version": "3.8.2", + "version": "4.10.2", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-laravel.git", - "reference": "1293e5732f8405e12f000cdf5dee78c927a18de0" + "reference": "0e2e5bc4311da51349487afcf67b8fca937f6d94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/1293e5732f8405e12f000cdf5dee78c927a18de0", - "reference": "1293e5732f8405e12f000cdf5dee78c927a18de0", + "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/0e2e5bc4311da51349487afcf67b8fca937f6d94", + "reference": "0e2e5bc4311da51349487afcf67b8fca937f6d94", "shasum": "" }, "require": { - "illuminate/support": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0", + "illuminate/support": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0 | ^11.0", "nyholm/psr7": "^1.0", "php": "^7.2 | ^8.0", - "sentry/sdk": "^3.4", - "sentry/sentry": "^3.20.1", - "symfony/psr-http-message-bridge": "^1.0 | ^2.0" + "sentry/sentry": "^4.10", + "symfony/psr-http-message-bridge": "^1.0 | ^2.0 | ^6.0 | ^7.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.11", - "laravel/folio": "^1.0", - "laravel/framework": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0", + "guzzlehttp/guzzle": "^7.2", + "laravel/folio": "^1.1", + "laravel/framework": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0 | ^11.0", + "livewire/livewire": "^2.0 | ^3.0", "mockery/mockery": "^1.3", - "orchestra/testbench": "^4.7 | ^5.1 | ^6.0 | ^7.0 | ^8.0", + "orchestra/testbench": "^4.7 | ^5.1 | ^6.0 | ^7.0 | ^8.0 | ^9.0", "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^8.4 | ^9.3" + "phpunit/phpunit": "^8.4 | ^9.3 | ^10.4" }, "type": "library", "extra": { @@ -5108,12 +4925,6 @@ "Sentry\\Laravel\\ServiceProvider", "Sentry\\Laravel\\Tracing\\ServiceProvider" ] - }, - "branch-alias": { - "dev-0.x": "0.x-dev", - "dev-1.x": "1.x-dev", - "dev-2.x": "2.x-dev", - "dev-master": "3.x-dev" } }, "autoload": { @@ -5141,11 +4952,13 @@ "laravel", "log", "logging", - "sentry" + "profiling", + "sentry", + "tracing" ], "support": { "issues": "https://github.com/getsentry/sentry-laravel/issues", - "source": "https://github.com/getsentry/sentry-laravel/tree/3.8.2" + "source": "https://github.com/getsentry/sentry-laravel/tree/4.10.2" }, "funding": [ { @@ -5157,51 +4970,124 @@ "type": "custom" } ], - "time": "2023-10-12T14:38:46+00:00" + "time": "2024-12-17T11:38:58+00:00" }, { - "name": "symfony/console", - "version": "v6.4.17", + "name": "symfony/clock", + "version": "v7.2.0", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "799445db3f15768ecc382ac5699e6da0520a0a04" + "url": "https://github.com/symfony/clock.git", + "reference": "b81435fbd6648ea425d1ee96a2d8e68f4ceacd24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/799445db3f15768ecc382ac5699e6da0520a0a04", - "reference": "799445db3f15768ecc382ac5699e6da0520a0a04", + "url": "https://api.github.com/repos/symfony/clock/zipball/b81435fbd6648ea425d1ee96a2d8e68f4ceacd24", + "reference": "b81435fbd6648ea425d1ee96a2d8e68f4ceacd24", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", + "psr/clock": "^1.0", + "symfony/polyfill-php83": "^1.28" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/now.php" + ], + "psr-4": { + "Symfony\\Component\\Clock\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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": "Decouples applications from the system clock", + "homepage": "https://symfony.com", + "keywords": [ + "clock", + "psr20", + "time" + ], + "support": { + "source": "https://github.com/symfony/clock/tree/v7.2.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": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/console", + "version": "v7.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/fefcc18c0f5d0efe3ab3152f15857298868dc2c3", + "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3", + "shasum": "" + }, + "require": { + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0|^7.0" + "symfony/string": "^6.4|^7.0" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -5235,7 +5121,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.17" + "source": "https://github.com/symfony/console/tree/v7.2.1" }, "funding": [ { @@ -5251,7 +5137,7 @@ "type": "tidelift" } ], - "time": "2024-12-07T12:07:30+00:00" + "time": "2024-12-11T03:49:26+00:00" }, { "name": "symfony/css-selector", @@ -5387,22 +5273,22 @@ }, { "name": "symfony/error-handler", - "version": "v6.4.17", + "version": "v7.2.1", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "37ad2380e8c1a8cf62a1200a5c10080b679b446c" + "reference": "6150b89186573046167796fa5f3f76601d5145f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/37ad2380e8c1a8cf62a1200a5c10080b679b446c", - "reference": "37ad2380e8c1a8cf62a1200a5c10080b679b446c", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/6150b89186573046167796fa5f3f76601d5145f8", + "reference": "6150b89186573046167796fa5f3f76601d5145f8", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/var-dumper": "^6.4|^7.0" }, "conflict": { "symfony/deprecation-contracts": "<2.5", @@ -5411,7 +5297,7 @@ "require-dev": { "symfony/deprecation-contracts": "^2.5|^3", "symfony/http-kernel": "^6.4|^7.0", - "symfony/serializer": "^5.4|^6.0|^7.0" + "symfony/serializer": "^6.4|^7.0" }, "bin": [ "Resources/bin/patch-type-declarations" @@ -5442,7 +5328,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/v6.4.17" + "source": "https://github.com/symfony/error-handler/tree/v7.2.1" }, "funding": [ { @@ -5458,7 +5344,7 @@ "type": "tidelift" } ], - "time": "2024-12-06T13:30:51+00:00" + "time": "2024-12-07T08:50:44+00:00" }, { "name": "symfony/event-dispatcher", @@ -5618,23 +5504,23 @@ }, { "name": "symfony/finder", - "version": "v6.4.17", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7" + "reference": "87a71856f2f56e4100373e92529eed3171695cfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", - "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", + "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", + "reference": "87a71856f2f56e4100373e92529eed3171695cfb", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0|^7.0" + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -5662,7 +5548,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.17" + "source": "https://github.com/symfony/finder/tree/v7.2.2" }, "funding": [ { @@ -5678,213 +5564,41 @@ "type": "tidelift" } ], - "time": "2024-12-29T13:51:37+00:00" + "time": "2024-12-30T19:00:17+00:00" }, { - "name": "symfony/http-client", + "name": "symfony/http-foundation", "version": "v7.2.2", "source": { "type": "git", - "url": "https://github.com/symfony/http-client.git", - "reference": "339ba21476eb184290361542f732ad12c97591ec" + "url": "https://github.com/symfony/http-foundation.git", + "reference": "62d1a43796ca3fea3f83a8470dfe63a4af3bc588" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/339ba21476eb184290361542f732ad12c97591ec", - "reference": "339ba21476eb184290361542f732ad12c97591ec", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/62d1a43796ca3fea3f83a8470dfe63a4af3bc588", + "reference": "62d1a43796ca3fea3f83a8470dfe63a4af3bc588", "shasum": "" }, "require": { "php": ">=8.2", - "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-client-contracts": "~3.4.4|^3.5.2", - "symfony/service-contracts": "^2.5|^3" - }, - "conflict": { - "amphp/amp": "<2.5", - "php-http/discovery": "<1.15", - "symfony/http-foundation": "<6.4" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "1.0", - "symfony/http-client-implementation": "3.0" - }, - "require-dev": { - "amphp/http-client": "^4.2.1|^5.0", - "amphp/http-tunnel": "^1.0|^2.0", - "amphp/socket": "^1.1", - "guzzlehttp/promises": "^1.4|^2.0", - "nyholm/psr7": "^1.0", - "php-http/httplug": "^1.0|^2.0", - "psr/http-client": "^1.0", - "symfony/amphp-http-client-meta": "^1.0|^2.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/rate-limiter": "^6.4|^7.0", - "symfony/stopwatch": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "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": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", - "homepage": "https://symfony.com", - "keywords": [ - "http" - ], - "support": { - "source": "https://github.com/symfony/http-client/tree/v7.2.2" - }, - "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": "2024-12-30T18:35:15+00:00" - }, - { - "name": "symfony/http-client-contracts", - "version": "v3.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/ee8d807ab20fcb51267fdace50fbe3494c31e645", - "reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.5-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "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": "Generic abstractions related to HTTP clients", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.2" - }, - "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": "2024-12-07T08:49:48+00:00" - }, - { - "name": "symfony/http-foundation", - "version": "v6.4.16", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "431771b7a6f662f1575b3cfc8fd7617aa9864d57" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/431771b7a6f662f1575b3cfc8fd7617aa9864d57", - "reference": "431771b7a6f662f1575b3cfc8fd7617aa9864d57", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-mbstring": "~1.1", "symfony/polyfill-php83": "^1.27" }, "conflict": { + "doctrine/dbal": "<3.6", "symfony/cache": "<6.4.12|>=7.0,<7.1.5" }, "require-dev": { - "doctrine/dbal": "^2.13.1|^3|^4", + "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", "symfony/cache": "^6.4.12|^7.1.5", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4|^7.0", - "symfony/mime": "^5.4|^6.0|^7.0", - "symfony/rate-limiter": "^5.4|^6.0|^7.0" + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/rate-limiter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -5912,7 +5626,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.16" + "source": "https://github.com/symfony/http-foundation/tree/v7.2.2" }, "funding": [ { @@ -5928,77 +5642,77 @@ "type": "tidelift" } ], - "time": "2024-11-13T18:58:10+00:00" + "time": "2024-12-30T19:00:17+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.4.17", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "c5647393c5ce11833d13e4b70fff4b571d4ac710" + "reference": "3c432966bd8c7ec7429663105f5a02d7e75b4306" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c5647393c5ce11833d13e4b70fff4b571d4ac710", - "reference": "c5647393c5ce11833d13e4b70fff4b571d4ac710", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/3c432966bd8c7ec7429663105f5a02d7e75b4306", + "reference": "3c432966bd8c7ec7429663105f5a02d7e75b4306", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1|^2|^3", "symfony/deprecation-contracts": "^2.5|^3", "symfony/error-handler": "^6.4|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.4", - "symfony/config": "<6.1", - "symfony/console": "<5.4", + "symfony/browser-kit": "<6.4", + "symfony/cache": "<6.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", "symfony/dependency-injection": "<6.4", - "symfony/doctrine-bridge": "<5.4", - "symfony/form": "<5.4", - "symfony/http-client": "<5.4", + "symfony/doctrine-bridge": "<6.4", + "symfony/form": "<6.4", + "symfony/http-client": "<6.4", "symfony/http-client-contracts": "<2.5", - "symfony/mailer": "<5.4", - "symfony/messenger": "<5.4", - "symfony/translation": "<5.4", + "symfony/mailer": "<6.4", + "symfony/messenger": "<6.4", + "symfony/translation": "<6.4", "symfony/translation-contracts": "<2.5", - "symfony/twig-bridge": "<5.4", + "symfony/twig-bridge": "<6.4", "symfony/validator": "<6.4", - "symfony/var-dumper": "<6.3", - "twig/twig": "<2.13" + "symfony/var-dumper": "<6.4", + "twig/twig": "<3.12" }, "provide": { "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|^7.0", - "symfony/clock": "^6.2|^7.0", - "symfony/config": "^6.1|^7.0", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/browser-kit": "^6.4|^7.0", + "symfony/clock": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/css-selector": "^6.4|^7.0", "symfony/dependency-injection": "^6.4|^7.0", - "symfony/dom-crawler": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/dom-crawler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", "symfony/http-client-contracts": "^2.5|^3", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/property-access": "^5.4.5|^6.0.5|^7.0", - "symfony/routing": "^5.4|^6.0|^7.0", - "symfony/serializer": "^6.4.4|^7.0.4", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/translation": "^5.4|^6.0|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/property-access": "^7.1", + "symfony/routing": "^6.4|^7.0", + "symfony/serializer": "^7.1", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/translation": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3", - "symfony/uid": "^5.4|^6.0|^7.0", + "symfony/uid": "^6.4|^7.0", "symfony/validator": "^6.4|^7.0", - "symfony/var-dumper": "^5.4|^6.4|^7.0", - "symfony/var-exporter": "^6.2|^7.0", - "twig/twig": "^2.13|^3.0.4" + "symfony/var-dumper": "^6.4|^7.0", + "symfony/var-exporter": "^6.4|^7.0", + "twig/twig": "^3.12" }, "type": "library", "autoload": { @@ -6026,7 +5740,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/v6.4.17" + "source": "https://github.com/symfony/http-kernel/tree/v7.2.2" }, "funding": [ { @@ -6042,43 +5756,43 @@ "type": "tidelift" } ], - "time": "2024-12-31T14:49:31+00:00" + "time": "2024-12-31T14:59:40+00:00" }, { "name": "symfony/mailer", - "version": "v6.4.13", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "c2f7e0d8d7ac8fe25faccf5d8cac462805db2663" + "reference": "e4d358702fb66e4c8a2af08e90e7271a62de39cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/c2f7e0d8d7ac8fe25faccf5d8cac462805db2663", - "reference": "c2f7e0d8d7ac8fe25faccf5d8cac462805db2663", + "url": "https://api.github.com/repos/symfony/mailer/zipball/e4d358702fb66e4c8a2af08e90e7271a62de39cc", + "reference": "e4d358702fb66e4c8a2af08e90e7271a62de39cc", "shasum": "" }, "require": { "egulias/email-validator": "^2.1.10|^3|^4", - "php": ">=8.1", + "php": ">=8.2", "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", - "symfony/mime": "^6.2|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/mime": "^7.2", "symfony/service-contracts": "^2.5|^3" }, "conflict": { "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<5.4", - "symfony/messenger": "<6.2", - "symfony/mime": "<6.2", - "symfony/twig-bridge": "<6.2.1" + "symfony/http-kernel": "<6.4", + "symfony/messenger": "<6.4", + "symfony/mime": "<6.4", + "symfony/twig-bridge": "<6.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/messenger": "^6.2|^7.0", - "symfony/twig-bridge": "^6.2|^7.0" + "symfony/console": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/twig-bridge": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6106,7 +5820,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.4.13" + "source": "https://github.com/symfony/mailer/tree/v7.2.0" }, "funding": [ { @@ -6122,25 +5836,24 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2024-11-25T15:21:05+00:00" }, { "name": "symfony/mime", - "version": "v6.4.17", + "version": "v7.2.1", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "ea87c8850a54ff039d3e0ab4ae5586dd4e6c0232" + "reference": "7f9617fcf15cb61be30f8b252695ed5e2bfac283" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/ea87c8850a54ff039d3e0ab4ae5586dd4e6c0232", - "reference": "ea87c8850a54ff039d3e0ab4ae5586dd4e6c0232", + "url": "https://api.github.com/repos/symfony/mime/zipball/7f9617fcf15cb61be30f8b252695ed5e2bfac283", + "reference": "7f9617fcf15cb61be30f8b252695ed5e2bfac283", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, @@ -6148,17 +5861,17 @@ "egulias/email-validator": "~3.0.0", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<5.4", + "symfony/mailer": "<6.4", "symfony/serializer": "<6.4.3|>7.0,<7.0.3" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", "league/html-to-markdown": "^5.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.4|^7.0", - "symfony/property-access": "^5.4|^6.0|^7.0", - "symfony/property-info": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", "symfony/serializer": "^6.4.3|^7.0.3" }, "type": "library", @@ -6191,7 +5904,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.4.17" + "source": "https://github.com/symfony/mime/tree/v7.2.1" }, "funding": [ { @@ -6207,7 +5920,7 @@ "type": "tidelift" } ], - "time": "2024-12-02T11:09:41+00:00" + "time": "2024-12-07T08:50:44+00:00" }, { "name": "symfony/options-resolver", @@ -6914,20 +6627,20 @@ }, { "name": "symfony/process", - "version": "v6.4.15", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "3cb242f059c14ae08591c5c4087d1fe443564392" + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/3cb242f059c14ae08591c5c4087d1fe443564392", - "reference": "3cb242f059c14ae08591c5c4087d1fe443564392", + "url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -6955,7 +6668,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.15" + "source": "https://github.com/symfony/process/tree/v7.2.0" }, "funding": [ { @@ -6971,47 +6684,42 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:19:14+00:00" + "time": "2024-11-06T14:24:19+00:00" }, { "name": "symfony/psr-http-message-bridge", - "version": "v2.3.1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e" + "reference": "03f2f72319e7acaf2a9f6fcbe30ef17eec51594f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/581ca6067eb62640de5ff08ee1ba6850a0ee472e", - "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/03f2f72319e7acaf2a9f6fcbe30ef17eec51594f", + "reference": "03f2f72319e7acaf2a9f6fcbe30ef17eec51594f", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/http-message": "^1.0 || ^2.0", - "symfony/deprecation-contracts": "^2.5 || ^3.0", - "symfony/http-foundation": "^5.4 || ^6.0" + "php": ">=8.2", + "psr/http-message": "^1.0|^2.0", + "symfony/http-foundation": "^6.4|^7.0" + }, + "conflict": { + "php-http/discovery": "<1.15", + "symfony/http-kernel": "<6.4" }, "require-dev": { "nyholm/psr7": "^1.1", - "psr/log": "^1.1 || ^2 || ^3", - "symfony/browser-kit": "^5.4 || ^6.0", - "symfony/config": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/framework-bundle": "^5.4 || ^6.0", - "symfony/http-kernel": "^5.4 || ^6.0", - "symfony/phpunit-bridge": "^6.2" - }, - "suggest": { - "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" + "php-http/discovery": "^1.15", + "psr/log": "^1.1.4|^2|^3", + "symfony/browser-kit": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/framework-bundle": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0" }, "type": "symfony-bridge", - "extra": { - "branch-alias": { - "dev-main": "2.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Bridge\\PsrHttpMessage\\": "" @@ -7031,11 +6739,11 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" } ], "description": "PSR HTTP message bridge", - "homepage": "http://symfony.com", + "homepage": "https://symfony.com", "keywords": [ "http", "http-message", @@ -7043,8 +6751,7 @@ "psr-7" ], "support": { - "issues": "https://github.com/symfony/psr-http-message-bridge/issues", - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.3.1" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v7.2.0" }, "funding": [ { @@ -7060,40 +6767,38 @@ "type": "tidelift" } ], - "time": "2023-07-26T11:53:26+00:00" + "time": "2024-09-26T08:57:56+00:00" }, { "name": "symfony/routing", - "version": "v6.4.16", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "91e02e606b4b705c2f4fb42f7e7708b7923a3220" + "reference": "e10a2450fa957af6c448b9b93c9010a4e4c0725e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/91e02e606b4b705c2f4fb42f7e7708b7923a3220", - "reference": "91e02e606b4b705c2f4fb42f7e7708b7923a3220", + "url": "https://api.github.com/repos/symfony/routing/zipball/e10a2450fa957af6c448b9b93c9010a4e4c0725e", + "reference": "e10a2450fa957af6c448b9b93c9010a4e4c0725e", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { - "doctrine/annotations": "<1.12", - "symfony/config": "<6.2", - "symfony/dependency-injection": "<5.4", - "symfony/yaml": "<5.4" + "symfony/config": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/yaml": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.12|^2", "psr/log": "^1|^2|^3", - "symfony/config": "^6.2|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^5.4|^6.0|^7.0", - "symfony/yaml": "^5.4|^6.0|^7.0" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -7127,7 +6832,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.16" + "source": "https://github.com/symfony/routing/tree/v7.2.0" }, "funding": [ { @@ -7143,7 +6848,7 @@ "type": "tidelift" } ], - "time": "2024-11-13T15:31:34+00:00" + "time": "2024-11-25T11:08:51+00:00" }, { "name": "symfony/service-contracts", @@ -7317,33 +7022,33 @@ }, { "name": "symfony/translation", - "version": "v6.4.13", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "bee9bfabfa8b4045a66bf82520e492cddbaffa66" + "reference": "e2674a30132b7cc4d74540d6c2573aa363f05923" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/bee9bfabfa8b4045a66bf82520e492cddbaffa66", - "reference": "bee9bfabfa8b4045a66bf82520e492cddbaffa66", + "url": "https://api.github.com/repos/symfony/translation/zipball/e2674a30132b7cc4d74540d6c2573aa363f05923", + "reference": "e2674a30132b7cc4d74540d6c2573aa363f05923", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^2.5|^3.0" }, "conflict": { - "symfony/config": "<5.4", - "symfony/console": "<5.4", - "symfony/dependency-injection": "<5.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<5.4", + "symfony/http-kernel": "<6.4", "symfony/service-contracts": "<2.5", - "symfony/twig-bundle": "<5.4", - "symfony/yaml": "<5.4" + "symfony/twig-bundle": "<6.4", + "symfony/yaml": "<6.4" }, "provide": { "symfony/translation-implementation": "2.3|3.0" @@ -7351,17 +7056,17 @@ "require-dev": { "nikic/php-parser": "^4.18|^5.0", "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", "symfony/http-client-contracts": "^2.5|^3.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/intl": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/routing": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^5.4|^6.0|^7.0" + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -7392,7 +7097,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.13" + "source": "https://github.com/symfony/translation/tree/v7.2.2" }, "funding": [ { @@ -7408,7 +7113,7 @@ "type": "tidelift" } ], - "time": "2024-09-27T18:14:25+00:00" + "time": "2024-12-07T08:18:10+00:00" }, { "name": "symfony/translation-contracts", @@ -7490,24 +7195,24 @@ }, { "name": "symfony/uid", - "version": "v6.4.13", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "18eb207f0436a993fffbdd811b5b8fa35fa5e007" + "reference": "2d294d0c48df244c71c105a169d0190bfb080426" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/18eb207f0436a993fffbdd811b5b8fa35fa5e007", - "reference": "18eb207f0436a993fffbdd811b5b8fa35fa5e007", + "url": "https://api.github.com/repos/symfony/uid/zipball/2d294d0c48df244c71c105a169d0190bfb080426", + "reference": "2d294d0c48df244c71c105a169d0190bfb080426", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-uuid": "^1.15" }, "require-dev": { - "symfony/console": "^5.4|^6.0|^7.0" + "symfony/console": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -7544,7 +7249,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v6.4.13" + "source": "https://github.com/symfony/uid/tree/v7.2.0" }, "funding": [ { @@ -7560,38 +7265,36 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.15", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80" + "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80", - "reference": "38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c6a22929407dec8765d6e2b6ff85b800b245879c", + "reference": "c6a22929407dec8765d6e2b6ff85b800b245879c", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/console": "<5.4" + "symfony/console": "<6.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/error-handler": "^6.3|^7.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/uid": "^5.4|^6.0|^7.0", - "twig/twig": "^2.13|^3.0.4" + "symfony/console": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", + "twig/twig": "^3.12" }, "bin": [ "Resources/bin/var-dump-server" @@ -7629,7 +7332,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.15" + "source": "https://github.com/symfony/var-dumper/tree/v7.2.0" }, "funding": [ { @@ -7645,7 +7348,7 @@ "type": "tidelift" } ], - "time": "2024-11-08T15:28:48+00:00" + "time": "2024-11-08T15:48:14+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -7702,6 +7405,73 @@ }, "time": "2024-12-21T16:25:41+00:00" }, + { + "name": "uwil/admin-secure-laravel", + "version": "3.0.0", + "source": { + "type": "git", + "url": "git@lab.s-web.fr:ldc-web/projets/ldc-web-admin-secure-laravel.git", + "reference": "6bf17bd7a45b2bdc3a86cef381a86e77bc339469" + }, + "dist": { + "type": "zip", + "url": "https://lab.s-web.fr/api/v4/projects/20/packages/composer/archives/uwil/admin-secure-laravel.zip?sha=6bf17bd7a45b2bdc3a86cef381a86e77bc339469", + "reference": "6bf17bd7a45b2bdc3a86cef381a86e77bc339469", + "shasum": "" + }, + "require": { + "dxw/cidr": "^3.2", + "illuminate/support": "~11", + "laravel/framework": "~11", + "php": "^8.3", + "symfony/options-resolver": "^7.0" + }, + "require-dev": { + "larastan/larastan": "^2.9", + "orchestra/testbench": "^9", + "phpunit/php-code-coverage": "^11", + "phpunit/phpunit": "^11", + "slevomat/coding-standard": "^8", + "squizlabs/php_codesniffer": "^3" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Uwil\\AdminSecure\\Laravel\\AdminSecureServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Uwil\\AdminSecure\\Laravel\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Uwil\\AdminSecure\\Laravel\\Tests\\": "tests" + } + }, + "scripts": { + "test": [ + "vendor/bin/phpunit" + ], + "post-autoload-dump": [ + "@php ./vendor/bin/testbench package:discover --ansi" + ] + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Equipe Web", + "email": "equipe.web@ldc.fr", + "homepage": "https://www.ldc.fr" + } + ], + "description": "Restrict access to LDC Network" + }, { "name": "uwil/k8s-laravel", "version": "1.4.0", @@ -8843,30 +8613,29 @@ }, { "name": "laravel-lang/common", - "version": "4.1.1", + "version": "v4.0.0", "source": { "type": "git", "url": "https://github.com/Laravel-Lang/common.git", - "reference": "0da7d05913b66a7f9edd712016d737059c74ae00" + "reference": "31744c7f64610990a77c7705e590e04c1fca372d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Laravel-Lang/common/zipball/0da7d05913b66a7f9edd712016d737059c74ae00", - "reference": "0da7d05913b66a7f9edd712016d737059c74ae00", + "url": "https://api.github.com/repos/Laravel-Lang/common/zipball/31744c7f64610990a77c7705e590e04c1fca372d", + "reference": "31744c7f64610990a77c7705e590e04c1fca372d", "shasum": "" }, "require": { - "laravel-lang/attributes": "^2.4.1", - "laravel-lang/http-statuses": "^3.4.5", - "laravel-lang/lang": "^13.2.8", - "laravel-lang/locales": "^1.4", - "laravel-lang/publisher": "^14.7.1", + "laravel-lang/attributes": "^2.3.3", + "laravel-lang/http-statuses": "^3.3.1", + "laravel-lang/lang": "^13.0", + "laravel-lang/publisher": "^14.6.4", "php": "^8.1" }, "require-dev": { - "orchestra/testbench": "^8.14", - "phpunit/phpunit": "^10.4.2", - "symfony/var-dumper": "^6.3.6" + "orchestra/testbench": "^8.5 || ^9.0", + "phpunit/phpunit": "^10.0", + "symfony/var-dumper": "^6.3" }, "type": "library", "notification-url": "https://packagist.org/downloads/", @@ -8904,8 +8673,6 @@ "laravel", "locale", "locales", - "localization", - "localizations", "nova", "publisher", "spark", @@ -8923,7 +8690,7 @@ "type": "open_collective" } ], - "time": "2023-10-30T08:56:35+00:00" + "time": "2023-08-09T09:24:50+00:00" }, { "name": "laravel-lang/http-statuses", @@ -9052,142 +8819,6 @@ }, "time": "2023-12-16T17:26:12+00:00" }, - { - "name": "laravel-lang/locales", - "version": "1.9.0", - "source": { - "type": "git", - "url": "https://github.com/Laravel-Lang/locales.git", - "reference": "0935f76c51c17333cae57dc9a7bac289de7d3687" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Laravel-Lang/locales/zipball/0935f76c51c17333cae57dc9a7bac289de7d3687", - "reference": "0935f76c51c17333cae57dc9a7bac289de7d3687", - "shasum": "" - }, - "require": { - "archtechx/enums": "^0.3.2", - "dragon-code/support": "^6.11.3", - "ext-json": "*", - "illuminate/collections": "^10.0", - "laravel-lang/native-locale-names": "^1.4.0", - "php": "^8.1" - }, - "require-dev": { - "orchestra/testbench": "^8.0", - "pestphp/pest": "^2.24.1", - "symfony/var-dumper": "^6.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "LaravelLang\\Locales\\ServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "LaravelLang\\Locales\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andrey Helldar", - "email": "helldar@dragon-code.pro" - }, - { - "name": "Laravel-Lang Team", - "homepage": "https://laravel-lang.com" - } - ], - "description": "Basic functionality for working with localizations", - "keywords": [ - "laravel", - "locale", - "locales", - "localization", - "translation", - "translations" - ], - "support": { - "issues": "https://github.com/Laravel-Lang/locales/issues", - "source": "https://github.com/Laravel-Lang/locales" - }, - "time": "2023-11-13T23:15:06+00:00" - }, - { - "name": "laravel-lang/native-locale-names", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/Laravel-Lang/native-locale-names.git", - "reference": "c7ed1ef404081303d32ab8523621e68cb88f4227" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Laravel-Lang/native-locale-names/zipball/c7ed1ef404081303d32ab8523621e68cb88f4227", - "reference": "c7ed1ef404081303d32ab8523621e68cb88f4227", - "shasum": "" - }, - "require": { - "dragon-code/support": "^6.11", - "ext-json": "*", - "php": "^8.1" - }, - "require-dev": { - "guzzlehttp/guzzle": "^7.8", - "illuminate/support": "^10.31", - "laravel-lang/status-generator": "^2.3.1", - "pestphp/pest": "^2.24.3", - "punic/punic": "^3.8", - "symfony/console": "^6.3", - "symfony/process": "^6.3", - "symfony/var-dumper": "^6.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "LaravelLang\\NativeLocaleNames\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andrey Helldar", - "email": "helldar@dragon-code.pro" - }, - { - "name": "Laravel-Lang Team", - "homepage": "https://laravel-lang.com" - } - ], - "description": "The project contains native translations of locale names", - "keywords": [ - "Laravel-lang", - "lang", - "languages", - "laravel", - "locale", - "locales", - "localization", - "translation", - "translations" - ], - "support": { - "issues": "https://github.com/Laravel-Lang/native-locale-names/issues", - "source": "https://github.com/Laravel-Lang/native-locale-names" - }, - "time": "2023-11-11T09:58:35+00:00" - }, { "name": "laravel-lang/publisher", "version": "14.7.1", @@ -9440,40 +9071,38 @@ }, { "name": "nunomaduro/collision", - "version": "v7.11.0", + "version": "v8.5.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "994ea93df5d4132f69d3f1bd74730509df6e8a05" + "reference": "f5c101b929c958e849a633283adff296ed5f38f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/994ea93df5d4132f69d3f1bd74730509df6e8a05", - "reference": "994ea93df5d4132f69d3f1bd74730509df6e8a05", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/f5c101b929c958e849a633283adff296ed5f38f5", + "reference": "f5c101b929c958e849a633283adff296ed5f38f5", "shasum": "" }, "require": { "filp/whoops": "^2.16.0", - "nunomaduro/termwind": "^1.15.1", - "php": "^8.1.0", - "symfony/console": "^6.4.12" + "nunomaduro/termwind": "^2.1.0", + "php": "^8.2.0", + "symfony/console": "^7.1.5" }, "conflict": { - "laravel/framework": ">=11.0.0" + "laravel/framework": "<11.0.0 || >=12.0.0", + "phpunit/phpunit": "<10.5.1 || >=12.0.0" }, "require-dev": { - "brianium/paratest": "^7.3.1", - "laravel/framework": "^10.48.22", + "larastan/larastan": "^2.9.8", + "laravel/framework": "^11.28.0", "laravel/pint": "^1.18.1", "laravel/sail": "^1.36.0", - "laravel/sanctum": "^3.3.3", + "laravel/sanctum": "^4.0.3", "laravel/tinker": "^2.10.0", - "nunomaduro/larastan": "^2.9.8", - "orchestra/testbench-core": "^8.28.3", - "pestphp/pest": "^2.35.1", - "phpunit/phpunit": "^10.5.36", - "sebastian/environment": "^6.1.0", - "spatie/laravel-ignition": "^2.8.0" + "orchestra/testbench-core": "^9.5.3", + "pestphp/pest": "^2.36.0 || ^3.4.0", + "sebastian/environment": "^6.1.0 || ^7.2.0" }, "type": "library", "extra": { @@ -9481,6 +9110,9 @@ "providers": [ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" ] + }, + "branch-alias": { + "dev-8.x": "8.x-dev" } }, "autoload": { @@ -9532,7 +9164,7 @@ "type": "patreon" } ], - "time": "2024-10-15T15:12:40+00:00" + "time": "2024-10-15T16:06:32+00:00" }, { "name": "phar-io/manifest", @@ -10022,16 +9654,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.41", + "version": "10.5.40", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e76586fa3d49714f230221734b44892e384109d7" + "reference": "e6ddda95af52f69c1e0c7b4f977cccb58048798c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e76586fa3d49714f230221734b44892e384109d7", - "reference": "e76586fa3d49714f230221734b44892e384109d7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e6ddda95af52f69c1e0c7b4f977cccb58048798c", + "reference": "e6ddda95af52f69c1e0c7b4f977cccb58048798c", "shasum": "" }, "require": { @@ -10103,7 +9735,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.41" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.40" }, "funding": [ { @@ -10119,7 +9751,7 @@ "type": "tidelift" } ], - "time": "2025-01-13T09:33:05+00:00" + "time": "2024-12-21T05:49:06+00:00" }, { "name": "respect/stringifier", @@ -11817,7 +11449,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.2", + "php": "^8.3", "ext-curl": "*", "ext-dom": "*", "ext-json": "*" diff --git a/config/database.php b/config/database.php index 60034cd..17ec10e 100644 --- a/config/database.php +++ b/config/database.php @@ -66,26 +66,6 @@ return [ ]) : [], ], - 'oldcrm' => [ - 'driver' => 'mysql', - 'url' => env('DATABASE_URL_OLD'), - 'host' => env('DB_HOST_OLD', '127.0.0.1'), - 'port' => env('DB_PORT_OLD', '3306'), - 'database' => env('DB_DATABASE_OLD', 'forge'), - 'username' => env('DB_USERNAME_OLD', 'forge'), - 'password' => env('DB_PASSWORD_OLD', ''), - 'unix_socket' => env('DB_SOCKET_OLD', ''), - 'charset' => 'utf8mb4', - 'collation' => 'utf8mb4_unicode_ci', - 'prefix' => '', - 'prefix_indexes' => true, - 'strict' => true, - 'engine' => null, - 'options' => extension_loaded('pdo_mysql') ? array_filter([ - PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), - ]) : [], - ], - 'pgsql' => [ 'driver' => 'pgsql', 'url' => env('DATABASE_URL'), diff --git a/database/migrations/2025_04_23_103304_alter_customers_login_last_connection_field.php b/database/migrations/2025_04_23_103304_alter_customers_login_last_connection_field.php new file mode 100644 index 0000000..a2264a2 --- /dev/null +++ b/database/migrations/2025_04_23_103304_alter_customers_login_last_connection_field.php @@ -0,0 +1,32 @@ +timestamp('last_connection')->nullable()->default(null)->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down(): void + { + Schema::table('customer_logins', function (Blueprint $table) { + $table->timestamp('last_connection')->nullable(false)->change(); + }); + } +}; diff --git a/database/migrations/LeGaulois2016Migration.php b/database/migrations/LeGaulois2016Migration.php deleted file mode 100644 index 7de6c6d..0000000 --- a/database/migrations/LeGaulois2016Migration.php +++ /dev/null @@ -1,293 +0,0 @@ - - * Examples - *[ - * 'content_ocb' => [ - * 'model' => OCBContent::class, - * 'bind' => [ - * 'id' => 'ocb_id', - * 'picture' => 'ocb_img', - * 'content' => 'ocb_content', - * 'status' => 'ocb_is_published', - * 'type' => [ - * 'apply' => function ($value) { - * switch ($value) { - * case 'VOLAILLE': - * return OCBType::poultry(); - * case 'LAPIN': - * return OCBType::rabbit(); - * case 'OEUF': - * return OCBType::egg(); - * } - * }, - * 'name' => 'ocb_type', - * 'default' => '' - * ], - * 'order' => 'ocb_position', - * 'created_at' => [ - * 'name' => '', - * 'default' => date('Y-m-d H:i:s') - * ], - * 'updated_at' => [ - * 'name' => '', - * 'default' => date('Y-m-d H:i:s') - * ] - * ] - * ], - * 'Recipe ratings' => [ - * 'table' => 'recipe', - * 'comment' => 'Add ratings to recipes', - * 'model' => Rating::class, - * 'bind' => [ - * 'anyprop' => [ - * 'apply' => function ($recipe_id) { - * $recipe_rating = $this->oldDB->table('recipe_rating') - * ->select('recipe_rating_value') - * ->where('recipe_rating_recipe_id', '=', $recipe_id) - * ->get(); - * $count = $recipe_rating->count(); - * $sum = $recipe_rating->sum(function ($obj) { - * return $obj->recipe_rating_value; - * }); - * $this->newDB->table('ratings') - * ->insert([ - * 'total' => $sum, - * 'count' => $count, - * 'rating' => $count ? floatval($sum / $count) : 0, - * 'recipes_id' => $recipe_id, - * 'created_at' => date('Y-m-d H:i:s'), - * 'updated_at' => date('Y-m-d H:i:s'), - * ]); - * throw new AbortRowImportException(); - * }, - * 'name' => 'recipe_id' - * ] - * ] - * ], - *] - * - * @param array $instructions - * @return void - */ - - -/** - * Helps to migration from legaulois2016 to legaulois2020 - * @author Jérémy Munsch - */ -abstract class LeGaulois2016Migration extends Migration -{ - - /** @var ConsoleOutput */ - private $output = null; - - /** @var ConsoleSectionOutput */ - private $outputSection = null; - - /** @var \Illuminate\Database\ConnectionInterface */ - private $oldDB = null; - - /** @var \Illuminate\Database\ConnectionInterface */ - private $newDB = null; - - /** @var array */ - private $instructions = null; - - public function __construct() - { - $oldDB = config(sprintf('database.connections.%s', config('database.oldDB'))); - $newDB = config(sprintf('database.connections.%s', config('database.newDB'))); - if (!$oldDB) { - throw new Exception(sprintf('Unknown database connection %s for newDB', config('database.newDB'))); - } - if (!$newDB) { - throw new Exception(sprintf('Unknown database connection %s for oldDB', config('database.oldDB'))); - } - $this->oldDB = DB::connection(config('database.oldDB')); - $this->newDB = DB::connection(config('database.newDB')); - } - - public function up() - { - $this->instructions = $this->instruct(); - $this->processData(); - } - - public function down() - { - // Do nothing - } - - public function __get(string $name) - { - if ($name === 'oldDB') { - return $this->oldDB; - } - if ($name === 'newDB') { - return $this->newDB; - } - } - - /** - * Set migration instructions to execute on "up" only - * @param array $instructions - * see Instructions in \App\Database\Migrations\LeGaulois2016Migration - */ - abstract public function instruct(): array; - - /** - * Core execution on instruction - * - * @return void - */ - private function processData() - { - $getOldData = function ($keyOrKeys, $array) { - if (is_array($keyOrKeys)) { - $o = []; - foreach ($keyOrKeys as $key) { - $o[] = strval($array[$key]); - } - return implode('#|#', $o); - } - return $array[$keyOrKeys] ?? null; - }; - - foreach ($this->instructions as $oldTableName => $modelData) { - $migrationName = $oldTableName; - $oldTableName = $modelData['table'] ?? $oldTableName; - $rowNbrs = $this->oldDB->table($oldTableName)->count(); - $rowInserted = 0; - - $this->consoleLog($this->renderProgress($migrationName, $rowInserted, $rowNbrs)); - - $i = 0; - $page = 1; - $perPage = env('MIGRATIONPAGINATION', 300); - do { - $results = $this->oldDB->table($oldTableName)->paginate($perPage, ['*'], 'page', $page); - $i += $perPage; - $page++; - foreach ($results as $oldData) { - $model = null; - try { // Try to get exisiting model ID (to avoid SQL Integrity violations doing delete and create) - $model = $modelData['model']::findOrFail( - $getOldData($modelData['bind']['id'] ?? 0, (array)$oldData) - ); - } catch (ModelNotFoundException $e) { - $model = new $modelData['model'](); - } - try { // bind each property to it's data and save - foreach ($modelData['bind'] as $modelAttr => $oldModelAttr) { - if (is_array($oldModelAttr)) { - if (array_key_exists('apply', $oldModelAttr)) { - $argC = (new ReflectionFunction($oldModelAttr['apply']))->getNumberOfParameters(); - $argV = [ - $getOldData($oldModelAttr['name'], (array)$oldData) - ]; - if ($argC > 1) { - $argV[] = $model; - } - $model[$modelAttr] = - call_user_func_array($oldModelAttr['apply'], $argV) ?? - $oldModelAttr['default'] ?? - null; - } else { - $model[$modelAttr] = - $getOldData($oldModelAttr['name'], (array)$oldData) ?? - $oldModelAttr['default'] ?? - null; - } - } else { - $model[$modelAttr] = ((array)$oldData)[$oldModelAttr]; - } - } - $model->save(); - } catch (QueryException $e) { - File::append(\storage_path('error_migration.txt'), implode(',', $e->getBindings()) . PHP_EOL); - } catch (AbortRowImportException $e) { - // DO nothing - } finally { - ++$rowInserted; - if (rand(0, 15) == 10) { // prevent screen ficklering - $this->consoleLog($this->renderProgress($migrationName, $rowInserted, $rowNbrs)); - } - } - } - } while ($i <= $rowNbrs); - if (array_key_exists('comment', $modelData)) { - $migrationName .= sprintf(' <%s> ', $modelData['comment']); - } - $terminal = new Terminal(); - $consoleLength = $terminal->getWidth(); - - $r = round(80 * 100 / $consoleLength) - strlen($migrationName); - $r = $r >= 0 ? $r : 0; - $this->consoleLog(sprintf('%s%smigrated', $migrationName, str_repeat(' ', $r))); - $this->consoleLog("", true); // Cariage return - } - } - - /** - * Prints a message to the console - * - * @param string $message - * @param boolean $newLine - * @return void - */ - private function consoleLog(string $message, bool $newLine = false) - { - if (!$this->output) { - $this->output = new ConsoleOutput(); - } - if ($newLine) { - $this->outputSection = null; - $this->output->write(sprintf("%s", $message)); - } else { - if (!$this->outputSection) { - $this->outputSection = $this->output->section(); - } - $this->outputSection->overwrite(sprintf('%s', $message)); - } - } - - /** - * Render the progressbar to a string - * - * @param string $oldTableName - * @param integer $count - * @param integer $total - * @return string - */ - private function renderProgress(string $oldTableName, int $count, int $total) - { - $total = !$total ? 1 : $total; - $oldTableName = sprintf('%s ', $oldTableName); - $percent = $count * 100 / $total; - $percentText = sprintf(' [%d of %d]', $count, $total); - $terminal = new Terminal(); - $consoleLength = $terminal->getWidth(); - $bar = $consoleLength - strlen($oldTableName) - strlen($percentText); - $bar = $bar < 0 ? 0 : $bar; - $prog = round($percent / 100 * $bar); - $rep = $bar - $prog; - return $oldTableName . str_repeat('#', $prog) . str_repeat('_', $rep >= 0 ? $rep : 0) . $percentText; - } -} diff --git a/manifest.yaml b/manifest.yaml index 6a94dd3..2c9be72 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -10,7 +10,8 @@ data: APP_DEBUG: "${APP_APP_DEBUG}" APP_URL: "https://${APP_DOMAIN}" LOG_CHANNEL: "k8s" - DB_HOST: "mariadb.common-services" + DB_HOST: "${APP_DB_HOST}" + DB_PORT: "${APP_DB_PORT}" DB_DATABASE: "${APP_DB_DATABASE}" DB_USERNAME: "${APP_DB_USERNAME}" DB_PASSWORD: "${APP_DB_PASSWORD}" @@ -23,6 +24,7 @@ data: MAIL_FROM_ADDRESS: "${APP_MAIL_FROM_ADDRESS}" MAIL_FROM_NAME: "${APP_APP_NAME}" SENTRY_LARAVEL_DSN: "${APP_SENTRY_LARAVEL_DSN}" + LDC_WEB_API_KEY: "${APP_LDC_WEB_API_KEY}" --- apiVersion: v1 diff --git a/package-lock.json b/package-lock.json index 06ac1a9..7481eed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "crm", + "name": "srcs", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/resources/views/bo/pages/activity_logs/show.blade.php b/resources/views/bo/pages/activity_logs/show.blade.php index f5a898a..d1755c8 100644 --- a/resources/views/bo/pages/activity_logs/show.blade.php +++ b/resources/views/bo/pages/activity_logs/show.blade.php @@ -2,8 +2,7 @@ @section('title', __('Édition d\'un :model', ['model' => __('models.classes.activity_log')])) @section('description', __('Édition d\'un :model déjà existant', ['model' => __('models.classes.activity_log')])) -@section('breadcrumb', - request()->route()->getName()) +@section('breadcrumb', request()->route()->getName()) @section('content')
diff --git a/resources/views/bo/pages/answers/create.blade.php b/resources/views/bo/pages/answers/create.blade.php index 7928e8a..66cb783 100644 --- a/resources/views/bo/pages/answers/create.blade.php +++ b/resources/views/bo/pages/answers/create.blade.php @@ -3,8 +3,7 @@ @section('title', sprintf('%s - %s', __('models.classes.answers'), Str::ucfirst(__('création')))) @section('description', __('Création d\'une :model', ['model' => __('models.classes.answers')])) @section('metaIndex', 'noindex,nofollow') -@section('breadcrumb', - request()->route()->getName()) +@section('breadcrumb', request()->route()->getName()) @section('content')
diff --git a/resources/views/bo/pages/answers/edit.blade.php b/resources/views/bo/pages/answers/edit.blade.php index d498360..6d3e9da 100644 --- a/resources/views/bo/pages/answers/edit.blade.php +++ b/resources/views/bo/pages/answers/edit.blade.php @@ -3,8 +3,7 @@ @section('title', sprintf('%s - %s', __('models.classes.answers'), Str::ucfirst(__('édition')))) @section('description', __('Édition d\'une :model', ['model' => __('models.classes.answers')])) @section('metaIndex', 'noindex,nofollow') -@section('breadcrumb', - request()->route()->getName()) +@section('breadcrumb', request()->route()->getName()) @section('content')
diff --git a/resources/views/bo/pages/answers/index-list.blade.php b/resources/views/bo/pages/answers/index-list.blade.php index d5b5901..d9dbfed 100644 --- a/resources/views/bo/pages/answers/index-list.blade.php +++ b/resources/views/bo/pages/answers/index-list.blade.php @@ -1,14 +1,11 @@
- @php - $cols = [ + @include('bo.modules.table-col-sorter', [ + 'cols' => [ 'answer' => __('Réponse'), 'updated_at' => __('Date d\'ajout en base'), - ]; - @endphp - @include('bo.modules.table-col-sorter', [ - 'cols' => $cols, + ], 'mobileHide' => ['status'], 'ignore' => ['updated_at'], ]) diff --git a/resources/views/bo/pages/brands/index-list.blade.php b/resources/views/bo/pages/brands/index-list.blade.php index 9b7dbc9..b57e3a1 100644 --- a/resources/views/bo/pages/brands/index-list.blade.php +++ b/resources/views/bo/pages/brands/index-list.blade.php @@ -1,16 +1,13 @@
- @php - $cols = [ + @include('bo.modules.table-col-sorter', [ + 'cols' => [ 'name' => __('Nom'), 'status' => __('Nombre de comptes'), 'optin' => __('Nombre d\'optins'), 'updated_at' => __('Date d\'ajout en base'), - ]; - @endphp - @include('bo.modules.table-col-sorter', [ - 'cols' => $cols, + ], 'mobileHide' => ['status'], 'ignore' => ['status', 'optin', 'updated_at'], ]) @@ -23,8 +20,9 @@
{{ $brandModel->customer_infos_count }} {{ $brandModel->customer_infos_optin_count }} - {{ $brandModel->updated_at->formatLocalized('%d/%m/%Y à %H:%M') }} + + {{ $brandModel->updated_at }} + @can('update', \App\Models\Brand::class) diff --git a/resources/views/bo/pages/customers/export.blade.php b/resources/views/bo/pages/customers/export.blade.php index ef1b04b..eb7b3a2 100644 --- a/resources/views/bo/pages/customers/export.blade.php +++ b/resources/views/bo/pages/customers/export.blade.php @@ -30,7 +30,7 @@
{{ __('La marque concernée') }}
- + @foreach ($brands as $i => $brand) diff --git a/resources/views/bo/pages/questions/index-list.blade.php b/resources/views/bo/pages/questions/index-list.blade.php index f7fe881..11b8b4e 100644 --- a/resources/views/bo/pages/questions/index-list.blade.php +++ b/resources/views/bo/pages/questions/index-list.blade.php @@ -1,14 +1,15 @@
- @php - $cols = [ + @include('bo.modules.table-col-sorter', [ + 'cols' => [ 'question' => __('Question'), 'brand_id' => __('Marque'), 'answers' => __('Réponses'), - ]; - @endphp - @include('bo.modules.table-col-sorter', ['cols' => $cols, 'mobileHide' => ['status'], 'ignore' => ['answers']]) + ], + 'mobileHide' => ['status'], + 'ignore' => ['answers'] + ]) @if (count($questionModels)) diff --git a/resources/views/bo/pages/services/index-list.blade.php b/resources/views/bo/pages/services/index-list.blade.php index 134a832..a3c2b24 100644 --- a/resources/views/bo/pages/services/index-list.blade.php +++ b/resources/views/bo/pages/services/index-list.blade.php @@ -1,17 +1,14 @@
- @php - $cols = [ + @include('bo.modules.table-col-sorter', [ + 'cols' => [ 'name' => __('Nom'), 'brand_id' => __('Marque'), 'bearer_token_date' => __('Date du Bearer token'), 'generateToken' => __('Regénerer un token'), 'created_at' => __('Date de création'), - ]; - @endphp - @include('bo.modules.table-col-sorter', [ - 'cols' => $cols, + ], 'mobileHide' => ['status'], 'ignore' => ['generateToken'], ]) diff --git a/resources/views/bo/pages/singleoptins/index-list.blade.php b/resources/views/bo/pages/singleoptins/index-list.blade.php index 1612f40..4e66515 100644 --- a/resources/views/bo/pages/singleoptins/index-list.blade.php +++ b/resources/views/bo/pages/singleoptins/index-list.blade.php @@ -1,15 +1,13 @@
- @php - $cols = [ + @include('bo.modules.table-col-sorter', [ + 'cols' => [ + 'hashcode' => __('Hashcode'), 'email' => __('E-mail'), 'brand_id' => __('Marque'), 'created_at' => __('Date opt-in'), - ]; - @endphp - @include('bo.modules.table-col-sorter', [ - 'cols' => $cols, + ], 'mobileHide' => ['status'], 'ignore' => ['status', 'optin', 'updated_at'], ]) @@ -18,6 +16,7 @@ @if ($singleoptinModels->count()) @foreach ($singleoptinModels as $singleoptinModel) +
{{ $singleoptinModel->hashcode }} {{ $singleoptinModel->email }} {{ $singleoptinModel->brand->name }} diff --git a/resources/views/bo/pages/users/create.blade.php b/resources/views/bo/pages/users/create.blade.php index db7de89..8dd431d 100644 --- a/resources/views/bo/pages/users/create.blade.php +++ b/resources/views/bo/pages/users/create.blade.php @@ -2,8 +2,7 @@ @section('title', __('Création d\'un :model', ['model' => __('models.classes.user')])) @section('description', __('Création d\'un tout nouveau :model', ['model' => __('models.classes.user')])) -@section('breadcrumb', - request()->route()->getName()) +@section('breadcrumb', request()->route()->getName()) @section('content')
diff --git a/resources/views/bo/pages/users/edit.blade.php b/resources/views/bo/pages/users/edit.blade.php index 4d8b52d..da4d62f 100644 --- a/resources/views/bo/pages/users/edit.blade.php +++ b/resources/views/bo/pages/users/edit.blade.php @@ -2,8 +2,7 @@ @section('title', __('Édition d\'un :model', ['model' => __('models.classes.user')])) @section('description', __('Édition d\'un :model déjà existant', ['model' => __('models.classes.user')])) -@section('breadcrumb', - request()->route()->getName()) +@section('breadcrumb', request()->route()->getName()) @section('content')
diff --git a/routes/web-bo.php b/routes/web-bo.php index bd83c92..dcb1b4c 100644 --- a/routes/web-bo.php +++ b/routes/web-bo.php @@ -14,7 +14,7 @@ use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Route; -Route::prefix('bo')->name('bo.')->group(function () { +Route::middleware(['throttle:web', 'admin-secure'])->prefix('bo')->name('bo.')->group(function () { // * Authenticable routes Route::namespace('\App\Http\Controllers\Bo') ->group(function () { diff --git a/tests/CRM/ApiV2/ApiBase.php b/tests/CRM/ApiV2/ApiBase.php index 2ce58cd..e11c4fa 100644 --- a/tests/CRM/ApiV2/ApiBase.php +++ b/tests/CRM/ApiV2/ApiBase.php @@ -10,7 +10,6 @@ use App\Models\Service; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; use Illuminate\Testing\AssertableJsonString; -use Illuminate\Testing\TestResponse; use Tests\CreatesApplication; class ApiBase extends BaseTestCase @@ -39,8 +38,12 @@ class ApiBase extends BaseTestCase * @param array $headers * @return \Illuminate\Testing\TestResponse */ - protected function callApi(string $method, string $uri, array $data = [], array $headers = []): TestResponse - { + protected function callApi( + string $method, + string $uri, + array $data = [], + array $headers = [] + ): \Illuminate\Testing\TestResponse { if (!isset($data['timestamp'])) { $data['timestamp'] = \time(); } @@ -63,7 +66,7 @@ class ApiBase extends BaseTestCase string $uri, array $data = [], array $headers = [] - ): TestResponse { + ): \Illuminate\Testing\TestResponse { $data['bearer_token'] = $service->bearer_token; $data['timestamp'] = \gmdate('Y-m-d H:i:s'); diff --git a/tests/CRM/ApiV2/ApiTest.php b/tests/CRM/ApiV2/ApiTest.php index 751008b..d8a3dfa 100644 --- a/tests/CRM/ApiV2/ApiTest.php +++ b/tests/CRM/ApiV2/ApiTest.php @@ -15,11 +15,11 @@ class ApiTest extends ApiBase use DatabaseTransactions; /** - * Test ApiV2 only handle json calls + * Test ApiV2 only handle json calls. * * @return void */ - public function testOnlyJsonCallsAreHandled() + public function testOnlyJsonCallsAreHandled(): void { $response = $this->call('get', route('apiV2.ping'), [ 'timestamp' => \gmdate('Y-m-d H:i:s') @@ -32,7 +32,7 @@ class ApiTest extends ApiBase * * @return void */ - public function testTimestampMiddleware() + public function testTimestampMiddleware(): void { $response = $this->json('get', route('apiV2.ping'), [ 'timestamp' => \gmdate('Y-m-d H:i:s') @@ -46,7 +46,7 @@ class ApiTest extends ApiBase * * @return void */ - public function testTimestampMiddlewareCheckFailMissing() + public function testTimestampMiddlewareCheckFailMissing(): void { $response = $this->json('get', route('apiV2.ping'), []); $json = $response->decodeResponseJson(); @@ -62,7 +62,7 @@ class ApiTest extends ApiBase * * @return void */ - public function testTimestampMiddlewareCheckFailWrongFormat() + public function testTimestampMiddlewareCheckFailWrongFormat(): void { $response = $this->json('get', route('apiV2.ping'), ['timestamp' => \gmdate('Y/m/d')]); $json = $response->decodeResponseJson(); @@ -78,7 +78,7 @@ class ApiTest extends ApiBase * * @return void */ - public function testTimestampMiddlewareCheckFailIfTooOld() + public function testTimestampMiddlewareCheckFailIfTooOld(): void { $response = $this->json('get', route('apiV2.ping'), [ 'timestamp' => \gmdate('Y-m-d H:i:s', \time() - config('api.timestampTimeout', 10)) @@ -98,7 +98,7 @@ class ApiTest extends ApiBase * * @return void */ - public function testApiThrottle() + public function testApiThrottle(): void { for ($i = config('api.apiRequestRatePerMinute', 100); $i >= 0; $i--) { $this->json('get', route('apiV2.ping'), [ @@ -115,11 +115,11 @@ class ApiTest extends ApiBase } /** - * Test wrong http method call + * Test wrong http method call. * * @return void */ - public function testWrongMethodCall() + public function testWrongMethodCall(): void { $response = $this->json('post', route('apiV2.ping'), [ 'timestamp' => \gmdate('Y-m-d H:i:s', \time()) @@ -130,11 +130,11 @@ class ApiTest extends ApiBase } /** - * Test Auth fail when no token + * Test Auth fail when no token. * * @return void */ - public function testAuthFailNoToken() + public function testAuthFailNoToken(): void { $response = $this->json('get', route('apiV2.customers.show', [ 'serviceCustomer' => Str::uuid() @@ -147,11 +147,11 @@ class ApiTest extends ApiBase } /** - * Test Auth fail when unknown token + * Test Auth fail when unknown token. * * @return void */ - public function testAuthFailUnknownToken() + public function testAuthFailUnknownToken(): void { $response = $this->json('get', route('apiV2.customers.show', [ 'serviceCustomer' => Str::uuid() @@ -165,19 +165,19 @@ class ApiTest extends ApiBase } /** - * Test Auth fail when wrong signature + * Test Auth fail when wrong signature. * * @return void */ - public function testAuthFailWrongSignature() + public function testAuthFailWrongSignature(): void { $service = Service::query()->firstOrFail(); $response = $this->json('get', route('apiV2.customers.show', [ 'serviceCustomer' => Str::uuid() ]), [ 'bearer_token' => $service->bearer_token, - 'timestamp' => \gmdate('Y-m-d H:i:s', \time()), - 'signature' => 'sdqdqsdqd' + 'timestamp' => \gmdate('Y-m-d H:i:s', \time()), + 'signature' => 'sdqdqsdqd' ]); $json = $response->decodeResponseJson(); $this->assertApiResponseStatusIs($json, ApiStatus::KO); diff --git a/tests/CRM/ApiV2/ArcadiaTest.php b/tests/CRM/ApiV2/ArcadiaTest.php index 28fbf12..d8e530f 100644 --- a/tests/CRM/ApiV2/ArcadiaTest.php +++ b/tests/CRM/ApiV2/ArcadiaTest.php @@ -19,27 +19,27 @@ class ArcadiaTest extends ApiBase * * @return void */ - public function testArcadiaSendOrderDefault() + public function testArcadiaSendOrderDefault(): void { extract($this->getCustomer()); $data = [ - 'deliver' => [ - 'email' => $customer->email, + 'deliver' => [ + 'email' => $customer->email, 'firstname' => $info->firstname, - 'lastname' => $info->lastname, - 'phone' => $info->phone, - 'address' => $info->address, - 'address2' => $info->address2, - 'city' => $info->city, - 'postcode' => $info->postcode, + 'lastname' => $info->lastname, + 'phone' => $info->phone, + 'address' => $info->address, + 'address2' => $info->address2, + 'city' => $info->city, + 'postcode' => $info->postcode, ], - 'operation' => 16, - 'label_type_support' => 'Send Departaimants', - 'order_date' => \date('Y/m/d H:i:s'), - 'state_order' => ArcadiaOrderType::cb->value(), - 'support_code' => 1, - 'label_type_support' => 'Fond carte Aimanté', - 'order_num' => 23, + 'operation' => 16, + 'label_type_support' => 'Send Departaimants', + 'order_date' => \date('Y/m/d H:i:s'), + 'state_order' => ArcadiaOrderType::cb->value(), + 'support_code' => 1, + 'label_type_support' => 'Fond carte Aimanté', + 'order_num' => 23, 'package_unit_weight' => 0, ]; $response = $this->callApiWithToken($service, 'post', route( @@ -56,26 +56,26 @@ class ArcadiaTest extends ApiBase * * @return void */ - public function testArcadiaSendOrderGame() + public function testArcadiaSendOrderGame(): void { extract($this->getCustomer()); $data = [ - 'deliver' => [ - 'email' => $customer->email, + 'deliver' => [ + 'email' => $customer->email, 'firstname' => $info->firstname, - 'lastname' => $info->lastname, - 'phone' => $info->phone, - 'address' => $info->address, - 'address2' => $info->address2, - 'city' => $info->city, - 'postcode' => $info->postcode, + 'lastname' => $info->lastname, + 'phone' => $info->phone, + 'address' => $info->address, + 'address2' => $info->address2, + 'city' => $info->city, + 'postcode' => $info->postcode, ], - 'operation' => 16, - 'order_date' => date('Y/m/d H:i:s'), - 'support_code' => 32, + 'operation' => 16, + 'order_date' => date('Y/m/d H:i:s'), + 'support_code' => 32, 'label_type_support' => 'Jeux Reghalal', - 'code_unique' => \strtoupper(\str_replace('-', '', (string)Str::uuid())), - 'code_on_pack' => '2563547' + 'code_unique' => \strtoupper(\str_replace('-', '', (string)Str::uuid())), + 'code_on_pack' => '2563547' ]; $response = $this->callApiWithToken($service, 'post', route( 'apiV2.arcadia.outgoingMailGame', diff --git a/tests/CRM/ApiV2/CustomerTest.php b/tests/CRM/ApiV2/CustomerTest.php index 8d5825c..c23a006 100644 --- a/tests/CRM/ApiV2/CustomerTest.php +++ b/tests/CRM/ApiV2/CustomerTest.php @@ -21,11 +21,11 @@ class CustomerTest extends ApiBase use DatabaseTransactions; /** - * Test Customer relations to its related models + * Test Customer relations to its related models. * * @return void */ - public function testCustomerRelations() + public function testCustomerRelations(): void { extract($this->getCustomer()); $infos = $customer->infos; @@ -46,7 +46,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiAuthenticateCustomerShouldWork() + public function testApiAuthenticateCustomerShouldWork(): void { extract($this->getCustomer(true)); @@ -58,7 +58,7 @@ class CustomerTest extends ApiBase 'post', route('apiV2.customers.authenticate', []), [ - 'email' => $customer->email, + 'email' => $customer->email, 'password' => 'testPassword' ] ); @@ -84,7 +84,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiAuthenticateCustomerShouldFailIfWrongPassword() + public function testApiAuthenticateCustomerShouldFailIfWrongPassword(): void { extract($this->getCustomer()); $response = $this->callApiWithToken( @@ -92,7 +92,7 @@ class CustomerTest extends ApiBase 'post', route('apiV2.customers.authenticate', []), [ - 'email' => $customer->email, + 'email' => $customer->email, 'password' => 'azdqdqdazd' ] ); @@ -113,7 +113,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiAuthenticateCustomerShouldFailIfWrongEmail() + public function testApiAuthenticateCustomerShouldFailIfWrongEmail(): void { extract($this->getCustomer()); $response = $this->callApiWithToken( @@ -121,7 +121,7 @@ class CustomerTest extends ApiBase 'post', route('apiV2.customers.authenticate', []), [ - 'email' => 'wrongemail@hotmail.fr', + 'email' => 'wrongemail@hotmail.fr', 'password' => 'azdqdqdazd' ] ); @@ -142,7 +142,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiAuthenticateCustomerShouldFailIfCustomerNotActivated() + public function testApiAuthenticateCustomerShouldFailIfCustomerNotActivated(): void { $login = CustomerLogin::query()->where('status', false)->firstOrFail(); /** @var \App\Models\Brand $brand */ @@ -156,7 +156,7 @@ class CustomerTest extends ApiBase 'post', route('apiV2.customers.authenticate', []), [ - 'email' => $customer->email, + 'email' => $customer->email, 'password' => 'testPassword' ] ); @@ -172,12 +172,12 @@ class CustomerTest extends ApiBase } /** - * Customer store ok + * Customer store ok. * route: apiV2.customers.store * * @return void */ - public function testApiStoreCustomerOk() + public function testApiStoreCustomerOk(): void { extract($this->getCustomer()); @@ -230,22 +230,22 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiStoreCustomerShouldFailIfCustomerAlreadyExists() + public function testApiStoreCustomerShouldFailIfCustomerAlreadyExists(): void { extract($this->getCustomer()); $data = [ - 'firstname' => 'Jean', - 'lastname' => 'Bond', + 'firstname' => 'Jean', + 'lastname' => 'Bond', 'birth_date' => \date('1992-03-08'), - 'address' => '10 rue des toto', - 'email' => 'newcustomer@hotmail.fr', - 'password' => '123.Mot.De.P4sse', - 'phone' => '+33654821562', - 'country' => Country::france->value(), - 'city' => 'Connerré', - 'postcode' => '72160', - 'opt_in' => true + 'address' => '10 rue des toto', + 'email' => 'newcustomer@hotmail.fr', + 'password' => '123.Mot.De.P4sse', + 'phone' => '+33654821562', + 'country' => Country::france->value(), + 'city' => 'Connerré', + 'postcode' => '72160', + 'opt_in' => true ]; $this->createNewCustomer($data, $brand); @@ -259,26 +259,26 @@ class CustomerTest extends ApiBase } /** - * Customer store validationFailures + * Customer store validationFailures. * route: apiV2.customers.store * * @return void */ - public function testApiStoreCustomerValidationFailures() + public function testApiStoreCustomerValidationFailures(): void { extract($this->getCustomer()); $data = [ - 'firstname' => 'Jean', - 'lastname' => 'Bond', + 'firstname' => 'Jean', + 'lastname' => 'Bond', 'birth_date' => \date('1992-03-08'), - 'address' => '10 rue des toto', - 'email' => 'newcustomer.failures@hotmail.fr', - 'password' => '123.Mot.De.P4sse', - 'phone' => '+33654821562', - 'country' => Country::france->value(), - 'city' => 'Connerré', - 'postcode' => '72160', - 'opt_in' => true + 'address' => '10 rue des toto', + 'email' => 'newcustomer.failures@hotmail.fr', + 'password' => '123.Mot.De.P4sse', + 'phone' => '+33654821562', + 'country' => Country::france->value(), + 'city' => 'Connerré', + 'postcode' => '72160', + 'opt_in' => true ]; $sendData = $data; @@ -343,12 +343,12 @@ class CustomerTest extends ApiBase } /** - * Test activate customer ok + * Test activate customer ok. * route: apiV2.customers.activate * * @return void */ - public function testActivateCustomerOk() + public function testActivateCustomerOk(): void { extract($this->getCustomer(false)); @@ -364,12 +364,12 @@ class CustomerTest extends ApiBase } /** - * Test activate customer already activated + * Test activate customer already activated. * route: apiV2.customers.activate * * @return void */ - public function testActivateCustomerAlreadyActivated() + public function testActivateCustomerAlreadyActivated(): void { extract($this->getCustomer(true)); @@ -387,40 +387,40 @@ class CustomerTest extends ApiBase } /** - * Test customer update ok + * Test customer update ok. * route: apiV2.customers.update * * @return void */ - public function testApiUpdateCustomerOk() + public function testApiUpdateCustomerOk(): void { extract($this->getCustomer()); $data = [ - 'firstname' => 'Jean2', - 'lastname' => 'Bond2', + 'firstname' => 'Jean2', + 'lastname' => 'Bond2', 'birth_date' => \date('1992-03-09'), - 'address' => '10 rue des toto', - 'email' => 'newcustomertoupdate@hotmail.fr', - 'password' => '123.Mot.De.P4sseNew', - 'phone' => '+33654821563', - 'country' => Country::luxembourg->value(), - 'city' => 'Connerré2', - 'postcode' => '72161', - 'opt_in' => 0 + 'address' => '10 rue des toto', + 'email' => 'newcustomertoupdate@hotmail.fr', + 'password' => '123.Mot.De.P4sseNew', + 'phone' => '+33654821563', + 'country' => Country::luxembourg->value(), + 'city' => 'Connerré2', + 'postcode' => '72161', + 'opt_in' => 0 ]; $newdata = [ - 'firstname' => 'Jean3', - 'lastname' => 'Bond3', + 'firstname' => 'Jean3', + 'lastname' => 'Bond3', 'birth_date' => \date('1992-03-07'), - 'address' => '10 rue des toto3', - 'email' => 'newcustomertoupdate3@hotmail.fr', - 'password' => '123.Mot.De.P4sseNew3', - 'phone' => '+33654821564', - 'country' => Country::france->value(), - 'city' => 'Connerré3', - 'postcode' => '72163', - 'opt_in' => 1 + 'address' => '10 rue des toto3', + 'email' => 'newcustomertoupdate3@hotmail.fr', + 'password' => '123.Mot.De.P4sseNew3', + 'phone' => '+33654821564', + 'country' => Country::france->value(), + 'city' => 'Connerré3', + 'postcode' => '72163', + 'opt_in' => 1 ]; $this->createNewCustomer($data, $brand); @@ -460,26 +460,26 @@ class CustomerTest extends ApiBase } /** - * Test customer update should fail if no changes are provided + * Test customer update should fail if no changes are provided. * route: apiV2.customers.update * * @return void */ - public function testApiUpdateCustomerShouldFailWhenNothingChanges() + public function testApiUpdateCustomerShouldFailWhenNothingChanges(): void { extract($this->getCustomer()); $data = [ - 'firstname' => 'Jean2', - 'lastname' => 'Bond2', + 'firstname' => 'Jean2', + 'lastname' => 'Bond2', 'birth_date' => \date('1992-03-09'), - 'address' => '10 rue des toto', - 'email' => 'anewcustomertoupdate@hotmail.fr', - 'password' => '123.Mot.De.P4sseNew', - 'phone' => '+33654821563', - 'country' => Country::luxembourg->value(), - 'city' => 'Connerré2', - 'postcode' => '72161', - 'opt_in' => 0 + 'address' => '10 rue des toto', + 'email' => 'anewcustomertoupdate@hotmail.fr', + 'password' => '123.Mot.De.P4sseNew', + 'phone' => '+33654821563', + 'country' => Country::luxembourg->value(), + 'city' => 'Connerré2', + 'postcode' => '72161', + 'opt_in' => 0 ]; $this->createNewCustomer($data, $brand); @@ -494,12 +494,12 @@ class CustomerTest extends ApiBase } /** - * Test customer show ok + * Test customer show ok. * route: apiV2.customers.show * * @return void */ - public function testApiGetCustomerOk() + public function testApiGetCustomerOk(): void { extract($this->getCustomer()); @@ -522,12 +522,12 @@ class CustomerTest extends ApiBase } /** - * Test customer show using email ok + * Test customer show using email ok. * route: apiV2.customers.show * * @return void */ - public function testApiGetCustomerByEmailOk() + public function testApiGetCustomerByEmailOk(): void { extract($this->getCustomer()); @@ -550,12 +550,12 @@ class CustomerTest extends ApiBase } /** - * Test customer show not found + * Test customer show not found. * route: apiV2.customers.show * * @return void */ - public function testApiGetCustomerNotFound() + public function testApiGetCustomerNotFound(): void { extract($this->getCustomer()); $csClassName = \array_slice(explode('\\', get_class($customer)), -1)[0]; @@ -587,7 +587,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiDestroyCustomer() + public function testApiDestroyCustomer(): void { extract($this->getCustomer()); $csClassName = \array_slice(explode('\\', get_class($customer)), -1)[0]; @@ -620,7 +620,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiCompletelyDestroyCustomer() + public function testApiCompletelyDestroyCustomer(): void { $customer = Customer::whereHas('logins', null, '>', 1)->firstOrFail(); @@ -672,13 +672,13 @@ class CustomerTest extends ApiBase } /** - * Make sute a customer exists and contains data + * Make sute a customer exists and contains data. * * @param array $data * @param \App\Models\Brand $brand * @return void */ - private function createNewCustomer(array $data, Brand $brand) + private function createNewCustomer(array $data, Brand $brand): void { $customer = Customer::whereEmail($data['email']) ->whereHas('brands', function ($q) use ($brand) { diff --git a/tests/CRM/ApiV2/QuestionTest.php b/tests/CRM/ApiV2/QuestionTest.php index 85185b7..63930eb 100644 --- a/tests/CRM/ApiV2/QuestionTest.php +++ b/tests/CRM/ApiV2/QuestionTest.php @@ -16,7 +16,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testQuestionIndex() + public function testQuestionIndex(): void { extract($this->getCustomer()); @@ -66,7 +66,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testQuestionIndexWithAnswers() + public function testQuestionIndexWithAnswers(): void { extract($this->getCustomer(true, false)); @@ -141,7 +141,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testQuestionIndexWithAnswersWhenCustomerNotFound() + public function testQuestionIndexWithAnswersWhenCustomerNotFound(): void { extract($this->getCustomer(true, false)); $service = Service::whereHas('brand', function ($q) use ($brand) { @@ -162,7 +162,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testCustomerUnAnsweredIndex() + public function testCustomerUnAnsweredIndex(): void { extract($this->getCustomer(true, false)); @@ -237,7 +237,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testUnAnsweredIndexWhenCustomerNotFound() + public function testUnAnsweredIndexWhenCustomerNotFound(): void { extract($this->getCustomer(true, false)); $service = Service::whereHas('brand', function ($q) use ($brand) { @@ -258,7 +258,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testQuestionSetAnswer() + public function testQuestionSetAnswer(): void { extract($this->getCustomer(true, false)); $question = Question::whereHas('brand', function ($q) use ($brand) { @@ -275,7 +275,7 @@ class QuestionTest extends ApiBase ['serviceCustomer' => $info->hashcode] ), [ 'question' => $question->id, - 'answers' => [$answer->id] + 'answers' => [$answer->id] ]); $json = $response->decodeResponseJson(); $this->assertApiResponseStatusIs($json, ApiStatus::OK); @@ -293,7 +293,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testQuestionSetAnswerWhenCustomerNotFound() + public function testQuestionSetAnswerWhenCustomerNotFound(): void { extract($this->getCustomer(true, false)); $service = Service::whereHas('brand', function ($q) use ($brand) { diff --git a/tests/CRM/ApiV2/SingleOptinTest.php b/tests/CRM/ApiV2/SingleOptinTest.php index 73528a2..5c8517b 100644 --- a/tests/CRM/ApiV2/SingleOptinTest.php +++ b/tests/CRM/ApiV2/SingleOptinTest.php @@ -16,17 +16,17 @@ class SingleOptinTest extends ApiBase use DatabaseTransactions; /** - * Test set single optin on + * Test set single optin on. * route: apiV2.optin * * @return void */ - public function testSetSingleOptinOn() + public function testSetSingleOptinOn(): void { $service = Service::firstOrFail(); $response = $this->callApiWithToken($service, 'post', route('apiV2.optin'), [ - 'email' => 'singleoptin@hotmail.fr', + 'email' => 'singleoptin@hotmail.fr', 'opt_in' => 1 ]); $json = $response->decodeResponseJson(); @@ -38,17 +38,17 @@ class SingleOptinTest extends ApiBase } /** - * Test set single optin off + * Test set single optin off. * route: apiV2.optin * * @return void */ - public function testSetSingleOptinOff() + public function testSetSingleOptinOff(): void { $service = Service::firstOrFail(); $response = $this->callApiWithToken($service, 'post', route('apiV2.optin'), [ - 'email' => 'singleoptin@hotmail.fr', + 'email' => 'singleoptin@hotmail.fr', 'opt_in' => 0 ]); $json = $response->decodeResponseJson(); @@ -65,7 +65,7 @@ class SingleOptinTest extends ApiBase * * @return void */ - public function testSingleOptinShouldFailIfCustomerExists() + public function testSingleOptinShouldFailIfCustomerExists(): void { $service = Service::firstOrFail(); $this->storeCustomer($service); @@ -77,7 +77,7 @@ class SingleOptinTest extends ApiBase $singleOptin->saveOrFail(); $response = $this->callApiWithToken($service, 'post', route('apiV2.optin'), [ - 'email' => 'singleoptin@hotmail.fr', + 'email' => 'singleoptin@hotmail.fr', 'opt_in' => 1 ]); @@ -88,12 +88,12 @@ class SingleOptinTest extends ApiBase } /** - * Test set single optin off using hashcode + * Test set single optin off using hashcode. * route: apiV2.optout-hashcode * * @return void */ - public function testSetSingleOptoutWithHashcode() + public function testSetSingleOptoutWithHashcode(): void { $service = Service::firstOrFail(); @@ -116,12 +116,12 @@ class SingleOptinTest extends ApiBase } /** - * Test set single optin off using hashcode fails if does not exists + * Test set single optin off using hashcode fails if does not exists. * route: apiV2.optout-hashcode * * @return void */ - public function testSetSingleOptoutWithHashcodeFailsIfDoesNotExists() + public function testSetSingleOptoutWithHashcodeFailsIfDoesNotExists(): void { $service = Service::firstOrFail(); @@ -144,25 +144,25 @@ class SingleOptinTest extends ApiBase } /** - * Store a customer in DB + * Store a customer in DB. * * @param \App\Models\Service $service * @return void */ - private function storeCustomer(Service $service) + private function storeCustomer(Service $service): void { $data = [ - 'firstname' => 'Jean', - 'lastname' => 'Bond', + 'firstname' => 'Jean', + 'lastname' => 'Bond', 'birth_date' => \date('1992-03-08'), - 'address' => '10 rue des totos', - 'email' => 'singleoptin@hotmail.fr', - 'password' => '123.Mot.De.P4sse', - 'phone' => '+33654821562', - 'country' => Country::france->value(), - 'city' => 'Connerré', - 'postcode' => '72160', - 'opt_in' => true + 'address' => '10 rue des totos', + 'email' => 'singleoptin@hotmail.fr', + 'password' => '123.Mot.De.P4sse', + 'phone' => '+33654821562', + 'country' => Country::france->value(), + 'city' => 'Connerré', + 'postcode' => '72160', + 'opt_in' => true ]; $this->callApiWithToken($service, 'post', route('apiV2.customers.store'), $data); } diff --git a/tests/CRM/ApiV2/StatsTest.php b/tests/CRM/ApiV2/StatsTest.php index b40273f..097e1a3 100644 --- a/tests/CRM/ApiV2/StatsTest.php +++ b/tests/CRM/ApiV2/StatsTest.php @@ -23,13 +23,13 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByBrand() + public function testStatsByBrand(): void { $service = Service::firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV2.stats.brandStats'), [ 'start' => Carbon::now()->subMonths(3)->isoFormat('YYYY-MM-DD'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); @@ -57,13 +57,13 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByBrandShouldFailWithInvalidDate() + public function testStatsByBrandShouldFailWithInvalidDate(): void { $service = Service::firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV2.stats.brandStats'), [ 'start' => Carbon::now()->subMonths(3)->subDay()->isoFormat('YYYY-MM-DD'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); @@ -77,13 +77,13 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByBrandShouldFailWithInvalidDateFormat() + public function testStatsByBrandShouldFailWithInvalidDateFormat(): void { $service = Service::firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV2.stats.brandStats'), [ 'start' => Carbon::now()->subMonths(3)->subDay()->isoFormat('YYYY-MM-DD HH:mmDD'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); @@ -97,7 +97,7 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByQuestion() + public function testStatsByQuestion(): void { $service = Service::firstOrFail(); $question = Question::whereBrandId($service->brand->id)->firstOrFail(); @@ -116,7 +116,7 @@ class StatsTest extends ApiBase $response = $this->callApiWithToken($service, 'get', route('apiV2.stats.questionStats', $question), [ 'start' => $start->isoFormat('YYYY-MM-DD'), - 'end' => $end->isoFormat('YYYY-MM-DD') + 'end' => $end->isoFormat('YYYY-MM-DD') ]); $datesIndexes = []; @@ -150,14 +150,14 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByQuestionShouldFailWithInvalidQuestion() + public function testStatsByQuestionShouldFailWithInvalidQuestion(): void { $service = Service::firstOrFail(); $question = Question::where('brand_id', '!=', $service->brand->id)->firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV2.stats.questionStats', $question), [ 'start' => Carbon::now()->subMonths(3)->subDay()->isoFormat('YYYY-MM-DD'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); @@ -171,14 +171,14 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByQuestionShouldFailWithInvalidDate() + public function testStatsByQuestionShouldFailWithInvalidDate(): void { $service = Service::firstOrFail(); $question = Question::whereBrandId($service->brand->id)->firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV2.stats.questionStats', $question), [ 'start' => Carbon::now()->subMonths(3)->subDay()->isoFormat('YYYY-MM-DD'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); @@ -192,14 +192,14 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByQuestionShouldFailWithInvalidDateFormat() + public function testStatsByQuestionShouldFailWithInvalidDateFormat(): void { $service = Service::firstOrFail(); $question = Question::whereBrandId($service->brand->id)->firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV2.stats.questionStats', $question), [ 'start' => Carbon::now()->subMonths(3)->isoFormat('YYYY-MM Ddh'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); diff --git a/tests/CRM/ApiV4/ApiBase.php b/tests/CRM/ApiV4/ApiBase.php index 33fc6eb..b52ce6c 100644 --- a/tests/CRM/ApiV4/ApiBase.php +++ b/tests/CRM/ApiV4/ApiBase.php @@ -10,7 +10,6 @@ use App\Models\Service; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; use Illuminate\Testing\AssertableJsonString; -use Illuminate\Testing\TestResponse; use Tests\CreatesApplication; class ApiBase extends BaseTestCase @@ -25,13 +24,13 @@ class ApiBase extends BaseTestCase * @param \App\Enums\ApiStatus $status * @return void */ - protected function assertApiResponseStatusIs(AssertableJsonString $json, ApiStatus $status) + protected function assertApiResponseStatusIs(AssertableJsonString $json, ApiStatus $status): void { $json->assertFragment(['status' => $status->value]); } /** - * Raw Function to call api + * Raw Function to call api. * * @param string $method * @param string $uri @@ -39,8 +38,12 @@ class ApiBase extends BaseTestCase * @param array $headers * @return \Illuminate\Testing\TestResponse */ - protected function callApi(string $method, string $uri, array $data = [], array $headers = []): TestResponse - { + protected function callApi( + string $method, + string $uri, + array $data = [], + array $headers = [] + ): \Illuminate\Testing\TestResponse { if (!isset($data['timestamp'])) { $data['timestamp'] = \time(); } @@ -48,7 +51,7 @@ class ApiBase extends BaseTestCase } /** - * Raw Function to call api with Token + * Raw Function to call api with Token. * * @param \App\Models\Service $service * @param string $method @@ -63,7 +66,7 @@ class ApiBase extends BaseTestCase string $uri, array $data = [], array $headers = [] - ): TestResponse { + ): \Illuminate\Testing\TestResponse { $data['bearer_token'] = $service->bearer_token; $data['timestamp'] = \gmdate('Y-m-d H:i:s'); @@ -78,7 +81,7 @@ class ApiBase extends BaseTestCase } /** - * Get Customer models with given status (active or not) + * Get Customer models with given status (active or not). * * @param boolean $status The customer status for a brand. * @param boolean $random Randomize the customer to get. diff --git a/tests/CRM/ApiV4/ApiTest.php b/tests/CRM/ApiV4/ApiTest.php index 82a5c4c..b7bb989 100644 --- a/tests/CRM/ApiV4/ApiTest.php +++ b/tests/CRM/ApiV4/ApiTest.php @@ -19,7 +19,7 @@ class ApiTest extends ApiBase * * @return void */ - public function testOnlyJsonCallsAreHandled() + public function testOnlyJsonCallsAreHandled(): void { $response = $this->call('get', route('apiV4.ping'), [ 'timestamp' => \gmdate('Y-m-d H:i:s') @@ -32,7 +32,7 @@ class ApiTest extends ApiBase * * @return void */ - public function testTimestampMiddleware() + public function testTimestampMiddleware(): void { $response = $this->json('get', route('apiV4.ping'), [ 'timestamp' => \gmdate('Y-m-d H:i:s') @@ -46,13 +46,13 @@ class ApiTest extends ApiBase * * @return void */ - public function testTimestampMiddlewareCheckFailMissing() + public function testTimestampMiddlewareCheckFailMissing(): void { $response = $this->json('get', route('apiV4.ping'), []); $json = $response->decodeResponseJson(); $this->assertApiResponseStatusIs($json, ApiStatus::KO); $json->assertFragment(['data' => [ - 'code' => ApiError::wrongTimeStamp->value(), + 'code' => ApiError::wrongTimeStamp->value(), 'message' => ApiError::wrongTimeStamp->label() ]]); } @@ -62,13 +62,13 @@ class ApiTest extends ApiBase * * @return void */ - public function testTimestampMiddlewareCheckFailWrongFormat() + public function testTimestampMiddlewareCheckFailWrongFormat(): void { $response = $this->json('get', route('apiV4.ping'), ['timestamp' => \gmdate('Y/m/d')]); $json = $response->decodeResponseJson(); $this->assertApiResponseStatusIs($json, ApiStatus::KO); $json->assertFragment(['data' => [ - 'code' => ApiError::wrongTimeStamp->value(), + 'code' => ApiError::wrongTimeStamp->value(), 'message' => ApiError::wrongTimeStamp->label() ]]); } @@ -78,7 +78,7 @@ class ApiTest extends ApiBase * * @return void */ - public function testTimestampMiddlewareCheckFailIfTooOld() + public function testTimestampMiddlewareCheckFailIfTooOld(): void { $response = $this->json('get', route('apiV4.ping'), [ 'timestamp' => \gmdate('Y-m-d H:i:s', \time() - config('api.timestampTimeout', 10)) @@ -98,7 +98,7 @@ class ApiTest extends ApiBase * * @return void */ - public function testApiThrottle() + public function testApiThrottle(): void { for ($i = config('api.apiRequestRatePerMinute', 100); $i >= 0; $i--) { $this->json('get', route('apiV4.ping'), [ @@ -115,11 +115,11 @@ class ApiTest extends ApiBase } /** - * Test wrong http method call + * Test wrong http method call. * * @return void */ - public function testWrongMethodCall() + public function testWrongMethodCall(): void { $response = $this->json('post', route('apiV4.ping'), [ 'timestamp' => \gmdate('Y-m-d H:i:s', \time()) @@ -130,11 +130,11 @@ class ApiTest extends ApiBase } /** - * Test Auth fail when no token + * Test Auth fail when no token. * * @return void */ - public function testAuthFailNoToken() + public function testAuthFailNoToken(): void { $response = $this->json('get', route('apiV4.customers.show', [ 'serviceCustomer' => Str::uuid() @@ -147,17 +147,17 @@ class ApiTest extends ApiBase } /** - * Test Auth fail when unknown token + * Test Auth fail when unknown token. * * @return void */ - public function testAuthFailUnknownToken() + public function testAuthFailUnknownToken(): void { $response = $this->json('get', route('apiV4.customers.show', [ 'serviceCustomer' => Str::uuid() ]), [ 'bearer_token' => 'qsdqsdqsd', - 'timestamp' => \gmdate('Y-m-d H:i:s', \time()) + 'timestamp' => \gmdate('Y-m-d H:i:s', \time()) ]); $json = $response->decodeResponseJson(); $this->assertApiResponseStatusIs($json, ApiStatus::KO); @@ -165,19 +165,19 @@ class ApiTest extends ApiBase } /** - * Test Auth fail when wrong signature + * Test Auth fail when wrong signature. * * @return void */ - public function testAuthFailWrongSignature() + public function testAuthFailWrongSignature(): void { $service = Service::query()->firstOrFail(); $response = $this->json('get', route('apiV4.customers.show', [ 'serviceCustomer' => Str::uuid() ]), [ 'bearer_token' => $service->bearer_token, - 'timestamp' => \gmdate('Y-m-d H:i:s', \time()), - 'signature' => 'sdqdqsdqd' + 'timestamp' => \gmdate('Y-m-d H:i:s', \time()), + 'signature' => 'sdqdqsdqd' ]); $json = $response->decodeResponseJson(); $this->assertApiResponseStatusIs($json, ApiStatus::KO); diff --git a/tests/CRM/ApiV4/ArcadiaTest.php b/tests/CRM/ApiV4/ArcadiaTest.php index 0b9f9c1..c781959 100644 --- a/tests/CRM/ApiV4/ArcadiaTest.php +++ b/tests/CRM/ApiV4/ArcadiaTest.php @@ -19,27 +19,27 @@ class ArcadiaTest extends ApiBase * * @return void */ - public function testArcadiaSendOrderDefault() + public function testArcadiaSendOrderDefault(): void { extract($this->getCustomer()); $data = [ 'deliver' => [ - 'email' => $customer->email, + 'email' => $customer->email, 'firstname' => $info->firstname, - 'lastname' => $info->lastname, - 'phone' => $info->phone, - 'address' => $info->address, - 'address2' => $info->address2, - 'city' => $info->city, - 'postcode' => $info->postcode, + 'lastname' => $info->lastname, + 'phone' => $info->phone, + 'address' => $info->address, + 'address2' => $info->address2, + 'city' => $info->city, + 'postcode' => $info->postcode, ], - 'operation' => 16, - 'label_type_support' => 'Send Departaimants', - 'order_date' => \date('Y/m/d H:i:s'), - 'state_order' => ArcadiaOrderType::cb->value, - 'support_code' => 1, - 'label_type_support' => 'Fond carte Aimanté', - 'order_num' => 23, + 'operation' => 16, + 'label_type_support' => 'Send Departaimants', + 'order_date' => \date('Y/m/d H:i:s'), + 'state_order' => ArcadiaOrderType::cb->value, + 'support_code' => 1, + 'label_type_support' => 'Fond carte Aimanté', + 'order_num' => 23, 'package_unit_weight' => 0, ]; $response = $this->callApiWithToken($service, 'post', route( @@ -56,26 +56,26 @@ class ArcadiaTest extends ApiBase * * @return void */ - public function testArcadiaSendOrderGame() + public function testArcadiaSendOrderGame(): void { extract($this->getCustomer()); $data = [ - 'deliver' => [ - 'email' => $customer->email, + 'deliver' => [ + 'email' => $customer->email, 'firstname' => $info->firstname, - 'lastname' => $info->lastname, - 'phone' => $info->phone, - 'address' => $info->address, - 'address2' => $info->address2, - 'city' => $info->city, - 'postcode' => $info->postcode, + 'lastname' => $info->lastname, + 'phone' => $info->phone, + 'address' => $info->address, + 'address2' => $info->address2, + 'city' => $info->city, + 'postcode' => $info->postcode, ], - 'operation' => 16, - 'order_date' => date('Y/m/d H:i:s'), - 'support_code' => 32, + 'operation' => 16, + 'order_date' => date('Y/m/d H:i:s'), + 'support_code' => 32, 'label_type_support' => 'Jeux Reghalal', - 'code_unique' => \strtoupper(\str_replace('-', '', (string)Str::uuid())), - 'code_on_pack' => '2563547' + 'code_unique' => \strtoupper(\str_replace('-', '', (string)Str::uuid())), + 'code_on_pack' => '2563547' ]; $response = $this->callApiWithToken($service, 'post', route( 'apiV4.arcadia.outgoingMailGame', diff --git a/tests/CRM/ApiV4/CustomerTest.php b/tests/CRM/ApiV4/CustomerTest.php index 0c74a45..6bbe7c6 100644 --- a/tests/CRM/ApiV4/CustomerTest.php +++ b/tests/CRM/ApiV4/CustomerTest.php @@ -25,7 +25,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testCustomerRelations() + public function testCustomerRelations(): void { extract($this->getCustomer()); $infos = $customer->infos; @@ -46,7 +46,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiAuthenticateCustomerShouldWork() + public function testApiAuthenticateCustomerShouldWork(): void { extract($this->getCustomer(true)); @@ -58,7 +58,7 @@ class CustomerTest extends ApiBase 'post', route('apiV4.customers.authenticate', []), [ - 'email' => $customer->email, + 'email' => $customer->email, 'password' => 'testPassword' ] ); @@ -84,7 +84,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiAuthenticateCustomerShouldFailIfWrongPassword() + public function testApiAuthenticateCustomerShouldFailIfWrongPassword(): void { extract($this->getCustomer()); $response = $this->callApiWithToken( @@ -92,7 +92,7 @@ class CustomerTest extends ApiBase 'post', route('apiV4.customers.authenticate', []), [ - 'email' => $customer->email, + 'email' => $customer->email, 'password' => 'azdqdqdazd' ] ); @@ -113,7 +113,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiAuthenticateCustomerShouldFailIfWrongEmail() + public function testApiAuthenticateCustomerShouldFailIfWrongEmail(): void { extract($this->getCustomer()); $response = $this->callApiWithToken( @@ -121,7 +121,7 @@ class CustomerTest extends ApiBase 'post', route('apiV4.customers.authenticate', []), [ - 'email' => 'wrongemail@hotmail.fr', + 'email' => 'wrongemail@hotmail.fr', 'password' => 'azdqdqdazd' ] ); @@ -142,7 +142,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiAuthenticateCustomerShouldFailIfCustomerNotActivated() + public function testApiAuthenticateCustomerShouldFailIfCustomerNotActivated(): void { $login = CustomerLogin::query()->where('status', false)->firstOrFail(); /** @var \App\Models\Brand $brand */ @@ -177,7 +177,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiStoreCustomerOk() + public function testApiStoreCustomerOk(): void { extract($this->getCustomer()); @@ -230,22 +230,22 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiStoreCustomerShouldFailIfCustomerAlreadyExists() + public function testApiStoreCustomerShouldFailIfCustomerAlreadyExists(): void { extract($this->getCustomer()); $data = [ - 'firstname' => 'Jean', - 'lastname' => 'Bond', + 'firstname' => 'Jean', + 'lastname' => 'Bond', 'birth_date' => \date('1992-03-08'), - 'address' => '10 rue des toto', - 'email' => 'newcustomer@hotmail.fr', - 'password' => '123.Mot.De.P4sse', - 'phone' => '+33654821562', - 'country' => Country::france->value(), - 'city' => 'Connerré', - 'postcode' => '72160', - 'opt_in' => true + 'address' => '10 rue des toto', + 'email' => 'newcustomer@hotmail.fr', + 'password' => '123.Mot.De.P4sse', + 'phone' => '+33654821562', + 'country' => Country::france->value(), + 'city' => 'Connerré', + 'postcode' => '72160', + 'opt_in' => true ]; $this->createNewCustomer($data, $brand); @@ -264,21 +264,21 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiStoreCustomerValidationFailures() + public function testApiStoreCustomerValidationFailures(): void { extract($this->getCustomer()); $data = [ - 'firstname' => 'Jean', - 'lastname' => 'Bond', + 'firstname' => 'Jean', + 'lastname' => 'Bond', 'birth_date' => \date('1992-03-08'), - 'address' => '10 rue des toto', - 'email' => 'newcustomer.failures@hotmail.fr', - 'password' => '123.Mot.De.P4sse', - 'phone' => '+33654821562', - 'country' => Country::france->value(), - 'city' => 'Connerré', - 'postcode' => '72160', - 'opt_in' => true + 'address' => '10 rue des toto', + 'email' => 'newcustomer.failures@hotmail.fr', + 'password' => '123.Mot.De.P4sse', + 'phone' => '+33654821562', + 'country' => Country::france->value(), + 'city' => 'Connerré', + 'postcode' => '72160', + 'opt_in' => true ]; $sendData = $data; @@ -343,12 +343,12 @@ class CustomerTest extends ApiBase } /** - * Test activate customer ok + * Test activate customer ok. * route: apiV4.customers.activate * * @return void */ - public function testActivateCustomerOk() + public function testActivateCustomerOk(): void { extract($this->getCustomer(false)); @@ -364,12 +364,12 @@ class CustomerTest extends ApiBase } /** - * Test activate customer already activated + * Test activate customer already activated. * route: apiV4.customers.activate * * @return void */ - public function testActivateCustomerAlreadyActivated() + public function testActivateCustomerAlreadyActivated(): void { extract($this->getCustomer(true)); @@ -387,40 +387,40 @@ class CustomerTest extends ApiBase } /** - * Test customer update ok + * Test customer update ok. * route: apiV4.customers.update * * @return void */ - public function testApiUpdateCustomerOk() + public function testApiUpdateCustomerOk(): void { extract($this->getCustomer()); $data = [ - 'firstname' => 'Jean2', - 'lastname' => 'Bond2', + 'firstname' => 'Jean2', + 'lastname' => 'Bond2', 'birth_date' => \date('1992-03-09'), - 'address' => '10 rue des toto', - 'email' => 'newcustomertoupdate@hotmail.fr', - 'password' => '123.Mot.De.P4sseNew', - 'phone' => '+33654821563', - 'country' => Country::luxembourg->value(), - 'city' => 'Connerré2', - 'postcode' => '72161', - 'opt_in' => 0 + 'address' => '10 rue des toto', + 'email' => 'newcustomertoupdate@hotmail.fr', + 'password' => '123.Mot.De.P4sseNew', + 'phone' => '+33654821563', + 'country' => Country::luxembourg->value(), + 'city' => 'Connerré2', + 'postcode' => '72161', + 'opt_in' => 0 ]; $newdata = [ - 'firstname' => 'Jean3', - 'lastname' => 'Bond3', + 'firstname' => 'Jean3', + 'lastname' => 'Bond3', 'birth_date' => \date('1992-03-07'), - 'address' => '10 rue des toto3', - 'email' => 'newcustomertoupdate3@hotmail.fr', - 'password' => '123.Mot.De.P4sseNew3', - 'phone' => '+33654821564', - 'country' => Country::france->value(), - 'city' => 'Connerré3', - 'postcode' => '72163', - 'opt_in' => 1 + 'address' => '10 rue des toto3', + 'email' => 'newcustomertoupdate3@hotmail.fr', + 'password' => '123.Mot.De.P4sseNew3', + 'phone' => '+33654821564', + 'country' => Country::france->value(), + 'city' => 'Connerré3', + 'postcode' => '72163', + 'opt_in' => 1 ]; $this->createNewCustomer($data, $brand); @@ -460,26 +460,26 @@ class CustomerTest extends ApiBase } /** - * Test customer update should fail if no changes are provided + * Test customer update should fail if no changes are provided. * route: apiV4.customers.update * * @return void */ - public function testApiUpdateCustomerShouldFailWhenNothingChanges() + public function testApiUpdateCustomerShouldFailWhenNothingChanges(): void { extract($this->getCustomer()); $data = [ - 'firstname' => 'Jean2', - 'lastname' => 'Bond2', + 'firstname' => 'Jean2', + 'lastname' => 'Bond2', 'birth_date' => \date('1992-03-09'), - 'address' => '10 rue des toto', - 'email' => 'anewcustomertoupdate@hotmail.fr', - 'password' => '123.Mot.De.P4sseNew', - 'phone' => '+33654821563', - 'country' => Country::luxembourg->value(), - 'city' => 'Connerré2', - 'postcode' => '72161', - 'opt_in' => 0 + 'address' => '10 rue des toto', + 'email' => 'anewcustomertoupdate@hotmail.fr', + 'password' => '123.Mot.De.P4sseNew', + 'phone' => '+33654821563', + 'country' => Country::luxembourg->value(), + 'city' => 'Connerré2', + 'postcode' => '72161', + 'opt_in' => 0 ]; $this->createNewCustomer($data, $brand); @@ -494,12 +494,12 @@ class CustomerTest extends ApiBase } /** - * Test customer show ok + * Test customer show ok. * route: apiV4.customers.show * * @return void */ - public function testApiGetCustomerOk() + public function testApiGetCustomerOk(): void { extract($this->getCustomer()); @@ -522,12 +522,12 @@ class CustomerTest extends ApiBase } /** - * Test customer show using email ok + * Test customer show using email ok. * route: apiV4.customers.show * * @return void */ - public function testApiGetCustomerByEmailOk() + public function testApiGetCustomerByEmailOk(): void { extract($this->getCustomer()); @@ -550,12 +550,12 @@ class CustomerTest extends ApiBase } /** - * Test customer show not found + * Test customer show not found. * route: apiV4.customers.show * * @return void */ - public function testApiGetCustomerNotFound() + public function testApiGetCustomerNotFound(): void { extract($this->getCustomer()); $csClassName = \array_slice(explode('\\', get_class($customer)), -1)[0]; @@ -587,7 +587,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiDestroyCustomer() + public function testApiDestroyCustomer(): void { extract($this->getCustomer()); $csClassName = \array_slice(explode('\\', get_class($customer)), -1)[0]; @@ -620,7 +620,7 @@ class CustomerTest extends ApiBase * * @return void */ - public function testApiCompletelyDestroyCustomer() + public function testApiCompletelyDestroyCustomer(): void { $customer = Customer::whereHas('logins', null, '>', 1)->firstOrFail(); @@ -672,13 +672,13 @@ class CustomerTest extends ApiBase } /** - * Make sute a customer exists and contains data + * Make sute a customer exists and contains data. * * @param array $data * @param \App\Models\Brand $brand * @return void */ - private function createNewCustomer(array $data, Brand $brand) + private function createNewCustomer(array $data, Brand $brand): void { $customer = Customer::whereEmail($data['email']) ->whereHas('brands', function ($q) use ($brand) { diff --git a/tests/CRM/ApiV4/QuestionTest.php b/tests/CRM/ApiV4/QuestionTest.php index 85c54e7..3106502 100644 --- a/tests/CRM/ApiV4/QuestionTest.php +++ b/tests/CRM/ApiV4/QuestionTest.php @@ -16,7 +16,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testQuestionIndex() + public function testQuestionIndex(): void { extract($this->getCustomer()); @@ -66,7 +66,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testQuestionIndexWithAnswers() + public function testQuestionIndexWithAnswers(): void { extract($this->getCustomer(true, false)); @@ -141,7 +141,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testQuestionIndexWithAnswersWhenCustomerNotFound() + public function testQuestionIndexWithAnswersWhenCustomerNotFound(): void { extract($this->getCustomer(true, false)); $service = Service::whereHas('brand', function ($q) use ($brand) { @@ -162,7 +162,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testCustomerUnAnsweredIndex() + public function testCustomerUnAnsweredIndex(): void { extract($this->getCustomer(true, false)); @@ -237,7 +237,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testUnAnsweredIndexWhenCustomerNotFound() + public function testUnAnsweredIndexWhenCustomerNotFound(): void { extract($this->getCustomer(true, false)); $service = Service::whereHas('brand', function ($q) use ($brand) { @@ -258,7 +258,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testQuestionSetAnswer() + public function testQuestionSetAnswer(): void { extract($this->getCustomer(true, false)); $question = Question::whereHas('brand', function ($q) use ($brand) { @@ -275,7 +275,7 @@ class QuestionTest extends ApiBase ['serviceCustomer' => $info->hashcode] ), [ 'question' => $question->id, - 'answers' => [$answer->id] + 'answers' => [$answer->id] ]); $json = $response->decodeResponseJson(); $this->assertApiResponseStatusIs($json, ApiStatus::OK); @@ -293,7 +293,7 @@ class QuestionTest extends ApiBase * * @return void */ - public function testQuestionSetAnswerWhenCustomerNotFound() + public function testQuestionSetAnswerWhenCustomerNotFound(): void { extract($this->getCustomer(true, false)); $service = Service::whereHas('brand', function ($q) use ($brand) { diff --git a/tests/CRM/ApiV4/SingleOptinTest.php b/tests/CRM/ApiV4/SingleOptinTest.php index e1ef010..b466bda 100644 --- a/tests/CRM/ApiV4/SingleOptinTest.php +++ b/tests/CRM/ApiV4/SingleOptinTest.php @@ -16,17 +16,17 @@ class SingleOptinTest extends ApiBase use DatabaseTransactions; /** - * Test set single optin on + * Test set single optin on. * route: apiV4.optin * * @return void */ - public function testSetSingleOptinOn() + public function testSetSingleOptinOn(): void { $service = Service::firstOrFail(); $response = $this->callApiWithToken($service, 'post', route('apiV4.optin'), [ - 'email' => 'singleoptin@hotmail.fr', + 'email' => 'singleoptin@hotmail.fr', 'opt_in' => 1 ]); $json = $response->decodeResponseJson(); @@ -38,17 +38,17 @@ class SingleOptinTest extends ApiBase } /** - * Test set single optin off + * Test set single optin off. * route: apiV4.optin * * @return void */ - public function testSetSingleOptinOff() + public function testSetSingleOptinOff(): void { $service = Service::firstOrFail(); $response = $this->callApiWithToken($service, 'post', route('apiV4.optin'), [ - 'email' => 'singleoptin@hotmail.fr', + 'email' => 'singleoptin@hotmail.fr', 'opt_in' => 0 ]); $json = $response->decodeResponseJson(); @@ -65,7 +65,7 @@ class SingleOptinTest extends ApiBase * * @return void */ - public function testSingleOptinShouldFailIfCustomerExists() + public function testSingleOptinShouldFailIfCustomerExists(): void { $service = Service::firstOrFail(); $this->storeCustomer($service); @@ -77,7 +77,7 @@ class SingleOptinTest extends ApiBase $singleOptin->saveOrFail(); $response = $this->callApiWithToken($service, 'post', route('apiV4.optin'), [ - 'email' => 'singleoptin@hotmail.fr', + 'email' => 'singleoptin@hotmail.fr', 'opt_in' => 1 ]); @@ -88,12 +88,12 @@ class SingleOptinTest extends ApiBase } /** - * Test set single optin off using hashcode + * Test set single optin off using hashcode. * route: apiV4.optout-hashcode * * @return void */ - public function testSetSingleOptoutWithHashcode() + public function testSetSingleOptoutWithHashcode(): void { $service = Service::firstOrFail(); @@ -116,12 +116,12 @@ class SingleOptinTest extends ApiBase } /** - * Test set single optin off using hashcode fails if does not exists + * Test set single optin off using hashcode fails if does not exists. * route: apiV4.optout-hashcode * * @return void */ - public function testSetSingleOptoutWithHashcodeFailsIfDoesNotExists() + public function testSetSingleOptoutWithHashcodeFailsIfDoesNotExists(): void { $service = Service::firstOrFail(); @@ -144,25 +144,25 @@ class SingleOptinTest extends ApiBase } /** - * Store a customer in DB + * Store a customer in DB. * * @param \App\Models\Service $service * @return void */ - private function storeCustomer(Service $service) + private function storeCustomer(Service $service): void { $data = [ - 'firstname' => 'Jean', - 'lastname' => 'Bond', + 'firstname' => 'Jean', + 'lastname' => 'Bond', 'birth_date' => \date('1992-03-08'), - 'address' => '10 rue des totos', - 'email' => 'singleoptin@hotmail.fr', - 'password' => '123.Mot.De.P4sse', - 'phone' => '+33654821562', - 'country' => Country::france->value, - 'city' => 'Connerré', - 'postcode' => '72160', - 'opt_in' => true + 'address' => '10 rue des totos', + 'email' => 'singleoptin@hotmail.fr', + 'password' => '123.Mot.De.P4sse', + 'phone' => '+33654821562', + 'country' => Country::france->value, + 'city' => 'Connerré', + 'postcode' => '72160', + 'opt_in' => true ]; $this->callApiWithToken($service, 'post', route('apiV4.customers.store'), $data); } diff --git a/tests/CRM/ApiV4/StatsTest.php b/tests/CRM/ApiV4/StatsTest.php index bc2ef0b..d2f5c3a 100644 --- a/tests/CRM/ApiV4/StatsTest.php +++ b/tests/CRM/ApiV4/StatsTest.php @@ -23,13 +23,13 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByBrand() + public function testStatsByBrand(): void { $service = Service::firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV4.stats.brandStats'), [ 'start' => Carbon::now()->subMonths(3)->isoFormat('YYYY-MM-DD'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); @@ -57,13 +57,13 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByBrandShouldFailWithInvalidDate() + public function testStatsByBrandShouldFailWithInvalidDate(): void { $service = Service::firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV4.stats.brandStats'), [ 'start' => Carbon::now()->subMonths(3)->subDay()->isoFormat('YYYY-MM-DD'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); @@ -77,13 +77,13 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByBrandShouldFailWithInvalidDateFormat() + public function testStatsByBrandShouldFailWithInvalidDateFormat(): void { $service = Service::firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV4.stats.brandStats'), [ 'start' => Carbon::now()->subMonths(3)->subDay()->isoFormat('YYYY-MM-DD HH:mmDD'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); @@ -97,7 +97,7 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByQuestion() + public function testStatsByQuestion(): void { $service = Service::firstOrFail(); $question = Question::whereBrandId($service->brand->id)->firstOrFail(); @@ -116,7 +116,7 @@ class StatsTest extends ApiBase $response = $this->callApiWithToken($service, 'get', route('apiV4.stats.questionStats', $question), [ 'start' => $start->isoFormat('YYYY-MM-DD'), - 'end' => $end->isoFormat('YYYY-MM-DD') + 'end' => $end->isoFormat('YYYY-MM-DD') ]); $datesIndexes = []; @@ -139,7 +139,7 @@ class StatsTest extends ApiBase 'answer' ] ], - 'stats' => $datesIndexes + 'stats' => $datesIndexes ] ]); } @@ -150,14 +150,14 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByQuestionShouldFailWithInvalidQuestion() + public function testStatsByQuestionShouldFailWithInvalidQuestion(): void { $service = Service::firstOrFail(); $question = Question::where('brand_id', '!=', $service->brand->id)->firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV4.stats.questionStats', $question), [ 'start' => Carbon::now()->subMonths(3)->subDay()->isoFormat('YYYY-MM-DD'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); @@ -171,14 +171,14 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByQuestionShouldFailWithInvalidDate() + public function testStatsByQuestionShouldFailWithInvalidDate(): void { $service = Service::firstOrFail(); $question = Question::whereBrandId($service->brand->id)->firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV4.stats.questionStats', $question), [ 'start' => Carbon::now()->subMonths(3)->subDay()->isoFormat('YYYY-MM-DD'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); @@ -192,14 +192,14 @@ class StatsTest extends ApiBase * * @return void */ - public function testStatsByQuestionShouldFailWithInvalidDateFormat() + public function testStatsByQuestionShouldFailWithInvalidDateFormat(): void { $service = Service::firstOrFail(); $question = Question::whereBrandId($service->brand->id)->firstOrFail(); $response = $this->callApiWithToken($service, 'get', route('apiV4.stats.questionStats', $question), [ 'start' => Carbon::now()->subMonths(3)->isoFormat('YYYY-MM Ddh'), - 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') + 'end' => Carbon::now()->isoFormat('YYYY-MM-DD') ]); $json = $response->decodeResponseJson(); diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index ab92402..e4c5d32 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -11,7 +11,7 @@ trait CreatesApplication * * @return \Illuminate\Foundation\Application */ - public function createApplication() + public function createApplication(): \Illuminate\Foundation\Application { $app = require __DIR__ . '/../bootstrap/app.php'; diff --git a/tests/StressTest/RunMultipleRequestsTest.php b/tests/StressTest/RunMultipleRequestsTest.php index 52de2ac..b72077c 100644 --- a/tests/StressTest/RunMultipleRequestsTest.php +++ b/tests/StressTest/RunMultipleRequestsTest.php @@ -54,7 +54,7 @@ class RunMultipleRequestsTest extends TestCase * * @return void */ - public function testSpamSingleOptin() + public function testSpamSingleOptin(): void { for ($i = 35; $i >= 0; $i--) { $this->assertTrue(SingleOptin::setStatus('singleoptinteststress@gmail.com', (bool)rand(0, 1))); @@ -66,7 +66,7 @@ class RunMultipleRequestsTest extends TestCase * * @return void */ - public function testSpamCustomerGet() + public function testSpamCustomerGet(): void { for ($i = 35; $i >= 0; $i--) { $this->assertIsObject(Customer::find(self::$info->hashcode)); @@ -78,7 +78,7 @@ class RunMultipleRequestsTest extends TestCase * * @return void */ - public function testSpamQuestionsGet() + public function testSpamQuestionsGet(): void { for ($i = 35; $i >= 0; $i--) { $this->assertIsArray(Question::all()); @@ -90,7 +90,7 @@ class RunMultipleRequestsTest extends TestCase * * @return void */ - public function testSpamCustomerGets() + public function testSpamCustomerGets(): void { for ($i = 35; $i >= 0; $i--) { $this->assertIsObject(Customer::findWithEmail(self::$customer->email)); @@ -98,10 +98,12 @@ class RunMultipleRequestsTest extends TestCase } /** + * Get a customer. + * * @param boolean $status * @return array */ - protected static function getCustomer(bool $status = true) + protected static function getCustomer(bool $status = true): array { /** @var \App\Models\Costumer $customer */ $customer = ModelsCustomer::whereHas('logins', function ($q) use ($status) {