symfony

3 Articles 0 Followers

Symfony and PHP attributes

The last stable version of Symfony : 5.2 now uses new PHP 8.0 feature : attributes.  PHP Attributes PHP attributes offer a way to add metadata information on classes, methods, parameters... Here is how you can create an attribute : #[\Attribute] clas...

Jon92 1 minute read 4 Apr 2021 0 comments $0.03

Symfony 5 php object to array conversion

Hello all!     Today one tip (for a tip!), for automatic, correct, recursive, pain-free method to converting php object to json, under symfony 5 php framework. You know it's a common need but not so well addressed in fact, with such a simplicity, avo...

d-erf 1 minute read 13 Oct 2020 0 comments $0.53

Symfony 5 php mongo odm array field

Hello,   I've been searching this information for a couple of hour, and as it's now well documented, i publish solution to prevent other people losing to much time for same need.   Mongodb odm in a symfony 5 project.   How to annotate type in Documen...

d-erf 1 minute read 10 Oct 2020 0 comments $1.27