Skip to content

Commit

Permalink
Merge branch 'release/4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenckens committed Mar 18, 2024
2 parents 48baab8 + 9495e90 commit dad8339
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.


## 4.0.0 - 2024-03-18
- Updated Fractal to 0.20. ([#292](https://github.com/studioespresso/craft-scout/pull/292))

## 3.4.1 - 2024-03-18
### Added
- Added version constraint to prevent installation with craftcms/element-api
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "studioespresso/craft-scout",
"description": "Craft Scout provides a simple solution for adding full-text search to your entries. Scout will automatically keep your search indexes in sync with your entries.",
"type": "craft-plugin",
"version": "3.4.1",
"version": "4.0.0",
"keywords": [
"craft",
"cms",
Expand All @@ -29,10 +29,10 @@
"php": "^8.0.2",
"craftcms/cms": "^4.3.5",
"algolia/algoliasearch-client-php": "^2.3|^3.0",
"league/fractal": "^0.18|^0.19"
"league/fractal": "^0.20"
},
"conflict": {
"craftcms/element-api": ">=4.0.0"
"craftcms/element-api": "<4.0.0"
},
"repositories": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/ScoutIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ScoutIndex extends BaseObject
/** @var IndexSettings */
public $indexSettings;

/** @var string */
/** @var <class-string> */
public $elementType = Entry::class;

/** @var callable|string|array|\League\Fractal\TransformerAbstract */
Expand Down
4 changes: 2 additions & 2 deletions src/serializer/AlgoliaSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ class AlgoliaSerializer extends \League\Fractal\Serializer\ArraySerializer
/**
* Serialize a collection.
*
* @param string $resourceKey
* @param ?string $resourceKey
* @param array $data
*
* @return array
*/
public function collection($resourceKey, array $data)
public function collection(?string $resourceKey, array $data): array
{
if ($resourceKey) {
return [$resourceKey => $data];
Expand Down

0 comments on commit dad8339

Please sign in to comment.