Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9120125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:33:30+00:00 2026-06-17T05:33:30+00:00

as per the documentation: http://symfony.com/doc/current/book/security.html#retrieving-the-user-object I am trying to use twig to check to

  • 0

as per the documentation:

http://symfony.com/doc/current/book/security.html#retrieving-the-user-object

I am trying to use twig to check to see if the user is authenticated

when i put in my twig templates:

{{ app.user.username }}

I get the error

LogicException: Unable to add global "app" as the runtime or the extensions have already been initialized.

EDIT: Please find as per below the composer.json contents

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.1.*",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.0.*",
        "twig/extensions": "1.0.*@dev",
        "symfony/assetic-bundle": "2.1.*",
        "symfony/swiftmailer-bundle": "2.1.*",
        "symfony/monolog-bundle": "2.1.*",
        "sensio/distribution-bundle": "2.1.*",
        "sensio/framework-extra-bundle": "2.1.*",
        "sensio/generator-bundle": "2.1.*",
        "jms/security-extra-bundle": "1.2.*",
        "jms/di-extra-bundle": "1.1.*",
        "kriswallsmith/assetic": "1.1.*@dev",
        "doctrine/data-fixtures": "dev-master",
        "doctrine/doctrine-fixtures-bundle": "dev-master"
    },
    "scripts": {
        "post-install-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],
        "post-update-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web"
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:33:31+00:00Added an answer on June 17, 2026 at 5:33 am

    Its hard to answer to this question without more details.

    First, please notice that there have been such a similar exception in the past, due to a Symfony2.1 bug which has been solved with a recent release: see here for more details.

    Then, notice that the error seems to be thrown in addGlobal function of class Twig_Environment. Did you installed such Twig Extension?

    Without reading your composer.json, I can suggest to try to:

    1. Clear the cache.
    2. update the code in your composer.json, to avoid the presence of up to date bundles.
    3. Create the composer.phar.
    4. Then compile it to get the composer.phar.
    5. php composer.phar install or php composer.phar update, whatever be your case.

    Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Per this documentation: http://www.modrails.com/documentation/Users%20guide%20Nginx.html#_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing Socket connections continue to be shared after a Smart spawn
As per the instructions here: http://developer.apple.com/library/mac/#documentation/MusicAudio/Conceptual/CoreAudioOverview/WhatisCoreAudio/WhatisCoreAudio.html#//apple_ref/doc/uid/TP40003577-CH3-SW1 It says: The Core Audio SDK assumes you
As per [http://lessons.goxtk.com/09/][1] [1]: http://lessons.goxtk.com/09/ i need to use a .vtk file with 15,000
As per http://www.w3schools.com/cssref/sel_last-child.asp When i am trying to apply :last-child for my code, the
So according to Sun's J2EE documentation ( http://docs.sun.com/app/docs/doc/819-3669/bnani?l=en&a=view ), If a tag attribute is
As per JIRA documentation http://www.atlassian.com/software/jira/docs/latest The following filter will show the issues opned by
I've configured my Helix Server as per the documentation: http://helixforum.realnetworks.com/he ... I am attempting
Tomcat documentation (http://tomcat.apache.org/tomcat-6.0-doc/config/context.html) Only if a context file does not exist for the application
So I followed the instructions per this link http://www.opencart.com/index.php?route=documentation/documentation&path=32_35_60 but my paypal account is
I went through the documentation( http://java.sun.com/javase/6/docs/api/java/util/Iterator.html ) of Iterator.remove() there remove( ) was described

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.