- Using UUID identifiers for databases in PHP projects with Doctrine
It's well known that using autoincrement identifiers for resources in a public API is not a very good idea, since you are exposing too much information about the size of your database and your business in general. The PHP community is recommending to better use UUIDs these days, because it hides tha…
category Archive — "php"
— 2015 —
- My first approach to Zend Expressive
One of the trending topics in the PHP world nowadays is the one about microframeworks. It started some years ago with Slim and Silex, but recently it has been an explossion of new microframeworks. First, Slim's team announced the third version of its own framework, which implemented the psr-7 HTTP s…
- Working with sub-namespaced modules in Zend Framework 2 the right way
About a year ago I wrote two articles discussing the best way to work with modules with sub-namespaces in Zend Framework 2. Here you can find Part 1 and Part 2 The solution provided in those articles was functional, but it introduced some new problems to deal with. It happens that after some time wo…
- Working with custom column types in Doctrine. Enums.
Doctrine is currently the most used ORM in PHP. It makes it very easy to work with databases in an object oriented way. It comes with a set of built-in column types that map database types with PHP types. For example, the datetime column type, persists the value of an entity column as a datetime in …
- Emails in Zend Framework 2 with ZF2-AcMailer version 5
About a month ago I released the Zend Framework 2 module ZF2-AcMailer version 5.0.0. This new major version includes some important improvements, and a new configuration system that allows multiple mail services to be registered. When this module was on its first version, I wrote an article explaini…
- Composer advanced concepts
Composer is The Tool in any modern PHP project. Nowadays I can't imagine to work without it. It is much more powerful than some people think, easily solving the integration of third party components in our projects, but there are some advanced features that are less known. I'm going to try to explai…
- Dynamically create doctrine entity managers in Zend Framework 2
Some time ago I published an article talking about different Doctrine configurations when using the DoctrineORMModule in Zend Framework 2 applications, so that you can create multiple database connections, either by using one entity manager or more than one. Since then, many people have asked me how…
- Managing objects creation and dependency injection with Zend\ServiceManager
Some time ago I wrote the most successful article of this blog, Advanced usage of ServiceManager in Zend Framework 2, explaining all the ways a service can be created by making use of Zend\ServiceManager, the service container component in Zend Framework 2. On this article I'm going to show a real e…
- Translations and internationalization in PHP projects with Zend\I18n
Any medium and large project has to deal at some point with the problem of translating the application itself to other languages. There are many tools and standards to do this, but one of my favourite components is Zend\I18n. Everybody who knows me is aware that I love Zend Framework, but unfortunat…
— 2014 —
- Setting up a PHP development environment with Vagrant
Setting up a development environment is not always easy, specially for web development. Sometimes you need to install and configure plenty of applications. A database server, a web server, server-side programming language binaries, mail server, job queue server, specific package managers, building t…