Skip to content
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

Improve field order #32

Merged
merged 1 commit into from
Apr 5, 2022
Merged

Conversation

jordisala1991
Copy link
Contributor

@jordisala1991 jordisala1991 commented Apr 5, 2022

This PR tries to address the issue with the fields order for auto Form.

The problem (related to #11) is because by default the orm field order is not related to the class property order or the table field order, so relying on it is not recommended in any way. You can see:

https://stackoverflow.com/questions/24148568/doctrineschemaupdate-doesnt-respect-column-order

With this changes, the code is simpler, the test suite passes and also we are now relying on the order of the fields provided, without any extra configuration.

Closes #11

@codecov-commenter
Copy link

Codecov Report

Merging #32 (e3d7e12) into master (217da01) will decrease coverage by 2.34%.
The diff coverage is 91.66%.

@@             Coverage Diff              @@
##             master      #32      +/-   ##
============================================
- Coverage     68.46%   66.11%   -2.35%     
+ Complexity       41       39       -2     
============================================
  Files             7        6       -1     
  Lines           130      121       -9     
============================================
- Hits             89       80       -9     
  Misses           41       41              
Impacted Files Coverage Δ
src/Form/Manipulator/DoctrineORMManipulator.php 78.26% <91.66%> (+0.48%) ⬆️
src/ObjectInfo/DoctrineORMInfo.php 82.14% <0.00%> (-1.73%) ⬇️
src/DependencyInjection/Configuration.php 0.00% <0.00%> (ø)
src/DependencyInjection/A2lixAutoFormExtension.php 0.00% <0.00%> (ø)
src/A2lixAutoFormBundle.php

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 217da01...e3d7e12. Read the comment docs.

@jordisala1991 jordisala1991 marked this pull request as ready for review April 5, 2022 15:05
@jordisala1991
Copy link
Contributor Author

Do you have time for a review @webda2l ?

Thank you for your time :)

@webda2l webda2l merged commit d129909 into a2lix:master Apr 5, 2022
@webda2l
Copy link
Member

webda2l commented Apr 5, 2022

Sound good, thanks @jordisala1991 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants