Sitelet https://github.com/vivait/StringGeneratorBundle/pull/30
Skip to content

Uuid generator - #30

Merged
Brunty merged 11 commits into
vivait:masterfrom
terox:uuid-generator
Nov 30, 2017
Merged

Brunty merged 11 commits into
vivait:masterfrom
terox:uuid-generator

Conversation

@terox

@terox terox commented Jun 7, 2017

Copy link
Copy Markdown
Contributor

Hello every body,

I added an UUID generator as a new generator.

Tests could be better, but I am not a PHPSpec expert.

I hope that it helps

@kieljohn

Copy link
Copy Markdown
Member

Hi Terox, thanks for the contribution, I'm a concerned that the StringGeneratorBundle could become a tangle of dependencies if they're all under the require node composer.json. I'm thinking this would be probably be better to be put under the suggestsnode

https://getcomposer.org/doc/04-schema.md#suggest

Then the package can use a UUID generator if that package has been installed, but it will not be installed by default.

I appreciate that this is already an issue with the ircmaxell/random-lib bundle.

I'll put it to the team however.

@terox

terox commented Jun 14, 2017

Copy link
Copy Markdown
Contributor Author

Hi! I understand perfectly what are you saying. I will review it in a few days and I will move the dependencie as a composer suggest. I will add also a checking to check if the library is present or not to thrown an exception (good? :) ).

I don't understand the last line (may be my english is not enough good):

I appreciate that this is already an issue with the ircmaxell/random-lib bundle.

I will commit changes as soon as possible :)

Thank you

@kieljohn

Copy link
Copy Markdown
Member

Thanks Terox, that sounds perfect 👍 , we do appreciate your contribution and understanding. Look forward to seeing the commit.

The second point was to say that although we already require the ircmaxell/random-lib library which is an external dependency, however this allows us to create secure random strings 'by default' rather than relying on php rand or str_shuffle functions and then suggesting people install the 'secure' version of it

@terox

terox commented Nov 28, 2017 •

Copy link
Copy Markdown
Contributor Author

Hi again,

First of all sorry the delay. The last months were crazy.

I have moved the ramsey/uuid library as a suggested package and updated the README with some information about this generator.

Please check if all is fine or need a little more work or refactor. I am listening the suggestions.

Note: I think that we should install the suggested package (ramsey/uuid) to pass the tests?

Thank you so much

@Brunty

Brunty commented Nov 30, 2017

Copy link
Copy Markdown
Contributor

@terox thanks for the work on this, greatly appreciated!

I'll get it looked at :)

@Brunty Brunty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving this, just added a few comments for me to do when it's in master.

$this->shouldHaveType('Vivait\StringGeneratorBundle\Generator\UuidGenerator');
}

function let()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove empty function.

Comment thread README.md Outdated
### `UuidStringGenerator`
***For use this generator you should require the package ```ramsey/uuid``` in your application.***

For generate a UUID v4 (or v1):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Change to: "For generating a UUID"

/**
* Constructor.
*/
public function __construct()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove empty constructor

@Brunty
Brunty merged commit 3aed3ae into vivait:master Nov 30, 2017
@Brunty

Brunty commented Nov 30, 2017

Copy link
Copy Markdown
Contributor

👍 nice work, @terox!

@terox

terox commented Nov 30, 2017

Copy link
Copy Markdown
Contributor Author

Thank you ;)

I will wait the tag to use in our production projects :)

@terox
terox deleted the uuid-generator branch November 7, 2018 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants