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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:23:20+00:00 2026-06-11T10:23:20+00:00

I have narrowed my problem down to a single unit-test which involves a pretty

  • 0

I have narrowed my problem down to a single unit-test which involves a pretty clean dbal query. The query involves a nestedsets and the failure occurs when I go from 3 to 4 levels of hierarchical categories. Very little changes in terms of execution time.. And the functionality I’m work with has no problem at 10 level. However, in PhpUnit when I run the test with 4 or more levels — I get a fatal error.

*To summarize, a query that may take a split second more than usual OR a tab bit more resources is getting me a php fatal error in PHPUnit *

And the Error Looks like this:

Fatal error: Call to undefined method Monolog\Formatter\LineFormatter::stopEvent() in /var/www/my-app/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/Stopwatch.php on line 92

Someone here had a phpUnit fatal error problem on line 92 as well. Could it be related??

I’ve listed some quirky ways (below) to bypass my problem but I’d still like to know why such a basic test seems to be causing this problem.

  • Run PhpUnit with processIsolation set to “true”.
  • Don’t access the static::createClient(); in the setUpBeforeClass() method

I’ve had a respected member of #symfony (Stof) suggest that it looks like I’m improperly DI’ing @logger into a service.. but I’ve confirmed this doesn’t seem to be the by taking the logger service out of any of my services.

Maybe this issue has something to do with a timeout? (The error mentions stopevent and stopwatch). Or maybe this error has something to do with accessing $client = static::createClient(); in setUpBeforeClass().. and then accessing is again in preceding tests.. Regardless.. it’s confusing me and as far as I can tell, everything else in my Symfony2 (2.1.1) installation is working perfectly fine.

* LINE 92 of Stopwatch.php .. github source file here *

 /**
 * Stops an event.
 * @param string $name The event name
 * @return StopwatchEvent A StopwatchEvent instance
 */
public function stop($name)
{ return end($this->activeSections)->stopEvent($name);}
  • 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-11T10:23:21+00:00Added an answer on June 11, 2026 at 10:23 am

    OK. So you grab the last item from the $this->activeSections array and they try to run the stopEvent() method on it. It would seem in this case that the LineFormatter class does not have that method available to it.

    I am not familiar with Monolog, but in a brief glance at their latest GitHUb repo, I can see that neither the LineFormatter or NormalizerFormatter class which it inherits from have such a method.

    It seems like Monolog is not playing nice with Symfony. And that without modifying Monolog and/or the Symfony Stopwatch class, you will not be able to use Stopwatch to profile your Monolog-related code.

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

Sidebar

Related Questions

I have a problem with an SQL query and i've narrowed it down to
I have narrowed down my problem to the mysql_connect call I am doing in
Based on some standard web searching, I have narrowed down my problem to this:
I have quite a complex MySQL query with a problem but I have narrowed
I have narrowed down my problem to show the size of the file matters.
I have narrowed down the problem to this line: indg = nets[i]->adjlist[i].size(); // indg
I have narrowed down my issue to a derived classes copy constructor, but I
With Java and Perl background, I have narrowed down the web framework choices to
I have some rather odd behavior in my D program that I've narrowed down
I am having trouble creating a table with MySQL. I have narrowed the problem

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.