Giter Club home page Giter Club logo

hidden-entity-type-bundle's People

Contributors

glifery avatar kwuerl avatar nicklog avatar scolandrea avatar symfonyway avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hidden-entity-type-bundle's Issues

Migrate Doctrine

Hello,

it possible to migrate
"doctrine/persistence": "^1.3|^2.0",
to
"doctrine/persistence": "^1.3|^2.0|^3.0",

Thanks

Symfony 5 support

Have tried to install this with composer, within a symfony 5 project.
The installation fails because not all requirements could be solved.

Since "doctrine/doctrine-bundle": "^1.6" wont work with symfony5, can't you just modify that line in composer.json to : "doctrine/doctrine-bundle": "^1.6|^2.0" ?

Tried that out and it seems to work for me.

php 8 compatibility ?

i use this for a long moment with php 8 without any problem i just need to use. --ignore-platform-reqs

it’s possible to update this bundle for assure a php8 compatibility ?

Multiple null

Hi,

I get an error saying the new value must be an array or an instance of \Traversable, "NULL" given. when I try to submit a form with a HiddenEntityType set with multiple => true with no data.

IMO, the reverseTransform function of the ObjectToIdTransformer class should return an empty array if the $id is null and isMultiple() is true instead of null to fix that. See below:

public function reverseTransform($id)
{
    if (!$id) {
        if ($this->isMultiple()) {
            return [];
        }

        return null;
    }
}

Or am I wrong and I missed something?
Thank you!

Doesn't work with Symfony 4+ ?

When I try use this with Symfony 4, it doesn't seem to load the data?

I'm using it like the following:

            ->add('netgroups_hidden', HiddenEntityType::class, [
                'class' => Netgroup::class,
                'property' => 'name',
                'data' => function ($netgroup) {
                    return $netgroup->getName();
                },
                'multiple' => true,
                'required' => false,
                'mapped' => false
            ])

Which produces the following in my form

<input type="hidden" id="people_netgroups_hidden" name="people[netgroups_hidden]">

Property id is missing in class (SF 4.3)

Hi.
When I did update Syfmony from 4.2 to 4.3.9, so this component seems not working. Have you tested it on version ^4.3? I have installed version 3.2.1. My PHP is 7.2.24
Thanks.
Regards.

Uncaught PHP Exception Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException: "property id is missing in class App:Domain" 
at /Users/Ducho/Sites/new-website/vendor/shapecode/hidden-entity-type-bundle/src/Form/DataTransformer/ObjectToIdTransformer.php line 146
{
    "exception": {}
}

App:Domain

/**
 * Domain
 *
 * @ORM\Table(name="domain")
 * @ORM\Entity(repositoryClass="App\Repository\DomainRepository")
 */
class Domain
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     */
    protected $id;

Form

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('username', TextType::class, [
                'label' => 'ftp.username',
                'required' => true,
                'constraints' => [
                    new NotBlank(),
                ]
            ])
            ->add('domain', HiddenEntityType::class, [
                'class' => 'App:Domain'
            ])

Deprecation message in new doctrine versions

The "Doctrine\Common\Persistence\ManagerRegistry" service alias is deprecated, use "Doctrine\Persistence\ManagerRegistry" instead. It is being referenced by the "Shapecode\Bundle\HiddenEntityTypeBundle\Form\Type\HiddenObjectType" service.

In new versions we are need use Doctrine\Persistence\ManagerRegistry instead Doctrine\Common\Persistence\ManagerRegistry in
Shapecode\Bundle\HiddenEntityTypeBundle\Form\Type\HiddenObjectType

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.