Skip to content

Refactored php file generators to extend PhpFileGenerator and etc. #526

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

Conversation

bohdan-harniuk
Copy link
Collaborator

Description (*)
What was done:

  1. PHP file generators refactored to extend PhpFileGenerator
  2. fixed multiple static tests issues
  3. removed duplicated PHP generator for Edit entity controller

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with integration/functional tests (if applicable)
  • All automated tests passed successfully (all builds are green)

…ic test issues, fixed Edit entity controller generation code duplication
Copy link
Contributor

@eduard13 eduard13 left a comment

Choose a reason for hiding this comment

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

@bohdan-harniuk thank you for these adjustments. Could you please check the following test case?

  1. Create a new Entity
  2. Add couple of entity's properties: string, boolean, float

Expected Result

The generated interfaces/models, have the correct selected type.

    /**
     * Getter for Name.
     *
     * @return string|null
     */
    public function getName(): ?string;

Actual Result

The generated interfaces/models, have the wrong selected type, pointing always to int type.

    /**
     * Getter for Name.
     *
     * @return int|null
     */
    public function getName(): ?int;

@bohdan-harniuk
Copy link
Collaborator Author

Hello, @eduard13
I couldn't reproduce mentioned issue:
Screenshot 2021-04-05 at 15 01 11
Screenshot 2021-04-05 at 15 01 06
Screenshot 2021-04-05 at 15 00 57
Screenshot 2021-04-05 at 15 00 53

@eduard13
Copy link
Contributor

eduard13 commented Apr 5, 2021

@bohdan-harniuk, looks like the issue is related to the type field, that doesn't get unfocus state and the selected value isn't saved. Can we make sure the selected values are used on creating the parameters?

Beside this one, could you please check the below errors?
Xnip2021-04-05_15-16-38
Xnip2021-04-05_15-16-48

You can get them, by trying to generate UiComponents for 2 entities within the same module.
Thank you.

@bohdan-harniuk
Copy link
Collaborator Author

@eduard13 , thank you for your findings!! It looks like critical ones. I will try to fix them in this PR. Thank you a lot.

@bohdan-harniuk
Copy link
Collaborator Author

bohdan-harniuk commented Apr 6, 2021

Hello, @eduard13
What was done:

  1. For BlockActions class added entity name prefix
  2. For all form edit buttons added an entity folder above it in the folder hierarchy
  3. Added new test case to test grid list generation with actions column
  4. Added stop cell editing if a user clicks on the OK button during cell editing

Please, review my code one more time

Thanks you

Copy link
Contributor

@eduard13 eduard13 left a comment

Choose a reason for hiding this comment

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

Thank you for fixing those issues 👍

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

Successfully merging this pull request may close these issues.

4 participants