Skip to content

Commit

Permalink
Use the changed CommaSeparatedToIntegerArray cast
Browse files Browse the repository at this point in the history
  • Loading branch information
royduin committed Apr 20, 2022
1 parent 9a5e404 commit 47c0e22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
],
"require": {
"php": "^8.0|^8.1",
"rapidez/core": "~0.54"
"rapidez/core": "~0.57"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/AmastyAutomaticRelatedProductsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Support\ServiceProvider;
use Rapidez\AmastyAutomaticRelatedProducts\Models\Scopes\CrossselProductsScope;
use Rapidez\AmastyAutomaticRelatedProducts\Models\Scopes\RelatedProductsScope;
use Rapidez\Core\Casts\CommaSeparatedToArray;
use Rapidez\Core\Casts\CommaSeparatedToIntegerArray;
use TorMorten\Eventy\Facades\Eventy;

class AmastyAutomaticRelatedProductsServiceProvider extends ServiceProvider
Expand All @@ -22,7 +22,7 @@ public function addScopes(): self
Eventy::addFilter('productpage.scopes', fn ($scopes) => array_merge($scopes ?: [], [RelatedProductsScope::class]));
Eventy::addFilter('quote.scopes', fn ($scopes) => array_merge($scopes ?: [], [CrossselProductsScope::class]));
Eventy::addFilter('product.casts', fn ($casts) => array_merge($casts ?: [], [
'amasty_related_ids' => CommaSeparatedToArray::class,
'amasty_related_ids' => CommaSeparatedToIntegerArray::class,
]));

return $this;
Expand Down

0 comments on commit 47c0e22

Please sign in to comment.