If you cannot use Jetbrains phpstorm/idea hotkeys with Russian layout on Ubuntu, try to install KDE instead of GNOME, because this issue doesn't appears in Kubuntu.
вторник, 11 сентября 2018 г.
вторник, 4 сентября 2018 г.
How to debug FormData object
If your FormData object named as formData in code, you can debug it with Array.from(formData.entries())
воскресенье, 2 сентября 2018 г.
[Ethereum] [Mist] geth runtime error: invalid memory address or nil pointer dereference
If you often receive mentioned error, delete ~.config/Mist/mist.lokidb file on Linux at closed Mist client.
понедельник, 20 августа 2018 г.
Fedora - how to increase browser scroll speed
To increase mouse wheel speed, just install rpm binary package from https://fedora.pkgs.org/28/russian-fedora-free-i386/imwheel-1.0.0-0.1.pre12.fc28.i686.rpm.html . After installing, you will feel that scroll speed increased. Do not forget add it to autostart
четверг, 2 августа 2018 г.
Symfony how to bind request data to form without HTML
When you want to bind data to form (for example in your REST application) as in FOSRestBundle, but after handleRequest() you doesn't have submitted data, try to map it with
$this->get('form.factory')->createNamed('', MyFormType::class, $dummy, ['csrf_protection' => false]);
, where first parameter is empty string, the second is form, $dummy is for model or entity object. So you can use form validation in simple Symfony action.
$this->get('form.factory')->createNamed('', MyFormType::class, $dummy, ['csrf_protection' => false]);
, where first parameter is empty string, the second is form, $dummy is for model or entity object. So you can use form validation in simple Symfony action.
понедельник, 30 июля 2018 г.
FOSRestBundle invalid form doesn't use ExceptionWrapper
If your FOSRestBundle response doesn't have normal type, (for example, as below):
{
"form": {
"children": {
"currency": {},
"limit": {
"errors": [
"This value should be greater than or equal to 0." ]
},
"": {},
"name": {}
}
},
"errors": []
},
As we see, there are no 'code' and 'message' keys, so FOSRestBundle type is wrong. To fix it, use$view->getContext()->setAttribute('status_code', Response::HTTP_BAD_REQUEST);for your $view object.
среда, 4 июля 2018 г.
Notice: undefined index id after changing MongoDB id to string
after using a php annotation @Mongo\Id(strategy="NONE") you can receive Notice: undefined index id PHP error, for this just run symfony cache:clear command.
Подписаться на:
Комментарии (Atom)