The readme example has a check for ($patron->has('relationships.pledges')) that can return true even if the patron hasn't pledged to the campaign in question. This causes the call inside that block to $patron->relationship('pledges')->get(0)->resolve($patron_response) to hit a 500 error with the following message:
PHP Fatal error: Uncaught exception 'Art4\JsonApiClient\Exception\AccessException' with message '"0" doesn't exist in this resource.'
The user I tested with has pledges for several other campaigns, but none for the one being authed against. I believe this means that either or both:
the ->has('relationships.pledges') can return a false positive
the readme example should be updated to avoid this case
Please let me know if any other info would be useful.
The readme example has a check for
($patron->has('relationships.pledges'))
that can return true even if the patron hasn't pledged to the campaign in question. This causes the call inside that block to$patron->relationship('pledges')->get(0)->resolve($patron_response)
to hit a 500 error with the following message:The user I tested with has pledges for several other campaigns, but none for the one being authed against. I believe this means that either or both:
->has('relationships.pledges')
can return a false positivePlease let me know if any other info would be useful.
Thanks!