Clone object of Doctrine Entity with relations

Sometimes you need create copy of entity. What if entity have children? What if their children have children? We’ve got interesting task to deep clone.

Imaging you have related entities:

  1. Form
  2. Section
  3. Field

Form have some sections, sections can have a lot of fields.

Now we need to clone Form entity with careness about all relations.
Continue reading “Clone object of Doctrine Entity with relations”

Бесполётные зоны для авиамоделей в Республике Беларусь

Скачать оффлайн версию: https://goo.gl/ygbQ8z



Tricks of depends_on in docker-compose

Usually, I don’t like to write about bugs or flaws of docker-compose, cause I have hope, after short time it will be fixed, and this article will become outdated.
But a lot of people want to work with Docker-compose already now, and we all together step on the same rake. I want to tell you my Docker experience.
If we have only one container, and pack of services inside of it: nginx, php, postgresql or mysql, then you can’t understand Docker magic.
Such approach isn’t following to new trend: microservices, divide complex services to simple. Connect simple services between each other. Makes flexible. Continue reading “Tricks of depends_on in docker-compose”

ReSTful API Symfony project in Docker containers [DEV ENV]

Git for windows: https://git-scm.com/download/win (Install it!)
Docker: https://docker.com (Install it!)
Git Repository: https://bitbucket.org/onekit/rest-tutorial/ (open to see code)

To see how ReSTful API works inside on Symfony and how to setup with docker in 3 steps:
1 – Download project (“git clone https://bitbucket.org/onekit/rest-tutorial/“)
2 – Install project (“docker-compose up -d“)
3 – Open localhost in browser