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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:16:13+00:00 2026-06-15T22:16:13+00:00

Does Symfony automatically remove factory services? Don’t know what’s going on, but my bundle

  • 0

Does Symfony automatically remove factory services?

Don’t know what’s going on, but my bundle is correctly loading service.xml file:

<services>
    <service id="gremo_subscription_factory"
        class="%gremo_subscription_factory.class%" public="false">
        <argument>%gremo_subscription.interval%</argument>
    </service>
    <service id="gremo_subscription" class="%gremo_subscription.class%"
        factory-service="gremo_subscription_factory"
        factory-method="getSubscription">
    </service>
</services>

This is done by the extension class:

public function load(array $configs, ContainerBuilder $container)
{
    $processor = new Processor();
    $configuration = new Configuration();

    $config = $processor->processConfiguration($configuration, $configs);
    $loader = new XmlFileLoader($container,
        new FileLocator(__DIR__.'/../Resources/config'));

    $loader->load('services.xml');
}

The definition for services gremo_subscription_factory exists (var_dump the container shows the service definition) in the bundle. However when I try to access gremo_subscription service (from a controller, for example) from another bundle:

$subscription = $this->get('gremo_subscription');

I get the exception:

You have requested a non-existent service
“gremo_subscription_factory”.

Why this is happening?

  • 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-15T22:16:14+00:00Added an answer on June 15, 2026 at 10:16 pm

    You shouldn’t set the gremo_subscription_factory as private.

    Remove the public="false" flag on the service.

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

Sidebar

Related Questions

My Symfony 1.3 project does not sync correctly with my SSH server. I have
Does anyone know how to add stylesheets in a template with Symfony 1.4 ?
Does anyone know how to translate form error messages in Symfony ? At the
Does anyone know if there is a way to generate different code in the
Does anyone know of a free tool, similar to what is built into Visual
Does anyone know why UsernameExists wont return True. I must have my syntax messed
Does anyone out there know how to integrate ContentFlow ( http://www.jacksasylum.eu/ContentFlow ) and Lightbox2
Does the symfony cache system handle ext2 32000 files in the same directory limitation
I read that Symfony does not work well on a shared hosting environment, why
I'm using Symfony 1.4 with Doctrine. Sorry if this is a silly question but

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.