mezzio-hal icon indicating copy to clipboard operation
mezzio-hal copied to clipboard

Issue #6: Allow Link creation with null value attribute.

Open alexmerlin opened this issue 1 year ago • 4 comments

Q A
Documentation no
Bugfix no
BC Break no
New Feature yes
RFC no
QA no

Description

As requested in #6, it should be possible to create Links with null value attribute. This PR:

  • modifies the validateAttributeValue method so that it accepts null value attributes
  • extends the existing test (testCanConstructLinkWithRelationAndAttributes) to cover null value attributes

alexmerlin avatar Apr 19 '23 16:04 alexmerlin

I find it odd that the DCO check fails, because I made sure (you can see that I had multiple attempts) that my commits include a signoff flag. See below the output of git log:

commit 09cd057ef4530101fcae4f0ab00116f0acdf75f6 (HEAD -> issue-6, origin/issue-6) Author: alexmerlin [email protected] Date: Wed Apr 19 19:23:38 2023 +0300

Issue #6: Allow Link creation with null attribute.

Signed-off-by: alexmerlin <[email protected]>

commit a6c9342ae9dd403eb064f97417dce890a1a115b6 (origin/HEAD, origin/2.7.x, 2.7.x) Author: alexmerlin [email protected] Date: Wed Apr 19 19:18:35 2023 +0300

Added missing sign-off.

Signed-off-by: alexmerlin <[email protected]>

commit db92fe2f7de11b9fc348a2dedd30d7cd58d79a1a Author: alexmerlin [email protected] Date: Wed Apr 19 19:06:11 2023 +0300

Added missing sign-off.

Signed-off-by: alexmerlin <[email protected]>

commit 84656099db54f8d7a81d50d23aef6593b29c6dd2 Author: Alex Karajos [email protected] Date: Wed Apr 19 18:47:08 2023 +0300

Issue #6: Allow Link creation with null attribute.

* Issue #6: Allow Link creation with null attribute.

Signed-off-by: alexmerlin <[email protected]>

---------

Signed-off-by: alexmerlin <[email protected]>

alexmerlin avatar Apr 20 '23 08:04 alexmerlin

If you click on DCO check it will show what is the problem. Specifically here it tells that handle used in signoff does not match expected name.

Xerkus avatar Apr 20 '23 08:04 Xerkus

If you click on DCO check it will show what is the problem. Specifically here it tells that handle used in signoff does not match expected name.

Indeed, I didn't notice that. I just fixed it.

alexmerlin avatar Apr 20 '23 08:04 alexmerlin

HAL specification defines optional attributes in link objects but they are not empty. I do not believe attributes with null or empty value should be allowed.

Xerkus avatar Apr 20 '23 08:04 Xerkus