[LiveComponent] Fix default option extraction ignores Translatable #2621#2627
Merged
Conversation
Member
|
Your composer.json change is not needed here, so let's avoid adding a new dependency for this single check :) <?php
use Not\Installed\TranslatableInterface;
if ('aa' instanceof TranslatableInterface) {
echo 'yep';
} else {
echo 'nope';
}--> "nope" and no error/warning (see https://3v4l.org/4nHHd ) (on contrary to something like this where an error would occur) <?php
use Not\Installed\TranslatableInterface;
// This would trigger a Fatal Error Interface "Not\Installed\TranslatableInterface" not found
$foo = new class implements TranslatableInterface {}; |
smnandre
requested changes
Mar 6, 2025
Contributor
Author
|
I've committed the suggestion, thank you for this comment, I've learned something new :) |
smnandre
approved these changes
Mar 8, 2025
Member
|
Thank you @stehled ! |
…TranslatableInterface` placeholder for `<select>` elements, close symfony#2621 Co-authored-by: Simon André <smn.andre@gmail.com>
Member
|
Thank you @stehled. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Select placeholder in LiveForm will now accept
stringandTranslatableInterfacefromsymfony/translation-contracts. Therefore mimicking of default browser behaviour will not happen forTranslatableInterface.