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

Refactoring resolveClassMethodDependencies method #150

Conversation

hans-thomas
Copy link
Contributor

@hans-thomas hans-thomas commented Dec 12, 2024

Hi, it refactors the resolveClassMethodDependencies method. Tests already cover these changes.

@hans-thomas hans-thomas changed the title Refactoring resolve class method dependencies method Refactoring resolveClassMethodDependencies method Dec 12, 2024
src/Traits/GetDependenciesTrait.php Outdated Show resolved Hide resolved
src/Services/SwaggerService.php Show resolved Hide resolved
@DenTray
Copy link
Collaborator

DenTray commented Dec 16, 2024

@hans-thomas please also improve your testAddDataWithNotExistsMethodOnController, need to test that no new data was added to tmp file, so you need to call mockDriverGetEmptyAndSaveTmpData inside without the second arg (it will assert that SwaggerService save the same tmp data as it gotten without modifications)

Use mockDriverGetEmptyAndSaveTmpData instead of mockDriverGetTmpData method to ensure the recieved data will be saved without any modifications;
@hans-thomas
Copy link
Contributor Author

When the method on the controller does not exist or the controller's method doesn't have a formRequest class, the generated data will be different. These changes occur because of the null result of the getConcreteRequest method.

@hans-thomas hans-thomas requested a review from DenTray December 17, 2024 16:14
src/Traits/GetDependenciesTrait.php Outdated Show resolved Hide resolved
src/Traits/GetDependenciesTrait.php Outdated Show resolved Hide resolved
@DenTray DenTray merged commit 0916881 into RonasIT:master Dec 23, 2024
3 checks passed
@hans-thomas hans-thomas deleted the refactoring-resolveClassMethodDependencies-method branch December 23, 2024 15:32
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.

2 participants