Skip to content

Conversation

berni2288
Copy link

Fatal error: Uncaught exception 'Gitlab\Exception\RuntimeException' with message 'Property "iid" does not exist for Gitlab\Model\MergeRequest object' in lib\Gitlab\Model\AbstractModel.php:50

New properties have been added in some Gitlab API models, for example "iid" for merge requests.

This change should make php-gitlab-api more flexible when new properties are added in Gitlab.

Fatal error:  Uncaught exception 'Gitlab\Exception\RuntimeException' with message 'Property "iid" does not exist for Gitlab\Model\MergeRequest object' in lib\Gitlab\Model\AbstractModel.php:50
@m4tthumphrey
Copy link
Contributor

There would be no point in using the properties array at all if this check was in there. To solve these "problems" you just need to add the missing property to the array (as you did in your other PR).

@berni2288
Copy link
Author

I actually would expect that when new properties are added to Gitlab, that the API client shouldn't break, but ignore new properties. This would avoid having to update the API client everytime the API changes.
Having the properties still makes sense, because this way you guarantee that the properties are even there when the API Response doesn't return them (default values).

@m4tthumphrey
Copy link
Contributor

Hmmm... you are right.

@m4tthumphrey m4tthumphrey reopened this Oct 28, 2013
m4tthumphrey added a commit that referenced this pull request Oct 28, 2013
Fixes uncaught RuntimeException 'Property "xyz" does not exist
@m4tthumphrey m4tthumphrey merged commit 3bdeff2 into GitLabPHP:master Oct 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants