Skip to content

Conversation

@smnandre
Copy link
Member

Q A
Bug fix? almost
New feature? no
License MIT

As this attribute is currently extended by AsLiveComponent, it allow us to also call parent::serviceConfig in LiveComponent

(will require a conflict in composer to force Twig&Live update together)

As this attribute is currently extended by AsLiveComponent, it allow us to also call parent::serviceConfig in LiveComponent
(will require a conflict in composer to force Twig&Live update together)
'expose_public_props' => $this->exposePublicProps,
'attributes_var' => $this->attributesVar,
];
]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking, but I think the intent here should be to remove null and '' values, but keep 0 as a valid value, so being explicit and doing fn ($v) => null !== $v && '' !== $v) would be better and less confusing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I (it took some time^^) understand why for LiveComponent... but we don't want to keep 0 for any of those 4 vars do we ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took some time me too to figure out why the stuff in my PR does not work. I'm just saying it could have been avoided if valid values like 0 not have been filtered out. Anyway, it doesn't really matter at the moment, with these values.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, i'd like to remove all the array_filters. We needed it for a BC thing, maybe we can handle it differently.

And it's because you lost time with this (and me too after haha) that i suggest to put the array_filter with the vars it filters :)

The second thing is... i'm more and more uncomfortable with the way LiveComponent uses TwigComponent... because none of it is covered by any contract or so...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly i did that to avoid that situation to happen again but if you think (and i see why) that would not, let's close this and focus back on yours ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this PR be closed then?

@weaverryan weaverryan added Status: Waiting feedback Needs feedback from the author Bug Bug Fix labels Jan 29, 2024
@smnandre
Copy link
Member Author

Let's close for now and adress this later

@smnandre smnandre closed this Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Bug Fix Status: Waiting feedback Needs feedback from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants