Closed maicol07 closed 4 days ago
Enhancement of RelatedCollection Class
A new feature was added to filter out only the matchable items using a new onlyMatchable()
method in RelatedCollection class.
Introduction of Matchable Attributes to EagerField
A new property named $matchableAttributes
was introduced into the EagerField class, equipped with corresponding methods to enable interaction, checking and retrieving matchable items.
Enhancement of Filter in MatchFilter Class
The filter()
method in the MatchFilter class can now accommodate an additional parameter $no_eager
. The logic inside the method has been adjusted accordingly to incorporate this change.
Adjustment of Filter Method in MatchesCollection
The $filters
variable assignment received a minor modification in the filter()
method using the dot()
method.
Improvements in ValidatingTrait Class
Updates were made to several methods involving a switch from using $k->attribute
to $k->getAttribute()
when establishing the array keys.
Expansion in InteractWithSearch Trait
The collectMatches()
method now also identifies related matchable fields from the RelatedCollection, broadening its capabilities.
Test Files Modifications
Several changes were made to the test files to align with the aforementioned updates in the payload structure and in the JSON structure returned by the API. Assertions were also modified to check different array components. In addition, the test request payload structure received modifications in order to integrate the new data
> attributes
field. A few test methods have been updated accordingly to accommodate these changes. The affected classes include FieldActionTest
, IndexRelatedFeatureTest
, NestedRepositoryControllerTest
, RepositoryIndexControllerTest
, ProfileControllerTest
, RepositoryShowControllerTest
, ShowRelatedFeatureTest
, and Prototypeable
.
I think you can use the $eagerState
property instead of isRelationship.
I think you can use the
$eagerState
property instead of isRelationship.
The issue here is that $eagerState
is used for the included (old relationships array). I need something else to identify the new slim relationships array and the included one. Maybe I can use an enum since Restify targets PHP 8.1+?
@binaryk I think the PR is ready to be reviewed. The only thing left is a documentation update to cover the new API format (I guess this can be labeled as Restify 9.0?)
There is also a test failing but I don't know how to fix it (I think I need your help for this one :sweat_smile:)! Basically, it seems nested relationships aren't added to included. Related code:
Thanks @maicol07 , can we make sure tests pass please?
Thanks @maicol07 , can we make sure tests pass please?
Yes, I want the last test to pass, however I tried to debug it but I can't understand why nested relationships aren't loaded in included. Am I missing something?
Name | Link |
---|---|
Latest commit | 3feefd12f37568f602c2f5445575d4071a50c4b0 |
Latest deploy log | https://app.netlify.com/sites/laravel-restify-docs/deploys/65f191f1979b3800081247b1 |
@maicol07 I'll have to close this due to inactivity. Now we're on branch 9.x. Please let us know if you want to support it further.
Fixes #558 Will fix: #562
Progress: