-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make fields implement FieldTraitAwareInterface instead of FieldInterface #7011
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
Open
ericabouaf
wants to merge
2
commits into
EasyCorp:4.x
Choose a base branch
from
ericabouaf:use-FieldTraitAwareInterface
base: 4.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,14 +3,14 @@ | |
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Config\Asset; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\CollectionType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class ArrayField implements FieldInterface | ||
| final class ArrayField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Bridge\Doctrine\Form\Type\EntityType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class AssociationField implements FieldInterface | ||
| final class AssociationField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,14 +3,14 @@ | |
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Config\Option\Size; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class AvatarField implements FieldInterface | ||
| final class AvatarField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,14 +4,14 @@ | |
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Config\Asset; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Config\Option\TextAlign; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class BooleanField implements FieldInterface | ||
| final class BooleanField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class ChoiceField implements FieldInterface | ||
| final class ChoiceField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,14 +3,14 @@ | |
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Config\Asset; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Form\Type\CodeEditorType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class CodeEditorField implements FieldInterface | ||
| final class CodeEditorField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,14 +3,14 @@ | |
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Config\Asset; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\CollectionType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class CollectionField implements FieldInterface | ||
| final class CollectionField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\ColorType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class ColorField implements FieldInterface | ||
| final class ColorField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class CountryField implements FieldInterface | ||
| final class CountryField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\CurrencyType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class CurrencyField implements FieldInterface | ||
| final class CurrencyField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\DateType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class DateField implements FieldInterface | ||
| final class DateField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\DateTimeType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class DateTimeField implements FieldInterface | ||
| final class DateTimeField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\EmailType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class EmailField implements FieldInterface | ||
| final class EmailField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,13 +2,13 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class Field implements FieldInterface | ||
| final class Field implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormColumnOpenType; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormFieldsetOpenType; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormRowType; | ||
|
|
@@ -13,7 +13,7 @@ | |
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class FormField implements FieldInterface | ||
| final class FormField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\HiddenType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class HiddenField implements FieldInterface | ||
| final class HiddenField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class IdField implements FieldInterface | ||
| final class IdField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Config\Asset; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Config\Option\TextAlign; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Form\Type\FileUploadType; | ||
| use Symfony\Component\Validator\Constraint; | ||
| use Symfony\Component\Validator\Constraints\Image; | ||
|
|
@@ -13,7 +13,7 @@ | |
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class ImageField implements FieldInterface | ||
| final class ImageField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\IntegerType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class IntegerField implements FieldInterface | ||
| final class IntegerField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\LanguageType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class LanguageField implements FieldInterface | ||
| final class LanguageField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\LocaleType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class LocaleField implements FieldInterface | ||
| final class LocaleField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,15 +3,15 @@ | |
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Config\Option\TextAlign; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\MoneyType; | ||
| use Symfony\Component\Intl\Currencies; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class MoneyField implements FieldInterface | ||
| final class MoneyField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ | |
|
|
||
| namespace EasyCorp\Bundle\EasyAdminBundle\Field; | ||
|
|
||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | ||
| use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface; | ||
| use Symfony\Component\Form\Extension\Core\Type\NumberType; | ||
| use Symfony\Contracts\Translation\TranslatableInterface; | ||
|
|
||
| /** | ||
| * @author Javier Eguiluz <[email protected]> | ||
| */ | ||
| final class NumberField implements FieldInterface | ||
| final class NumberField implements FieldTraitAwareInterface | ||
| { | ||
| use FieldTrait; | ||
|
|
||
|
|
||
Oops, something went wrong.
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.
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.
This method is only implemented by FormField, and is not part of FieldTrait
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.
Removing a method from an interface is a BC break and should only be done in major version
What you can do instead is providing a blank deprecated method setIcon in the trait
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.
@VincentLanglet : alright, it's restored. However I do not really agree with your point :
Firstly,
FieldTraitAwareInterfaceis not used anywhere in the codebase, and I doubt anybody uses it yet, since none of the existing EasyAdmin fields implements it. (That's the goal of this PR).Secondly, the signature in this interface does not match the only implementation of it in FormField, so I had to change the signature in FormField.
Thirdly, the goal of this interface is to have a common contract implemented by ALL the fields implementing FieldTrait. I don't see the point of adding it for a single field (FormField.)