diff --git a/app/Controller/PersonController.php b/app/Controller/PersonController.php index 3d6e4927..7f4dc419 100644 --- a/app/Controller/PersonController.php +++ b/app/Controller/PersonController.php @@ -44,7 +44,7 @@ public function create(PersonRequest $request, ResponseInterface $response): Mes $this->cache->set($person['nick'], '.'); $this->cache->set($person['id'], json_encode($person)); - return $response->json($person)->withStatus(201)->withHeader('Location', "/pessoas/{$person['id']}"); + return $response->json($person)->withStatus(201); } public function show(RequestInterface $request, ResponseInterface $response, string $id): MessageResponseInterface diff --git a/composer.lock b/composer.lock index 96c2b297..d1cd689b 100644 --- a/composer.lock +++ b/composer.lock @@ -1093,16 +1093,16 @@ }, { "name": "hyperf/collection", - "version": "v3.0.29", + "version": "v3.0.33", "source": { "type": "git", "url": "https://github.com/hyperf/collection.git", - "reference": "c2e3f919f8c445da69e0e0c10920c6fc0754b9ad" + "reference": "0126536ab2634b6f446bcdd24ee4f4448951390b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/collection/zipball/c2e3f919f8c445da69e0e0c10920c6fc0754b9ad", - "reference": "c2e3f919f8c445da69e0e0c10920c6fc0754b9ad", + "url": "https://api.github.com/repos/hyperf/collection/zipball/0126536ab2634b6f446bcdd24ee4f4448951390b", + "reference": "0126536ab2634b6f446bcdd24ee4f4448951390b", "shasum": "" }, "require": { @@ -1142,7 +1142,7 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-07-14T03:41:52+00:00" + "time": "2023-08-18T03:42:33+00:00" }, { "name": "hyperf/command", @@ -1458,16 +1458,16 @@ }, { "name": "hyperf/coroutine", - "version": "v3.0.16", + "version": "v3.0.33", "source": { "type": "git", "url": "https://github.com/hyperf/coroutine.git", - "reference": "4944ce69d5f35407e5dbcf7e9991f1db3366f254" + "reference": "0cad1ddb1d233b02b16ebfb26d0cc5c863b0e5dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/coroutine/zipball/4944ce69d5f35407e5dbcf7e9991f1db3366f254", - "reference": "4944ce69d5f35407e5dbcf7e9991f1db3366f254", + "url": "https://api.github.com/repos/hyperf/coroutine/zipball/0cad1ddb1d233b02b16ebfb26d0cc5c863b0e5dd", + "reference": "0cad1ddb1d233b02b16ebfb26d0cc5c863b0e5dd", "shasum": "" }, "require": { @@ -1508,7 +1508,7 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-04-12T05:34:25+00:00" + "time": "2023-08-17T06:16:35+00:00" }, { "name": "hyperf/database", @@ -1632,16 +1632,16 @@ }, { "name": "hyperf/di", - "version": "v3.0.24", + "version": "v3.0.33", "source": { "type": "git", "url": "https://github.com/hyperf/di.git", - "reference": "4fa46897ffe0e1f2d1260a65a1e25dadaacbdcd2" + "reference": "bd5bf72af5f9261c2352b56d1a2ce677c1c0e304" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/di/zipball/4fa46897ffe0e1f2d1260a65a1e25dadaacbdcd2", - "reference": "4fa46897ffe0e1f2d1260a65a1e25dadaacbdcd2", + "url": "https://api.github.com/repos/hyperf/di/zipball/bd5bf72af5f9261c2352b56d1a2ce677c1c0e304", + "reference": "bd5bf72af5f9261c2352b56d1a2ce677c1c0e304", "shasum": "" }, "require": { @@ -1693,7 +1693,7 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-06-05T07:53:17+00:00" + "time": "2023-08-15T07:08:10+00:00" }, { "name": "hyperf/dispatcher", @@ -3101,16 +3101,16 @@ }, { "name": "hyperf/validation", - "version": "v3.0.28", + "version": "v3.0.33", "source": { "type": "git", "url": "https://github.com/hyperf/validation.git", - "reference": "c1aa358eabf24148487602005e49565bbf02979b" + "reference": "a35fe9b755942a803331bdc79547642caabc7e05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/validation/zipball/c1aa358eabf24148487602005e49565bbf02979b", - "reference": "c1aa358eabf24148487602005e49565bbf02979b", + "url": "https://api.github.com/repos/hyperf/validation/zipball/a35fe9b755942a803331bdc79547642caabc7e05", + "reference": "a35fe9b755942a803331bdc79547642caabc7e05", "shasum": "" }, "require": { @@ -3157,9 +3157,9 @@ ], "support": { "issues": "https://github.com/hyperf/validation/issues", - "source": "https://github.com/hyperf/validation/tree/v3.0.28" + "source": "https://github.com/hyperf/validation/tree/v3.0.33" }, - "time": "2023-07-03T04:37:00+00:00" + "time": "2023-08-10T07:43:04+00:00" }, { "name": "laminas/laminas-mime", @@ -3384,25 +3384,29 @@ }, { "name": "nesbot/carbon", - "version": "2.68.1", + "version": "2.69.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da" + "reference": "4308217830e4ca445583a37d1bf4aff4153fa81c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4f991ed2a403c85efbc4f23eb4030063fdbe01da", - "reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4308217830e4ca445583a37d1bf4aff4153fa81c", + "reference": "4308217830e4ca445583a37d1bf4aff4153fa81c", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", + "psr/clock": "^1.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, + "provide": { + "psr/clock-implementation": "1.0" + }, "require-dev": { "doctrine/dbal": "^2.0 || ^3.1.4", "doctrine/orm": "^2.7", @@ -3482,7 +3486,7 @@ "type": "tidelift" } ], - "time": "2023-06-20T18:29:04+00:00" + "time": "2023-08-03T09:00:52+00:00" }, { "name": "nikic/fast-route", @@ -3707,6 +3711,54 @@ ], "time": "2023-02-25T19:38:58+00:00" }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, { "name": "psr/container", "version": "2.0.2", diff --git a/docker-compose.yml b/docker-compose.yml index a4cfcd29..8d8bbd6d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ services: APP_STAGE: dev environment: DB_HOST: db + REDIS_HOST: cache volumes: - ./:/opt/www depends_on: @@ -71,4 +72,4 @@ services: networks: default: - name: rinha-de-backend \ No newline at end of file + name: rinha-de-backend