Conversation
Jean85
left a comment
There was a problem hiding this comment.
I've put Psalm on the suggested level (4) by psalm --init. It immediately found some inconsistencies that I was able to fix, and others that instead aren't fixable right away, so I've put up a baseline.
| * @inheritdoc | ||
| */ | ||
| public function map($source, string $destinationClass, array $context = []) | ||
| public function map($source, string $targetClass, array $context = []) |
There was a problem hiding this comment.
Those renames are probably due to PHP 8 named arguments.
| * Maps an object to an instance of class $to, provided a mapping is | ||
| * configured. | ||
| * | ||
| * @template T of object |
There was a problem hiding this comment.
These templates are the main improvements for the end user.
| { | ||
| /** | ||
| * @param $object | ||
| * @param object|array $object |
There was a problem hiding this comment.
This was added to be more correct, but the ArrayPropertyReader breaks the Liskov principle... What can we do?
|
Travis reporting doesn't seem to work, but the build seems green: https://travis-ci.org/github/mark-gerarts/automapper-plus/builds/762590792 I would suggest to migrate away from Travis though: it already reports a forced migration to the .com unified infra I'll try to draft up a separate PR to move to GitHub Actions. [EDIT] Done #75, but depending on which gets merged first I'll need to migrate the Psalm CI job too. |
|
@mark-gerarts Any news on this ? |
|
I completely lost sight of this one. I see @Jean85 updated it with the main branch, that's great. I've been out of the PHP world for a while, I'll need some time to work myself back in and review the changes here. #75 is mentioned as well. We have GH actions nowadays, so we could add it there as well. |
|
@mark-gerarts done! You need to approve the run though... |

Fixes #72.