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

Attempted to load class \"PropelQuery\" from the global namespace #2115

Closed
ghost opened this issue Apr 17, 2016 · 1 comment
Closed

Attempted to load class \"PropelQuery\" from the global namespace #2115

ghost opened this issue Apr 17, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 17, 2016

Hey,

I'm using FOS_UserBundle and I'm trying to load some users from my database. I'm also using fos_oauth. Hower, sending an POST to my oauth token endpoint results in an error:

POST /oauth/token

{
    "grant_type":"password",
    "client_id":CLIENT_ID,
    "client_secret":SECRET,
    "username":"foo@bar.de",
    "password":"foobar"
}

results in the following error:

{
    "code": 500,
    "message": "Attempted to load class \"PropelQuery\" from the global namespace.\nDid you forget a \"use\" statement for \"Propel\\Runtime\\ActiveQuery\\PropelQuery\"?",
    "errors": null
}

in friendsofsymfony/user-bundle/Propel/UserManager.php line 114

My fos user config:

fos_user:
    db_driver: propel
    user_class: ApiBundle\Model\Acl\Customer\Customer
    firewall_name: api

From the propel UserManager (FOS\UserBundle\Propel\UserManager)

protected function createQuery()
{
    return \PropelQuery::from($this->class); // There is no \PropelQuery in the global namespace
}

If I use the correct use statement in the header of the file, everything is working as expected:

use Propel\Runtime\ActiveQuery\PropelQuery;
@XWB
Copy link
Member

XWB commented Dec 5, 2016

Closing as Propel integration was moved to another bundle.

@XWB XWB closed this as completed Dec 5, 2016
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

No branches or pull requests

1 participant