ramsey/uuid-doctrine

unable to change factory

darkorsa opened this issue · 7 comments

Although the Ramsey\Uuid library gives you full freedom to exchange generators and replace for example SystemNodeProvider with RandomNodeProvider, here you are doomed to default settings that use the passthru function, which is disabled on my server for security reasons.

The solution would be if you could set your own Factory, but at the moment it is not possible. The constructor is final private and the getUuidFactory method is private.

I know that you are trying to close objects to inappropriate changes, but could you do the getUuidFactory method at least protected? Many people work with this code in different environments and such restrictions can be frustrating.

I think it's reasonable to set both getUuidFactory() and getCodec() to protected or public. Would you like to make a pull request for this? If not, I can try to put something together soon.

Thanks!

I set both to protected since those methods are not part of the interface but are used by other methods within the class.

Hi @ramsey, is there a hope for accepting pull request in predictible timestamp?

I’m sorry for the delay in accepting this. I’ll try to get caught up on pull requests and issues over the next few weeks. Thank you for your patience!

Hi @ramsey, Christmas are coming, miracles happen, so maybe also some accepting of PR's? ;)

It’s on my list of things to review and merge during downtime over the holidays. Thanks for the reminder!

Merged #87. Will release a new version soon. Thanks!