Giter Site home page Giter Site logo

Don't work with Fixtures? about symbok-bundle HOT 6 CLOSED

mtarld avatar mtarld commented on May 26, 2024
Don't work with Fixtures?

from symbok-bundle.

Comments (6)

mtarld avatar mtarld commented on May 26, 2024 1

Indeed I succeeded to reproduce it.
It seems to be related to the class loading order in Symfony console context. Therefore every command is affected.

It's a weird a deep issue, I'll try to figure it out ASAP.

Thanks for the report!

from symbok-bundle.

mtarld avatar mtarld commented on May 26, 2024 1

I was wrong about my previous guess.

As mentioned in #50, only some of doctrine related commands were affected. You can have a look at the detailed description in the related PR, which should fix it in 2.2.0

from symbok-bundle.

mtarld avatar mtarld commented on May 26, 2024

Hi!

What kind of fixtures are you talking about? Can you paste a tiny example?

from symbok-bundle.

michaelmeneses avatar michaelmeneses commented on May 26, 2024

I add Data annotation in my class and run php bin/console symbok:update:classes.
My class was updated: Did add @method annotation. Ok!

But I use bin/console to execute Doctrine Fixtures don't work.

php bin/console doctrine:fixtures:load -n

   > purging database
   > loading App\DataFixtures\AvaFixtures
   > loading App\DataFixtures\ProgramaFixtures

In ProgramaFixtures.php line 24:
                                                                                         
Attempted to call an undefined method named "setNome" of class "App\Entity\Programa".
                                                                                         

doctrine:fixtures:load [--append] [--group GROUP] [--em EM] [--shard SHARD]
[--purge-with-truncate] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version]
[--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>

My Class:

<?php

namespace App\Entity;

use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use Mtarld\SymbokBundle\Annotation\Data;

/**
 * @ApiResource ()
 * @Data ()
 * @ORM\Entity (repositoryClass=ProgramaRepository::class)
 * @method mixed __construct(int $id, string $nome)
 * @method int|null getId()
 * @method self setId(int $id)
 * @method string|null getNome()
 * @method self setNome(string $nome)
 */
class Programa { (...)

from symbok-bundle.

mtarld avatar mtarld commented on May 26, 2024

Thanks for the example, I'll have a look ASAP, it's strange indeed

from symbok-bundle.

michaelmeneses avatar michaelmeneses commented on May 26, 2024

I am using Symfony 5.0.8

from symbok-bundle.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.