Portrait of Bernhard Schussek

Hi! My name is Bernhard Schussek, but I'm generally better known as webmozart. I am a long-term member of the Symfony core team, lead developer of various Symfony components and PHP trainer and consultant. As Symfony's representative at PHP-FIG, I am a passionate proponent of interoperability in the PHP ecosystem. My latest project is Puli, a toolkit that unifies "bundles", "modules" and "plugins" across different PHP projects.

Symfony Forms Essentials Training

Learn the essentials of Symfony's Form component directly from its creator.

Level Intermediate
Duration 1 day
Participants 3 - 12

Learn more

Join an Open Training Time to Level Up

Below is a list of open trainings that you can join. Contact me if you want to organize an open training in your area.

Location Date Training More
Kiev, Ukraine Symfony Forms Essentials Details

More Open Trainings

Value Objects in Symfony Forms

Many times, Symfony developers wonder how to make a form work with value objects. For example, think of a Money object with two fields $amount and $currency:

class Money
    private $amount;
    private $currency;

    public function __construct($amount, $currency)
        $this->amount = $amount;
        $this->currency = $currency;

    public function getAmount() // ...
    public function getCurrency() // ...

Can you write a form type for this class without adding the methods setAmount() and setCurrency()? In this post, I will show you how.

Continue Reading

More Blog Posts