-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow pass null
argument to methods Tag::class()
, Tag::replaceClass()
, BooleanInputTag::label()
and BooleanInputTag::sideLabel()
#78
Conversation
Null does not solve the problem, you can still pass an empty string, and if the method is a string, why complicate it, in addition to not being consistent for example: Example 1: CustomTag::name('span)->attributes(['class' => 'tests 1')->class('')->render(); expected: <span class="test 1"></span> output: <span class="test 1 "></span> Example: 2 CustomTag::name('span)->class('')->render(); Expected: <span></span> output: <span class=""></span> |
First case is valid: // Should be <span class="test 1"></span>
CustomTag::name('span)->attributes(['class' => 'tests 1')->class('')->render(); Second case is not valid. I think code |
What is the point of adding |
Agree with @terabytesoftw in this case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed once again. It makes sense for consistency sake.
Note that this breaks the interface, so needs major release. |
null
argument to methods Tag::class()
and Tag::replaceClass()
null
argument to methods Tag::class()
, Tag::replaceClass()
, BooleanInputTag::label()
and BooleanInputTag::sideLabel()
BC saved. We add nullable type in final methods of abstract classes. I'm created issue Roave/BackwardCompatibilityCheck#313 |
Also update dev dependencies and fix psalm errors