Dragos Holban

php-ides

7 PHP IDEs for 2018 Software Development

As we mentioned in our previous article, PHP remains a crucial programming language in 2018 as a result of its flexibility in building Saas and Paas solutions from scratch. And since the only way you can continue to be competitive and productive as a developer is to write effective code, we consider useful to gather the best IDEs that will streamline your PHP development process. PHPStorm With…


How to Setup Docker for Your Symfony Project

As you probably know, I am a big Symfony fan :) In the last few years I used Vagrant to set up my Symfony development environment more or less as described here. But we now have Docker and it’s time to move forward with a new setup. Docker containers are generally more lightweight than Vagrant virtual machines, so starting and stopping them is extremely fast. They also take a lot less disk……


How to Get Nearby Locations from MySQL Database

If you have a MySQL table with locations (latitude and longitude columns) you can get a list of locations near a specific point using the following query: [crayon-60faf3c09b824780820404/] In this query we have noted the latitude of the reference point with <latitude>, its longitude with <longitude> and the maximum distance to search for with <distance> (in kilometers). To make…


Symfony OAuth Authentication for Your Mobile Application

Let’s say you built an API using Symfony and you need to access it from a mobile application using authenticated requests on behalf of your users. Here’s how to make this work using Symfony 2.8 and Doctrine. Install FOSOAuthServerBundle We will use the FOSOAuthServerBundle to implement this feature. Install it using the following command: [crayon-60faf3c09bcea683625778/] Next, enable the bundle…


Face Detection with Apple’s iOS 11 Vision Framework

Great stuff is coming from Apple this autumn! Among a lot of new APIs there is the Vision Framework which helps with detection of faces, face features, object tracking and others. In this post we will take a look at how can one put the face detection to work. We will make a simple application that can take a photo (using the camera of from the library) and will draw some lines on the faces it…


Building a Travel Photo Sharing iOS App

Hello! I want to show you how to build a relative simple photo sharing app with a twist: your images will be placed on a map background of your current location. You will also be able to add a short message and your name, to end up with an image looking like this (so you can brag to your friends with what you visited in the awesome vacation you have): To follow this tutorial you need an Apple…


Introduction to React Native

React Native is a framework for building native apps using React made by Facebook. With React Native, you don't build a “mobile web app”, an “HTML5 app”, or a “hybrid app”. You build a real mobile app that's indistinguishable from an app built using Objective-C or Java. React Native uses the same fundamental UI building blocks as regular iOS and Android apps. You just put those building blocks…


tinyint, symfony, doctrine

How to add TINYINT MySQL type to Doctrine in Symfony 2.8

Hello! A few days ago I needed to define an entity with a TINYINT type column to hold a rating value between 1 and 5. I was doing this in a Symfony 2.8 project and to my surprise, Doctrine was unable to handle this type of data out of the box (it uses it for booleans but it has no TINYINT standalone type). So I searched the internet for a solution and I found some but nothing complete. The…


Setup Docker Machine for Symfony Development

If you need a development environment for Symfony, hosted by Docker, you can use the fazy/apache-symfony docker image to start with, then extend it to your need. In your Symfony project's folder add the Dockerfile and docker-compose.yml files. In the first one, we added mysql and composer, then we used the docker-compose.yml file to mount a local volume to the docker container with file sync.…


How to monitor Symfony and Apache logs with M/Monit

So you have developed and deployed a fresh new project and you want to be alerted in case an error happens. Here's how you do it using the M/Monit tool. It can be installed on an Ubuntu machine using the following command: [crayon-60faf3c09ed60026296866/] Now edit the /etc/monit/monitrc configuration file and add the following: [crayon-60faf3c09ed66692769846/] First we need to tell M/Monit what…