diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9bf527e..7ca6918 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -32,6 +32,10 @@ jobs: run: | composer install --no-interaction --prefer-dist --no-progress --no-suggest + - name: Check code formatting with PHP CS Fixer + run: | + vendor/bin/php-cs-fixer fix --dry-run --diff --ansi + - name: Check quality code with PHPInsights run: | vendor/bin/phpinsights -n --ansi --format=github-action diff --git a/app/Http/Controllers/WelcomeController.php b/app/Http/Controllers/WelcomeController.php index 18a8fdd..a23f23d 100644 --- a/app/Http/Controllers/WelcomeController.php +++ b/app/Http/Controllers/WelcomeController.php @@ -4,8 +4,8 @@ namespace App\Http\Controllers; -use Phenix\Http\Response; use Phenix\Http\Controller; +use Phenix\Http\Response; class WelcomeController extends Controller { diff --git a/app/Http/Middleware/HandleCors.php b/app/Http/Middleware/HandleCors.php index c9f5564..1664677 100644 --- a/app/Http/Middleware/HandleCors.php +++ b/app/Http/Middleware/HandleCors.php @@ -8,5 +8,4 @@ class HandleCors extends HandleCorsBase { - } diff --git a/composer.json b/composer.json index 1d9d037..68c5d7c 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require": { "php": "^8.2", "ext-pcntl": "*", - "phenixphp/framework": "^0.5.1" + "phenixphp/framework": "^0.5.2" }, "require-dev": { "amphp/phpunit-util": "^v3.0.0", diff --git a/composer.lock b/composer.lock index 04f0f85..fa1276d 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": "12678b8ca569b08e5a39bea562a402ad", + "content-hash": "fa526c576a1c4753394c6ac3820d4f9c", "packages": [ { "name": "adbario/php-dot-notation", @@ -690,16 +690,16 @@ }, { "name": "amphp/http-server", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/amphp/http-server.git", - "reference": "027bd022ee76927bf1b9f0c188744af461ea9f0d" + "reference": "c60cde9a1e331f539b7ef5a7705f42092e646f90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/http-server/zipball/027bd022ee76927bf1b9f0c188744af461ea9f0d", - "reference": "027bd022ee76927bf1b9f0c188744af461ea9f0d", + "url": "https://api.github.com/repos/amphp/http-server/zipball/c60cde9a1e331f539b7ef5a7705f42092e646f90", + "reference": "c60cde9a1e331f539b7ef5a7705f42092e646f90", "shasum": "" }, "require": { @@ -775,7 +775,7 @@ ], "support": { "issues": "https://github.com/amphp/http-server/issues", - "source": "https://github.com/amphp/http-server/tree/v3.4.1" + "source": "https://github.com/amphp/http-server/tree/v3.4.2" }, "funding": [ { @@ -783,7 +783,7 @@ "type": "github" } ], - "time": "2024-12-16T01:30:20+00:00" + "time": "2024-12-31T16:35:28+00:00" }, { "name": "amphp/http-server-form-parser", @@ -947,6 +947,82 @@ ], "time": "2023-08-05T19:16:57+00:00" }, + { + "name": "amphp/http-server-session", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/http-server-session.git", + "reference": "88ee2106cd79a21f225bb631f8686d509002c11b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/http-server-session/zipball/88ee2106cd79a21f225bb631f8686d509002c11b", + "reference": "88ee2106cd79a21f225bb631f8686d509002c11b", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/cache": "^2", + "amphp/http": "^2", + "amphp/http-server": "^3", + "amphp/serialization": "^1", + "amphp/sync": "^2", + "paragonie/constant_time_encoding": "^2.2", + "php": ">=8.1" + }, + "conflict": { + "amphp/redis": "<2 || >=3" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "amphp/redis": "^2", + "league/uri": "^6", + "phpunit/phpunit": "^9", + "psalm/phar": "^5" + }, + "suggest": { + "amphp/redis": "Allows storing session data in Redis" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Http\\Server\\Session\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": " An HTTP server plugin that simplifies session management for your applications. Effortlessly handle user sessions, securely managing data across requests.", + "homepage": "https://amphp.org/http-server-session", + "support": { + "issues": "https://github.com/amphp/http-server-session/issues", + "source": "https://github.com/amphp/http-server-session/tree/v3.0.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2023-08-20T17:32:14+00:00" + }, { "name": "amphp/log", "version": "v2.0.0", @@ -1444,6 +1520,87 @@ ], "time": "2024-04-19T03:13:44+00:00" }, + { + "name": "amphp/redis", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/redis.git", + "reference": "679350556def8f8b412a15a4b82651c4a5caa597" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/redis/zipball/679350556def8f8b412a15a4b82651c4a5caa597", + "reference": "679350556def8f8b412a15a4b82651c4a5caa597", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", + "amphp/parser": "^1", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "amphp/socket": "^2", + "amphp/sync": "^2", + "league/uri": "^6.5|^7", + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "revolt/event-loop": "^1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "amphp/process": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "5.22" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php", + "src/Internal/functions.php" + ], + "psr-4": { + "Amp\\Redis\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.", + "homepage": "https://amphp.org/redis", + "keywords": [ + "amp", + "amphp", + "async", + "client", + "redis", + "revolt" + ], + "support": { + "issues": "https://github.com/amphp/redis/issues", + "source": "https://github.com/amphp/redis/tree/v2.0.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-08-03T18:48:06+00:00" + }, { "name": "amphp/serialization", "version": "v1.0.0", @@ -2267,16 +2424,16 @@ }, { "name": "egulias/email-validator", - "version": "4.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e" + "reference": "b115554301161fa21467629f1e1391c1936de517" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b115554301161fa21467629f1e1391c1936de517", + "reference": "b115554301161fa21467629f1e1391c1936de517", "shasum": "" }, "require": { @@ -2322,7 +2479,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.2" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.3" }, "funding": [ { @@ -2330,7 +2487,7 @@ "type": "github" } ], - "time": "2023-10-06T06:47:41+00:00" + "time": "2024-12-27T00:36:43+00:00" }, { "name": "fakerphp/faker", @@ -2958,16 +3115,16 @@ }, { "name": "nesbot/carbon", - "version": "3.8.3", + "version": "3.8.4", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "f01cfa96468f4c38325f507ab81a4f1d2cd93cfe" + "reference": "129700ed449b1f02d70272d2ac802357c8c30c58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f01cfa96468f4c38325f507ab81a4f1d2cd93cfe", - "reference": "f01cfa96468f4c38325f507ab81a4f1d2cd93cfe", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/129700ed449b1f02d70272d2ac802357c8c30c58", + "reference": "129700ed449b1f02d70272d2ac802357c8c30c58", "shasum": "" }, "require": { @@ -3060,7 +3217,7 @@ "type": "tidelift" } ], - "time": "2024-12-21T18:03:19+00:00" + "time": "2024-12-27T09:25:35+00:00" }, { "name": "nikic/fast-route", @@ -3112,30 +3269,100 @@ }, "time": "2018-02-13T20:26:39+00:00" }, + { + "name": "paragonie/constant_time_encoding", + "version": "v2.7.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105", + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105", + "shasum": "" + }, + "require": { + "php": "^7|^8" + }, + "require-dev": { + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "time": "2024-05-08T12:18:48+00:00" + }, { "name": "phenixphp/framework", - "version": "0.5.1", + "version": "0.5.2", "source": { "type": "git", "url": "https://github.com/phenixphp/framework.git", - "reference": "68548860670d9e2b78277b1cfd0d570b9cdf2454" + "reference": "066d5bd27e309a09c78c2b0f7db0b747ea3c184a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phenixphp/framework/zipball/68548860670d9e2b78277b1cfd0d570b9cdf2454", - "reference": "68548860670d9e2b78277b1cfd0d570b9cdf2454", + "url": "https://api.github.com/repos/phenixphp/framework/zipball/066d5bd27e309a09c78c2b0f7db0b747ea3c184a", + "reference": "066d5bd27e309a09c78c2b0f7db0b747ea3c184a", "shasum": "" }, "require": { "adbario/php-dot-notation": "^3.1", + "amphp/cache": "^2.0", "amphp/file": "^v3.0.0", "amphp/http-client": "^v5.0.1", "amphp/http-server": "^v3.2.0", "amphp/http-server-form-parser": "^2.0", "amphp/http-server-router": "^v2.0.0", + "amphp/http-server-session": "^3.0", "amphp/log": "^v2.0.0", "amphp/mysql": "^v3.0.0", "amphp/postgres": "v2.0.0", + "amphp/redis": "^2.0", "amphp/socket": "^2.1.0", "egulias/email-validator": "^4.0", "ext-pcntl": "*", @@ -3191,9 +3418,9 @@ "description": "Phenix framework based on Amphp", "support": { "issues": "https://github.com/phenixphp/framework/issues", - "source": "https://github.com/phenixphp/framework/tree/0.5.1" + "source": "https://github.com/phenixphp/framework/tree/0.5.2" }, - "time": "2024-12-24T17:45:32+00:00" + "time": "2025-01-03T16:51:53+00:00" }, { "name": "phenixphp/http-cors", @@ -4016,16 +4243,16 @@ }, { "name": "symfony/console", - "version": "v6.4.15", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd" + "reference": "799445db3f15768ecc382ac5699e6da0520a0a04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", - "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", + "url": "https://api.github.com/repos/symfony/console/zipball/799445db3f15768ecc382ac5699e6da0520a0a04", + "reference": "799445db3f15768ecc382ac5699e6da0520a0a04", "shasum": "" }, "require": { @@ -4090,7 +4317,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.15" + "source": "https://github.com/symfony/console/tree/v6.4.17" }, "funding": [ { @@ -4106,7 +4333,7 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:19:14+00:00" + "time": "2024-12-07T12:07:30+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4127,12 +4354,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -4901,12 +5128,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -5049,16 +5276,16 @@ }, { "name": "symfony/translation", - "version": "v7.2.0", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "dc89e16b44048ceecc879054e5b7f38326ab6cc5" + "reference": "e2674a30132b7cc4d74540d6c2573aa363f05923" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/dc89e16b44048ceecc879054e5b7f38326ab6cc5", - "reference": "dc89e16b44048ceecc879054e5b7f38326ab6cc5", + "url": "https://api.github.com/repos/symfony/translation/zipball/e2674a30132b7cc4d74540d6c2573aa363f05923", + "reference": "e2674a30132b7cc4d74540d6c2573aa363f05923", "shasum": "" }, "require": { @@ -5124,7 +5351,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.2.0" + "source": "https://github.com/symfony/translation/tree/v7.2.2" }, "funding": [ { @@ -5140,7 +5367,7 @@ "type": "tidelift" } ], - "time": "2024-11-12T20:47:56+00:00" + "time": "2024-12-07T08:18:10+00:00" }, { "name": "symfony/translation-contracts", @@ -5161,12 +5388,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -6296,16 +6523,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.65.0", + "version": "v3.66.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f" + "reference": "5f5f2a142ff36b93c41885bca29cc5f861c013e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/79d4f3e77b250a7d8043d76c6af8f0695e8a469f", - "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/5f5f2a142ff36b93c41885bca29cc5f861c013e6", + "reference": "5f5f2a142ff36b93c41885bca29cc5f861c013e6", "shasum": "" }, "require": { @@ -6331,7 +6558,7 @@ "symfony/polyfill-mbstring": "^1.28", "symfony/polyfill-php80": "^1.28", "symfony/polyfill-php81": "^1.28", - "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/process": "^5.4 || ^6.0 || ^7.0 <7.2", "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { @@ -6387,7 +6614,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.65.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.66.0" }, "funding": [ { @@ -6395,7 +6622,7 @@ "type": "github" } ], - "time": "2024-11-25T00:39:24+00:00" + "time": "2024-12-29T13:46:23+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -6717,16 +6944,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.3.1", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", "shasum": "" }, "require": { @@ -6769,9 +6996,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" }, - "time": "2024-10-08T18:51:32+00:00" + "time": "2024-12-30T11:07:19+00:00" }, { "name": "nunomaduro/collision", @@ -7649,16 +7876,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.13", + "version": "1.12.14", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "9b469068840cfa031e1deaf2fa1886d00e20680f" + "reference": "e73868f809e68fff33be961ad4946e2e43ec9e38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9b469068840cfa031e1deaf2fa1886d00e20680f", - "reference": "9b469068840cfa031e1deaf2fa1886d00e20680f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e73868f809e68fff33be961ad4946e2e43ec9e38", + "reference": "e73868f809e68fff33be961ad4946e2e43ec9e38", "shasum": "" }, "require": { @@ -7703,7 +7930,7 @@ "type": "github" } ], - "time": "2024-12-17T17:00:20+00:00" + "time": "2024-12-31T07:26:13+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -8399,33 +8626,33 @@ }, { "name": "react/child-process", - "version": "v0.6.5", + "version": "v0.6.6", "source": { "type": "git", "url": "https://github.com/reactphp/child-process.git", - "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43" + "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/child-process/zipball/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", - "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/1721e2b93d89b745664353b9cfc8f155ba8a6159", + "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.0", "react/event-loop": "^1.2", - "react/stream": "^1.2" + "react/stream": "^1.4" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", - "react/socket": "^1.8", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/socket": "^1.16", "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" }, "type": "library", "autoload": { "psr-4": { - "React\\ChildProcess\\": "src" + "React\\ChildProcess\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -8462,19 +8689,15 @@ ], "support": { "issues": "https://github.com/reactphp/child-process/issues", - "source": "https://github.com/reactphp/child-process/tree/v0.6.5" + "source": "https://github.com/reactphp/child-process/tree/v0.6.6" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2022-09-16T13:41:56+00:00" + "time": "2025-01-01T16:37:48+00:00" }, { "name": "react/dns", @@ -10141,12 +10364,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -10297,12 +10520,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -10355,16 +10578,16 @@ }, { "name": "symfony/finder", - "version": "v7.2.0", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49" + "reference": "87a71856f2f56e4100373e92529eed3171695cfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/6de263e5868b9a137602dd1e33e4d48bfae99c49", - "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49", + "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", + "reference": "87a71856f2f56e4100373e92529eed3171695cfb", "shasum": "" }, "require": { @@ -10399,7 +10622,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.2.0" + "source": "https://github.com/symfony/finder/tree/v7.2.2" }, "funding": [ { @@ -10415,20 +10638,20 @@ "type": "tidelift" } ], - "time": "2024-10-23T06:56:12+00:00" + "time": "2024-12-30T19:00:17+00:00" }, { "name": "symfony/http-client", - "version": "v7.2.1", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "ff4df2b68d1c67abb9fef146e6540ea16b58d99e" + "reference": "339ba21476eb184290361542f732ad12c97591ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/ff4df2b68d1c67abb9fef146e6540ea16b58d99e", - "reference": "ff4df2b68d1c67abb9fef146e6540ea16b58d99e", + "url": "https://api.github.com/repos/symfony/http-client/zipball/339ba21476eb184290361542f732ad12c97591ec", + "reference": "339ba21476eb184290361542f732ad12c97591ec", "shasum": "" }, "require": { @@ -10494,7 +10717,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.2.1" + "source": "https://github.com/symfony/http-client/tree/v7.2.2" }, "funding": [ { @@ -10510,7 +10733,7 @@ "type": "tidelift" } ], - "time": "2024-12-07T08:50:44+00:00" + "time": "2024-12-30T18:35:15+00:00" }, { "name": "symfony/http-client-contracts", @@ -10735,16 +10958,16 @@ }, { "name": "symfony/process", - "version": "v7.2.0", + "version": "v7.1.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e" + "reference": "42783370fda6e538771f7c7a36e9fa2ee3a84892" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", - "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", + "url": "https://api.github.com/repos/symfony/process/zipball/42783370fda6e538771f7c7a36e9fa2ee3a84892", + "reference": "42783370fda6e538771f7c7a36e9fa2ee3a84892", "shasum": "" }, "require": { @@ -10776,7 +10999,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.2.0" + "source": "https://github.com/symfony/process/tree/v7.1.8" }, "funding": [ { @@ -10792,20 +11015,20 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:24:19+00:00" + "time": "2024-11-06T14:23:19+00:00" }, { "name": "symfony/stopwatch", - "version": "v7.2.0", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "696f418b0d722a4225e1c3d95489d262971ca924" + "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/696f418b0d722a4225e1c3d95489d262971ca924", - "reference": "696f418b0d722a4225e1c3d95489d262971ca924", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/e46690d5b9d7164a6d061cab1e8d46141b9f49df", + "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df", "shasum": "" }, "require": { @@ -10838,7 +11061,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.2.0" + "source": "https://github.com/symfony/stopwatch/tree/v7.2.2" }, "funding": [ { @@ -10854,7 +11077,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2024-12-18T14:28:33+00:00" }, { "name": "symfony/var-exporter", diff --git a/config/cors.php b/config/cors.php index 0fc17e5..afc624b 100644 --- a/config/cors.php +++ b/config/cors.php @@ -6,5 +6,5 @@ 'max_age' => 8600, 'allowed_headers' => ['X-Request-Headers', 'Content-Type', 'Authorization', 'X-Requested-With'], 'exposable_headers' => [], - 'allow_credentials' => false + 'allow_credentials' => false, ]; diff --git a/config/database.php b/config/database.php index 24d3376..68a7ea1 100644 --- a/config/database.php +++ b/config/database.php @@ -2,14 +2,14 @@ declare(strict_types=1); -use Phenix\Database\Constants\Drivers; +use Phenix\Database\Constants\Driver; return [ 'default' => env('DB_CONNECTION', fn () => 'mysql'), 'connections' => [ 'mysql' => [ - 'driver' => Drivers::MYSQL, + 'driver' => Driver::MYSQL, 'host' => env('DB_HOST', fn () => '127.0.0.1'), 'port' => env('DB_PORT', fn () => '3306'), 'database' => env('DB_DATABASE'), @@ -21,7 +21,7 @@ 'prefix' => '', ], 'postgresql' => [ - 'driver' => Drivers::POSTGRESQL, + 'driver' => Driver::POSTGRESQL, 'host' => env('DB_HOST', fn () => '127.0.0.1'), 'port' => env('DB_PORT', fn () => '3306'), 'database' => env('DB_DATABASE'), @@ -30,6 +30,19 @@ ], ], + 'redis' => [ + 'connections' => [ + 'default' => [ + 'scheme' => env('REDIS_SCHEME', fn () => 'redis'), + 'host' => env('REDIS_HOST', fn () => '127.0.0.1'), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), + 'port' => env('REDIS_PORT', fn () => '6379'), + 'database' => env('REDIS_DB', fn () => 0), + ], + ], + ], + 'paths' => [ 'migrations' => base_path('database' . DIRECTORY_SEPARATOR . 'migrations'), 'seeds' => base_path('database' . DIRECTORY_SEPARATOR . 'seeds'), diff --git a/config/session.php b/config/session.php new file mode 100644 index 0000000..1230e84 --- /dev/null +++ b/config/session.php @@ -0,0 +1,58 @@ + env('SESSION_DRIVER', fn (): string => 'redis'), + + 'lifetime' => env('SESSION_LIFETIME', fn () => 120), + + /* + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | For "redis" session drivers, you may specify a specific connection that + | should be used to manage the sessions. This should correspond to a + | connection in your database configuration options. + */ + + 'connection' => env('SESSION_CONNECTION', fn () => 'default'), + + 'cookie_name' => env( + 'SESSION_COOKIE_NAME', + fn () => Str::slug(env('APP_NAME', fn () => 'phenix'), '_') . '_session' + ), + + 'path' => '/', + + 'domain' => env('SESSION_DOMAIN'), + + 'secure' => env('SESSION_SECURE_COOKIE'), + + 'http_only' => true, + + /* + |-------------------------------------------------------------------------- + | Same-Site Cookies + |-------------------------------------------------------------------------- + | + | Supported: "Lax", "Strict", "None" + | + */ + + 'same_site' => 'Lax', + +]; diff --git a/tests/Pest.php b/tests/Pest.php index 5033acc..18a31ea 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -11,13 +11,11 @@ | */ -use Phenix\Util\URL; +use Amp\Http\Client\HttpClientBuilder; use Amp\Http\Client\Request; use Phenix\Constants\HttpMethod; use Phenix\Testing\TestResponse; -use Amp\Http\Client\HttpClientBuilder; - - +use Phenix\Util\URL; uses(Tests\TestCase::class)->in('Unit'); uses(Tests\TestCase::class)->in('Feature');