Skip to content

Unrecognized options "default_locale" under "framework.session" AND Call to undefined method Symfony\Component\ClassLoader\DebugUniversalClassLoader::useIncludePath() #2509

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

Closed
ilbp90 opened this issue Oct 28, 2011 · 11 comments

Comments

@ilbp90
Copy link

ilbp90 commented Oct 28, 2011

I've downloaded this file (.tar) and it still doesn't work with postgres schemas.

root@-M5x0N:/home/symfony2# php app/console cache:clear --env=prod --no-debug

Clearing the cache for the prod environment with debug false

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized options "default_locale" under "framework.session"

cache:clear [--no-warmup]

root@-M5x0N:/home/symfony2# php app/console doctrine:mapping:import "AcmePruebaDBBundle" xml

PHP Fatal error: Call to undefined method Symfony\Component\ClassLoader\DebugUniversalClassLoader::useIncludePath() in /home/symfony2/vendor/symfony/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php on line 41

Fatal error: Call to undefined method Symfony\Component\ClassLoader\DebugUniversalClassLoader::useIncludePath() in /home/symfony2/vendor/symfony/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php on line 41


Before i installed this file, the error was

root@ileana-M5x0N:/home/symfony2# php app/console doctrine:mapping:import "AcmePruebaDBBundle" xml

[Doctrine\DBAL\DBALException]
Unknown database type requested, Doctrine\DBAL\Platforms\PostgreSqlPlatform may not support it.

doctrine:mapping:import [--em[="..."]] [--filter="..."] [--force] bundle [mapping-type]

@stof
Copy link
Member

stof commented Oct 28, 2011

The first error (about the locale) is because you upgraded to Symfony master without reading the UPGRADE file describing the needed change.
the second error is because you did not rebuild the bootstrap.php.cache file after this upgrade and so you are still using the old version of some of the classes whereas the other ones are using the new methods

@stof
Copy link
Member

stof commented Oct 31, 2011

Seems like you are using a really old version of Symfony. The MapFileClassLoader has been replaced by a MapClassLoader during the beta. And the uptodate build_bootstrap.php script is now in SensioDistributionBundle, not in bin/

@ilbp90
Copy link
Author

ilbp90 commented Oct 31, 2011

I've downloaded the lastest versions of symfony without vendors, and installed the vendors via terminal,
I've run php app/bootstrap.php.cache,
and run php app/console doctrine:mapping:convert xml ./src/Acme/BlogBundle/Resources/config/doctrine/metadata/orm --from-database --force

And i still get this error for trying to introspect an existing database and create mapping information

 [Doctrine\DBAL\DBALException]
   Unknown database type  requested, Doctrine\DBAL\Platforms\PostgreSqlPlatform may not support it.

What's the right command for rebuilding the app/bootstrap.php.cache???
Is it necesary to select a schema somewhere???

Appreciate your answer...

@stof
Copy link
Member

stof commented Oct 31, 2011

The unknown type is an empty type here (see the 2 spaces with the type between them). This is a bug in Doctrine DBAL regarding PostgreSql. It may have been fixed in the DBAL master branch (which will probably require using the master branch of Common and ORM as well) as it has been reported a while ago but not sure.
@beberlei can you confirm ? I saw the discussion on IRC but I haven't found the ticket for this on JIRA.

@ilbp90
Copy link
Author

ilbp90 commented Nov 7, 2011

So i've updated Doctrine DBAL master branch, Common and ORM.
I've rerun

 php app/bootstrap.php.cache

and run

 @:/home/Symfony2# php app/console doctrine:mapping:import "AcmeTaskBundle" xml --em=default --force

but I still get the same error

 [Doctrine\DBAL\DBALException]
    Unknown database type  requested, Doctrine\DBAL\Platforms\PostgreSqlPlatform may not support it.

What could be the problem???

@ilbp90 ilbp90 closed this as completed Nov 7, 2011
@ilbp90 ilbp90 reopened this Nov 7, 2011
@fabpot
Copy link
Member

fabpot commented Nov 7, 2011

Can you ask for support on the Symfony mailing-list? Thanks.

@fabpot fabpot closed this as completed Nov 7, 2011
@ilbp90
Copy link
Author

ilbp90 commented Nov 15, 2011

The problem is Doctrine's... It doesn't have compatibility with postgres9.1, but with postgres8.4.
Installed 8.4. Worked. And then another problem with Symfony/Doctrine and schemas in postgres came up.

@stof
Copy link
Member

stof commented Nov 15, 2011

@ilbp90 Can you open a ticket in the Doctrine issue tracker about the Postgres9.1 support ?

@ajayjagad
Copy link

Hello,

Please anybody reply for this error Unrecognized options "default_locale" under "framework.session"

Thanks & Best Regards,

J Ajay.

@stof
Copy link
Member

stof commented Mar 19, 2013

Read the UPGRADE file. The default locale is not a session setting anymore since 2.1 as the locale is not managed by the session anymore.

@avisolutions
Copy link

Thanks! stof,

But When I setLocale with $request->setLocale('fi') and $request->getSession()->set('_locale', 'fi'), is not getting effected,

Should I comment fallback in config.yml? and other action need to do.. please advise.

Thanks & Best Regards,

J Ajay.

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

5 participants