diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 1009b3f..6308ad4 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Docs: https://github.com/shivammathur/setup-php - name: Setup PHP diff --git a/composer.json b/composer.json index 31a6fdc..df73f87 100644 --- a/composer.json +++ b/composer.json @@ -10,14 +10,14 @@ } ], "require": { - "php": ">=7.4", + "php": ">=8.1", "ext-json": "*", "psr/http-message": "^1.1 || ^2.0", "shrikeh/teapot": "^2.3.1", - "theodorejb/peachy-sql": "^6.3" + "theodorejb/peachy-sql": "dev-master" }, "require-dev": { - "phpunit/phpunit": "^9.6", + "phpunit/phpunit": "^10.5", "psalm/plugin-phpunit": "^0.19", "vimeo/psalm": "^5.26" }, diff --git a/src/Entities.php b/src/Entities.php index d9f6d47..1ed79d7 100644 --- a/src/Entities.php +++ b/src/Entities.php @@ -215,10 +215,7 @@ public function deleteByIds(array $ids): int } } - /** - * @param int|string $id - */ - public function updateById($id, array $data): int + public function updateById(int|string $id, array $data): int { $row = Helpers::allPropertiesToColumns($this->map, $this->processValues($data, [$id])); $row = $this->processRow($row, [$id]); @@ -307,10 +304,9 @@ private function properException(SqlException $e): \Exception } /** - * @param int|string $id * @param string[] $fields */ - public function getEntityById($id, array $fields = []): array + public function getEntityById(int|string $id, array $fields = []): array { $entities = $this->getEntitiesByIds([$id], $fields);