Closed albertborsos closed 2 years ago
Q | A |
---|---|
Is bugfix? | ✔️ |
New feature? | ❌ |
Breaks BC? | ❌ |
Fixed issues | https://github.com/yiisoft/yii-bootstrap5/commit/e656fe39620102ad90ab33194dd29136e912808f#r70189673 |
@albertborsos thank you for PR!
Can you add test for this change, please?
@vjik I made it, but there is something to discuss.
In my test cases an .accordion-item
has only one .accordion-body
. But in the previous tests there is multiple .accordion-body
in an .accordion-item
.
I think the previous tests are uses a wrong accordion syntax.
FYI: on php7.4 a \Yiisoft\Html\Tag\Base\Tag
instance is not a Stringable
object, even if symfony/polyfill-php80
is installed.
@albertborsos We can check exists of method __toString()
instead of is_a()
. This is resolve problem with stringable objects.
In my test cases an .accordion-item has only one .accordion-body. But in the previous tests there is multiple .accordion-body in an .accordion-item. I think the previous tests are uses a wrong accordion syntax.
@terabytesoftw What you think about this? Item can have several body?
@albertborsos We can check exists of method
__toString()
instead ofis_a()
. This is resolve problem with stringable objects.In my test cases an .accordion-item has only one .accordion-body. But in the previous tests there is multiple .accordion-body in an .accordion-item. I think the previous tests are uses a wrong accordion syntax.
@terabytesoftw What you think about this? Item can have several body?
https://getbootstrap.com/docs/5.1/components/accordion/ if we go strictly to the documentation, it only has a body, but use the array as if it were a string varadic which is more convenient than concatenating everything, https://github.com/yiisoft/yii-bootstrap5/blob/e656fe39620102ad90ab33194dd29136e912808f/tests/AccordionTest.php#L56