Good evening,
I am a beginner in web developpement and I am stuck beacause when i write thoses lines :
$produit->setCategorie($this->getReference(CategorieFixtures::INFORMATIQUE));
$produit->setCategorie($this->getReference(CategorieFixtures::ELECTROMENAGER));
There is always a red line saying that it expect 2 arguments and I only have one.
On the Online courses it works, but on my computer nothing.
And when I try this commande on my Terminal : php bin/console doctrine:fixtures:load
it says :
Too few arguments to function
DoctrineCommonDataFixturesAbstractFixture::getReference(), 1 passed
in
C:xampphtdocssymfony-sitewebsrcDataFixturesProduitFixtures.php
on line 17 and exactly 2 expected
I hope I was clear.
Here is a picture of my code :
enter image description here
I tried to install the vers 1.2.3 version of PHP but it still did not worked. Even after I reboot my VSCODE.
Then I tried to put in false all the “intelephense” on the JSON file. I rebooted my VSCODE still nothing.
And I tried to empty the cache, then I rebooted my VSCODE and nothing works.