Skip to content

Instantly share code, notes, and snippets.

View cleancodemonkey's full-sized avatar

Anton cleancodemonkey

  • Somewhere
View GitHub Profile
@cleancodemonkey
cleancodemonkey / faq.md
Created March 4, 2020 07:50
Ответы на часто задаваемые вопросы

Q: Почему я не использую готовые скелеты приложений при использовании фреймворка Slim?

A: Они содержат то, что не всегда нужно, а сама идея микрофреймворков как раз и заключается в том, чтобы добавлять в проект только то, что нужно, и ничего больше.

@cleancodemonkey
cleancodemonkey / docker-composer.sh
Last active July 25, 2020 08:04
The list of useful docker commands to initialize new composer projects
docker run --rm --interactive --tty --volume $PWD:/app -u $(id -u):$(id -g) composer create-project symfony/skeleton sf-minimal
@cleancodemonkey
cleancodemonkey / array-validation-error-mapping.php
Created November 2, 2018 04:26 — forked from webmozart/array-validation-error-mapping.php
A little experiment: Validating (potentially multi-leveled) arrays with the Symfony2 Validator component and returning the errors in the same data structure as the validated array by using the Symfony2 PropertyAccess component.
<?php
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\Validator\Constraints\All;
use Symfony\Component\Validator\Constraints\Choice;
use Symfony\Component\Validator\Constraints\Collection;
use Symfony\Component\Validator\Constraints\Length;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Optional;
use Symfony\Component\Validator\Constraints\Required;