-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Move internal configuration to PHP #6284
Conversation
1dfdf3b
to
b5c8124
Compare
I think it's ready to review. Should we keep the |
I think the |
b5c8124
to
47a1015
Compare
This will be a pain to merge to master, but I guess it is better to do on 3.x? |
Probably... I could (not now, also on holidays so I probably won't be able to have a proper internet connection) compare the |
Please have a look at https://github.com/sonata-project/SonataAdminBundle/compare/3.x...core23:fix-php-compiler?expand=1 There may be a type error, when defining admin services in php configs. |
Could you please rebase your PR and fix merge conflicts? |
47a1015
to
79c07bc
Compare
Codecov Report
@@ Coverage Diff @@
## 3.x #6284 +/- ##
============================================
+ Coverage 77.52% 78.65% +1.12%
- Complexity 2603 2604 +1
============================================
Files 142 156 +14
Lines 7776 8239 +463
============================================
+ Hits 6028 6480 +452
- Misses 1748 1759 +11
Continue to review full report at Codecov.
|
ea9d3a3
to
4cd0dd2
Compare
65bc0b7
to
9470cd1
Compare
9470cd1
to
856d485
Compare
To me it looks good!, You will have to merge master for this one, please, to fix the possible changes that appear |
Sure! I was going to. |
856d485
to
1de5cb8
Compare
Thank you @franmomu |
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service merge changes from PR sonata-project#6144 Move internal configuration to PHP sonata-project#6284
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service merge changes from PR sonata-project#6144 Move internal configuration to PHP sonata-project#6284
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service merge changes from PR sonata-project#6144 merge changes from PR sonata-project#6284 compare date with time in DataTransformerResolverTest
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists #6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR #6167 register BooleanToStringTransformer as a service merge changes from PR #6144 merge changes from PR #6284 compare date with time in DataTransformerResolverTest
Ref: symfony/symfony#37186
I decided to do this because when I tried to upgrade to Symfony 5.1, there were a lot of warnings coming from
xml
configuration files because<deprecation>
tag uses some attributes (package
andversion
) and I have no idea if that could be doable using XML. So based on symfony/symfony#37186 and using https://github.com/migrify/config-transformer I tried to do this.I did it quickly without checking too much, I'd like to check better and also format the arguments, so this is just to see if we are fine with this change, I'll keep going.