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 5841037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:50:11+00:00 2026-05-22T11:50:11+00:00

I have set up some custom symfony project-level settings in the file config/project.yml following

  • 0

I have set up some custom symfony project-level settings in the file config/project.yml following the suggestion in How to manage your own cross-apps/global configuration values. Following these instructions I added the line

require_once sfConfigCache::getInstance()->checkConfig('config/project.yml');

to the configure method of my client application’s clientConfiguration.class.php file.

I then created a new symfony task using php symfony generate:task. In this new task I want to access the settings in the config/project.yml file. Here is the execute portion of the task:

protected function execute($arguments = array(), $options = array()){
  // initialize the database connection
  $databaseManager = new sfDatabaseManager($this->configuration);
  $connection = $databaseManager->getDatabase($options['connection'])->getConnection();

  $configuration = ProjectConfiguration::getApplicationConfiguration('client', 'test', true);

  echo sfConfig::get('project_mail_webmaster') . "\n" ;
}

However, when I run the task I get this error:

PHP Fatal error:  Call to undefined method sfConfigCache::getInstance() in /opt/sfproject/apps/client/config/clientConfiguration.class.php on line 7

http://trac.symfony-project.org/wiki/HowToHandleCrossAppsConfigurationFiles

  • 1 1 Answer
  • 1 View
  • 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-05-22T11:50:12+00:00Added an answer on May 22, 2026 at 11:50 am

    It appears that this was already answered in Stackoverflow in How to create a custom yaml config file in Symfony.

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

Sidebar

Related Questions

I am using RabbitMQ with Celery and I have set some custom routing settings
I have been trying to build a user control with some custom properties set
I have some custom files in the root of the Web application, set to
I have a web control with some custom javascript. The javascript creates new file
I have some custom made dialog that have on it Set Button , I
I have created a custom facelets component and I need to set some value
i have the following problem: i need to send some custom info with every
I've set up some custom config sections in my App.Config, such that I now
I have created a custom UIView that has some set of UILabels in it.
In my init I have set some variables and one animate that uses those

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.