Skip to content

replaced Generator by EntityClassGenerator in MakerResetPassword #589

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

Closed
wants to merge 16 commits into from
Closed

replaced Generator by EntityClassGenerator in MakerResetPassword #589

wants to merge 16 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 16, 2020

Q A
Branch? master
Bug fix? no
New feature? - yes (internal)
Deprecations? - no
Tickets - no
License MIT
Doc PR - no need

At the request of Ryan Weaver.

I replaced the use of Generator by EntityClassGenerator.

We then needed to use ClassSourceManipulator and i propose to add 3 methods to this class, tests included.

  1. $manipulator->clearClassNodeStmts()
    Very short method to remove all Node\Stmts in the class and update the source code.

  2. $manipulator->addTrait()
    Add a use Trait; at first in the class.

  3. $manipulator->addConstructor()
    Is a shortcut to add a constructor in the right place.

I also propose to add two optional parameters to the $manipulator->addMethodBuilder() method: array $params = [], string $methodBody = null;

Allowing to build methods more directly when needed.

@ghost ghost changed the title replaced Generator by EntityClassGenerator in MakerResetBundle replaced Generator by EntityClassGenerator in MakerResetPassword Apr 16, 2020
@@ -0,0 +1,14 @@
# In all environments, the following files are loaded if they exist,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you may have accidentally committed this .env file.

Copy link
Author

Choose a reason for hiding this comment

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

yes, thanks

@jrushlow
Copy link
Collaborator

PHP-CS-Fixer is failing in CI, perhaps run vendor/bin/php-cs-fixer fix --diff --diff-format=udiff --dry-run locally to inspect the proposed changes, then run that command again without --dry-run

Copy link
Author

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Same error for veyor. I don't know all these tools yet...

@@ -0,0 +1,14 @@
# In all environments, the following files are loaded if they exist,
Copy link
Author

Choose a reason for hiding this comment

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

yes, thanks

composer.json Outdated
Comment on lines 33 to 35
"symfony/phpunit-bridge": "^4.3|^5.0",
"symfony/phpunit-bridge": "^5.1@dev",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the change in version constraints? We may want to leave this at ^4.3|^5.0. minimum-stability: dev will use the latest dev releases.

composer.json Outdated
@@ -14,13 +14,15 @@
"minimum-stability": "dev",
"require": {
"php": "^7.0.8",
"doctrine/annotations": "^1.11@dev",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this may have been added by accident. But I could be mistaken. Either way, requiring @dev would be wise here, as app in production would then be forced to use unstable branches. Same for symfony/flex

Copy link
Author

Choose a reason for hiding this comment

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

Yes, sorry. i am looking for fixing all theses errors, it is my first contribution to a collectif project i am a bit lost...

Copy link
Collaborator

Choose a reason for hiding this comment

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

hey no problem, if you have any questions feel free to DM on slack jrushlow

@ghost ghost closed this Apr 16, 2020
@ghost ghost reopened this Apr 16, 2020
@ghost ghost marked this pull request as draft April 16, 2020 18:30
@ghost
Copy link
Author

ghost commented Apr 17, 2020

Mishandling, major conflicts.

@ghost ghost closed this Apr 17, 2020
weaverryan added a commit that referenced this pull request Jun 12, 2020
…akerResetPassword (jeanMarcelMichelet, weaverryan)

This PR was merged into the 1.0-dev branch.

Discussion
----------

(Update #589) Replace Generator by EntityClassGenerator in MakerResetPassword

**UPDATE PULL REQUEST #589**
Q | A
-- | --
Branch? | master
Bug fix? | no
New feature? | - yes (internal)
Deprecations? | - no
Tickets | - no
License | MIT
Doc PR | - no need

At the request of Ryan Weaver.

I replaced the use of Generator by EntityClassGenerator.

We then needed to use ClassSourceManipulator and i propose to add 3 methods to this class, tests included.

    $manipulator->clearClassNodeStmts()
    Very short method to remove all Node\Stmts in the class and update the source code.

    $manipulator->addTrait()
    Add a use Trait; at first in the class.

    $manipulator->addConstructor()
    Is a shortcut to add a constructor in the right place.

I also propose to add two optional parameters to the $manipulator->addMethodBuilder() method: array $params = [], string $methodBody = null;

Allowing to build methods more directly when needed.

Commits
-------

43ebb4e Updating test
6fe4061 removing part of a test that is non-essential and causing problems currently
5355556 updating make-reset password to use manipulator
This pull request was closed.
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.

1 participant