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

implement FosUser #1362

Merged
merged 3 commits into from
Sep 12, 2015
Merged

implement FosUser #1362

merged 3 commits into from
Sep 12, 2015

Conversation

nicosomb
Copy link
Member

No description provided.

@nicosomb nicosomb added this to the 2.0.0-alpha.0 milestone Aug 18, 2015
@nicosomb nicosomb force-pushed the v2-fosuser branch 2 times, most recently from c7fe6c1 to 9119a34 Compare August 25, 2015 14:32
@nicosomb nicosomb changed the title [WIP] implement FosUser implement FosUser Aug 25, 2015
@nicosomb
Copy link
Member Author

nicosomb commented Sep 9, 2015

The implementation is over, I have a problem with unit test. I have to work on it.

@j0k3r
Copy link
Member

j0k3r commented Sep 9, 2015

@nicosomb did you have any idea or idea how to fix them?

@nicosomb
Copy link
Member Author

No idea.

Here is the error:

1) Wallabag\CoreBundle\Tests\Command\InstallCommandTest::testRunInstallCommandNoInteraction
Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing 'INSERT INTO wallabag_user (username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expired, expires_at, confirmation_token, password_requested_at, roles, credentials_expired, credentials_expire_at, name, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["test", "test", "test", "test", 1, "56fv16uilvcw048sowwwkc80ksswggc", "ed46db72cb4931aab07242b32b328218b8362941", null, 0, 0, null, null, null, "a:0:{}", 0, null, null, "2015-09-10 11:13:00", "2015-09-10 11:13:00"]:

SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: wallabag_user.email_canonical

But I don't have user with this email in my test database.

As I told on gitter few weeks ago, maybe the problem comes from sqlite https://laracasts.com/discuss/channels/general-discussion/testdummy-and-codeception-with-sqlite-in-memory-error-integrity-constraint-19

Will try with mysql (already tried, but few weeks ago ... I forgot what I did).

@j0k3r
Copy link
Member

j0k3r commented Sep 11, 2015

It wasn't related to the database.

I guess it is the FOSUser implementation that failed the test. It tried to create a new user with a username that already exist in the database. As I said in the commit message, We assume that the install command must be run to initialize a wallabag instance. NEVER to add more user. Did you agree?

@nicosomb
Copy link
Member Author

oooh yes, you're right!

Ensure that created use during install command will always be unique.
We assume that the install command must be run to initialize a wallabag instance. NEVER to add more user.

Also, use a better way to retrieve the real name of the database and not the one defined in parameters.yml (which isn't the same for test envi because the dbname isn't defined in parameters.yml but directly in config_test.yml)
@j0k3r
Copy link
Member

j0k3r commented Sep 12, 2015

@nicosomb ⚠️ ⚠️ be careful when you rebase a branch, you lost my commit here ..
I've pushed it again.

@nicosomb
Copy link
Member Author

How can I do that?

-------- Message d'origine --------
De : Jeremy Benoist notifications@github.com
Envoyé : 12 septembre 2015 11:37:15 UTC+02:00
À : wallabag/wallabag wallabag@noreply.github.com
Cc : "Nicolas Lœuillet" nicolas@loeuillet.org
Objet : Re: [wallabag] implement FosUser (#1362)

@nicosomb ⚠️ ⚠️ be careful when you rebase a branch, you lost my commit here ..
I've pushed it again.


Reply to this email directly or view it on GitHub:
#1362 (comment)

@j0k3r
Copy link
Member

j0k3r commented Sep 12, 2015

I don't really know ..

On 12 sept. 2015 11:53 +0200, Nicolas Lœuilletnotifications@github.com, wrote:

How can I do that?

-------- Message d'origine --------
De: Jeremy Benoistnotifications@github.com
Envoyé: 12 septembre 2015 11:37:15 UTC+02:00
À: wallabag/wallabagwallabag@noreply.github.com
Cc: "Nicolas Lœuillet"nicolas@loeuillet.org
Objet: Re: [wallabag] implement FosUser (#1362)

@nicosomb ⚠️ ⚠️ be careful when you rebase a branch, you lost my commit here ..
I've pushed it again.


Reply to this email directly or view it on GitHub:
#1362 (comment)


Reply to this email directly orview it on GitHub(#1362 (comment)).

@nicosomb
Copy link
Member Author

can we merge now?

@nicosomb
Copy link
Member Author

(I know. I think I didn't do git pull origin v2-fosuser)

@j0k3r
Copy link
Member

j0k3r commented Sep 12, 2015

Yep good to merge. Then we'll have to work on oAuth PR

On 12 sept. 2015 12:28 +0200, Nicolas Lœuilletnotifications@github.com, wrote:

(I know. I think I didn't dogit pull origin v2-fosuser)


Reply to this email directly orview it on GitHub(#1362 (comment)).

nicosomb added a commit that referenced this pull request Sep 12, 2015
@nicosomb nicosomb merged commit fb96ea8 into v2 Sep 12, 2015
@nicosomb nicosomb deleted the v2-fosuser branch September 12, 2015 14:13
@nicosomb
Copy link
Member Author

Finally merged :)

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.

None yet

2 participants