Skip to content

Instantly share code, notes, and snippets.


Martin Århof lsv

View GitHub Profile
lsv / settings.json
Created Jun 21, 2017
visualstudio code settings
View settings.json
"editor.renderIndentGuides": false,
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Dracula",
"files.autoSave": "onFocusChange",
"editor.fontSize": 18,
"": false,
"workbench.welcome.enabled": false,
"npm-intellisense.scanDevDependencies": true,
"beautify.language": {
lsv / Menu.php
Last active Jan 11, 2020
Symfony 4 - KnpMenuBundle - menu with event
View Menu.php
// src/Menu/Menu.php
namespace App\Menu;
use App\Event\Menu\Topbar\UserMenuEvent;
use Knp\Menu\FactoryInterface;
use Knp\Menu\ItemInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\RequestStack;
lsv /
Last active Oct 6, 2021
KNP Menu Bundle - Bootstrap 4 and Font Awesome 4
lsv / symfony-deserialize.php
Last active Aug 13, 2019
is it possible to use ArrayDenormalizer, ObjectNormalizer and GetSetMethodNormalizer together?
View symfony-deserialize.php
// composer require symfony/serializer symfony/property-info symfony/property-access phpdocumentor/reflection-docblock
require __DIR__ . '/vendor/autoload.php';
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;