Notes

Linux, WebDev and other…

February, 2015

Phalcon, PHPUnit and database

I am currently writing a REST API in Phalcon PHP framework. Database is mostly handled by ORM, but I also created few repositories for complex queries in raw SQL. Mocking all of this is very problematic so I decided to run tests on additional, test-only database. This database is populated by initial test data, which is […]

, , , ,

Symfony form & doctrine – UniqueEntity validation and field not editable by user

Simple thing. One to many relation. (In my case: User to Sport).  User can not have related duplicated entries. (but entry name can be duplicated if different user) I’am working with symfony only few days and wasted some time on this easy task, so I writed this note.