Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DoctrineTokenProvider issue with postgresql #21467

Copy link
Copy link
Closed
@PF4Public

Description

@PF4Public
Issue body actions
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? yes
Symfony version 3.2.1

There is an issue with DoctrineTokenProvider if using postgresql.

The problem is that by default postgresql is not case-sensitive unless you apply quotes to your arguments.
Thus creating lastUsed table as suggested might result in creating it all-lowercase. All is fine untill you hit:

    return new PersistentToken($row['class'], $row['username'], $series, $row['value'], new \DateTime($row['lastUsed']));

which will throw exception as there's no such field in table. Looks like changing the field to be exactly lastUsed might help, but for me exceptions start happening even earlier, since this time some other queries could not obtain this field properly. I ended up replacing 'lastUsed' to be 'lastused' in that particular line.

Therefore I wonder is there any better approach to fix this?

As I'm afraid fixing this way might break this code for mysql or any other database.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.