Closed arueckauer closed 4 years ago
👋🏻 and thanks for the review. That's great input! Most comments are fine, for a few I had a question.
Since this PR is about adding strict typing to the component. I would like to address changes not related to it separately. Would you be okay with me opening issues for the following list? They would be addressed in dev-4.0
(master
respectively for bugfixes).
Json::encode
& Json::decode
in favor of native json_encode
and json_decode
(add ext-json to composer.json)ExceptionInterface
should extend Throwable
laminas/laminas-coding-standard
2.0Smd::getDescription()
returns $description
instead of self
array
arguments more generic, probably iterable
(e.g. Smd::addServices(array $services)
)Smd::addService(Smd\Service $service)
drop array support and argument type check [BC]EDIT: Added JSON-RPC SMD: Use argument type declarations as param types (deprecating type hints in PHPDocs) to list of changes.
@arueckauer Maybe add these as checkboxes to #2 (edit the description) and then provide separate PRs to dev-4.0. What do you think?
EDIT:
Bugfix Smd::getDescription() returns $description instead of self
PR to master please.
Agreed, I added the list.
There is one unresolved conversation about initial value of Smd\Service::$name
. Would love your input on that.
@arueckauer Also for strict types we should use assertSame
instead of assertEquals
(the same as ===
instead of ==
).
Description
This PR provides strict typing as described in #2 .
var_export