OpenAPI with PHP – documenting and testing API automatically

Note: the code mentioned in this post can be found here: https://github.com/lezhnev74/openapi-php-demo. Photo by Dane Deaner on Unsplash OpenAPI introduction OpenAPI Initiative (OAI) (official website) is an attempt to create a universal (vendor-neutral) description language for REST APIs. It is a part of the Linux Foundation and a lot of …

PHP user group Екатеринбург

Привет! Если вы живете и работаете в Екатеринбурге и хотите принять участие в локальной User Group по языку PHP, напишите мне на lezhnev.work@gmail.com. Цель группы – обмениваться опытом в этой сфере, обсуждать текущие тренды и идеи в веб-разработке и конкретно язык PHP. Я не нашел действующих публичных групп в интернете, …

Value Objects in PHP

The best thing that happened to my code is using Value Objects (VOs). In computer science, a value object is a small object that represents a simple entity whose equality is not based on identity: i.e. two value objects are equal when they have the same value, not necessarily being …

How Active Record harms domain logic

The most critical part of a system is writing, altering the state. This operation has the most business responsibility. When you change data, you want to do this in a single place that you control. This might be a command like UpdateBalance. This command accepts data and performs a series …

Think “frameworkless”

A great discussion about frameworkless happened in comments under this post. Answering Leo here. I am a big fan of Laravel as well. The framework has solved a lot of problems: DB data exchange HTTP routing and middlewares dependency container a queue and more. I don’t have any intention to …

PHP 7: Zend Certified Engineer Exam (ZCE)

Shortly 12 month ago I’ve started thinking it’d be awesome to actually take the exam. 6 month ago I downloaded the study guide and begun taking notes. Yesterday I have passed the Zend Certified Engineer exam. It took roughly a year for me to feel confident enough to actually take …

A hacker and a nerd – the two hats of engineers

From my experience working in 3 companies which were developing a product, I can say that 80% of code we produced was redundant. I mean it was developed to support services that did not find the “product-market fit”. In other words, founders’ assumptions about what market needs failing after significant …

Validation is documentation

Separation of concerns In clean architecture, we keep our codebase decoupled. It means, for example, keeping data retrieval mechanism hidden from the consumer. Let’s say a developer who writes front-end code (controllers, routes, views) needs some data to draw a page. He is not allowed to query the database directly, …