Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Oct 15, 2019

No description provided.

@@ -443,7 +443,7 @@ public function setSecurityId($id)
/**
* set issue's due date.
*
* @param \DateTimeInterface|null $duedate due date string or DateTimeInterface object
Copy link
Contributor Author

@staabm staabm Oct 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the implementation of this methods also allows to pass in a string.
when passing in a DateTimeInterface it gets formatted into a string.

@staabm
Copy link
Contributor Author

staabm commented Oct 15, 2019

hmm not sure whether the testerrors are related.. any hints?

@lesstif
Copy link
Owner

lesstif commented Nov 5, 2019

hi @staabm .

PHP json mapper will be process to ''\DateTimeInterface|string' is concrete class name, so it's throw class not found exception.

mapping annotation syntax are single or double type name with | delimiter, but you are write the three type name.

thanks!

@staabm
Copy link
Contributor Author

staabm commented Nov 5, 2019

thx for coming back to me.

PHP json mapper will be process to ''\DateTimeInterface|string' is concrete class name, so it's throw class not found exception.

sorry, I cannot follow.

mapping annotation syntax are single or double type name with | delimiter, but you are write the three type name.

phpdoc allow any number of types separated by |.

as the implementation of setDueDate looks like, the internal property will be set to a string (and this conflicts with the documented phpdoc)

@lesstif
Copy link
Owner

lesstif commented Nov 5, 2019

ok, you are right, PHPdoc allow any number of types.

but this repos depends on PHP jsonmapper third party library then does not allow multiple property types mapping like this (\DateTimeInterface|string|null).

@staabm
Copy link
Contributor Author

staabm commented Nov 5, 2019

hmm ok.. so we can't express that the method beeing used can be invoked with a string (even if the implementation handles this case) ?

@staabm staabm closed this Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants