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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:08:58+00:00 2026-05-28T22:08:58+00:00

I am a Symblog 2 beginner and I’m following this tutorial for Symblog2 .

  • 0

I am a Symblog 2 beginner and I’m following this tutorial for Symblog2.

I have created my Data Model and tried to populate test data to my DB using Doctrine 2 fixtures.

I downloaded the necessary packages and added the following to my autoload.php:

'Doctrine\\Common\\DataFixtures'    => __DIR__.'/../vendor/doctrine-fixtures/lib',
'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',

and the follwing to AppKernel.php:

new Symfony\Bundle\DoctrineFixturesBundle\DoctrineFixturesBundle(),

My fixtures class looks like this:

<?php
namespace Soccer\MainBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\FixtureInterface;
use Soccer\MainBundle\Entity\Team;

class TeamFixtures implements FixtureInterface
{
    public function load($manager)
    {
        $team1 = new Team();
        $team1->setName('Poland');
        $team1->setImg('./img/POL.png');
        $team1->setKitHome('./img/POL_1.png');
        $team1->setKitAway('./img/POL_2.png');
        $manager->persist($team1);

        $manager->flush();
    }
}

When i try to run php app/console doctrine:fixtures:load, I’m getting the following Exception:

Fatal error: Declaration of Soccer\MainBundle\DataFixtures\ORM\TeamFixtures::load() must be compatible with that of Doctrine\Common\DataFixtures\FixtureInterface::load() in D:\xampp\htdocs\soccertips\em-symfony\src\Soccer\MainBundle\DataFixtures\ORM\TeamFixtures.php on line 8

Call Stack:
    0.0004     328688   1. {main}() D:\xampp\htdocs\soccertips\em-symfony\app\console:0
    0.0283    2043272   2. Symfony\Component\Console\Application->run() D:\xampp\htdocs\soccertips\em-symfony\app\console:22
    0.0344    2230520   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() D:\xampp\htdocs\soccertips\em-symfony\vendor\symfony\src\Symfony\Component\Console\Application.php:118
    3.3961   18394992   4. Symfony\Component\Console\Application->doRun() D:\xampp\htdocs\soccertips\em-symfony\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php:75
    3.3998   18394992   5. Symfony\Component\Console\Command\Command->run() D:\xampp\htdocs\soccertips\em-symfony\vendor\symfony\src\Symfony\Component\Console\Application.php:194
    3.4006   18395336   6. Symfony\Bundle\DoctrineFixturesBundle\Command\LoadDataFixturesDoctrineCommand->execute() D:\xampp\htdocs\soccertips\em-symfony\vendor\symfony\src\Symfony\Component\Console\Command\Command.php:224
    3.4056   18499160   7. Doctrine\Common\DataFixtures\Loader->loadFromDirectory() D:\xampp\htdocs\soccertips\em-symfony\vendor\bundles\Symfony\Bundle\DoctrineFixturesBundle\Command\LoadDataFixturesDoctrineCommand.php:97
    3.4084   18509624   8. require_once('D:\xampp\htdocs\soccertips\em-symfony\src\Soccer\MainBundle\DataFixtures\ORM\TeamFixtures.php') D:\xampp\htdocs\soccertips\em-symfony\vendor\doctrine-fixtures\lib\Doctrine\Common\DataFixtures\Loader.php:92

I understand the error message, but in my opinion, my load() method is compatible with the FixtureInterface::load.

Could someone tell me, what I’m missing? I followed the tutorial step by step.

  • 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-05-28T22:08:59+00:00Added an answer on May 28, 2026 at 10:08 pm

    The FixtureInterface::load() method has a type hint since v1.0.0-ALPHA2:

    use Doctrine\Common\Persistence\ObjectManager;
    
    function load(ObjectManager $manager);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am following this tutorial: http://tutorial.symblog.co.uk/docs/validators-and-forms.html at the swift mailer part i am not
i am following part 5 of the symblog symfony2 tutorial: http://tutorial.symblog.co.uk/docs/customising-the-view-more-with-twig.html under heading: The
Going through the Symblog tutorial of Symfony2, While creating forms I came to a
i have a json replay string and the data in that is some what
I'm plotting data which extent, in x, from -1000 to 1000. But I'm only
Right now, I have a file called validation.yml with the validation of all the
In matplotlib , I can set the axis scaling using either pyplot.xscale() or Axes.set_xscale()
I am new to symfony 2. I am trying to use custom repository in
I am new to symfony2. I started it with some tutorials and then started
There is a canonical path concept in Java. And there is a fully-qualified path

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.