How I track work in my timelog

As a programmer who works with different tasks, projects and even teams it is important to be able to report work time either when settling with client, superiors or during the daily Scrum. There are some browser-based tools but they ain’t comfortable when you have opened many tabs at once.

Continue reading »

What's new in PHP 8.0

PHP 8.0 is right behind a corner. By now PHP 8.0.0 Beta 3 is available for testing and RC1 is planned for September 17. Beside JIT, few interesting features are introduced with this major version.

Continue reading »

How I organize project code

There are many ways how to organize project code. There are probably almost as many ways as there are people writing code and two may vary even in the same organization. When organizing your project code, it is good practice to separate the domain code from the infrastructure code. And it does not matter whether our application will work with Symfony, Laravel, Laminas or the framework-agnostic.

Continue reading »

How to retrieve all Variables from a Twig Template

Just had to figure out how to retrieve all variables from a Twig Template. Of course there is a DebugExtension which allows me to use {{ dump() }} in template. But I couldn’t use it because I wasn’t rendering my template. Here is a scenario…

Continue reading »

Implementing Aggregate Repository

When it comes to persisting an aggregate we have several options. We can take the current state of object and save it in chosen storage. Whether it will be a relational or document-based database we will need a layer that help us map our objects into its schema, like ORM. However, when we want to save Event Sourced aggregate we need to take all recorder events and append them to Event Stream. Those streams can be persisted in physical storage which will be represented by Event Store which can be relational or document database, or dedicated tools like EventStore.

Continue reading »

Making friendly configuration in Symfony without a Bundle

Every time we want to have custom and friendly configuration in Symfony, the best way to do that was to create a Bundle which registered its own extension and … tadaa. Although Bundles at some point become a way to organize application code which makes sense no because Symfony is just a framework. After all it is business and/or infrastructure that should be reason how code gets organized. But bundles still exists and will remain as long people will keep creating reusable components and since Symfony 5, bundles are discouraged to be used in other manner.

Continue reading »

How I did my own implementation of Event Sourcing

After playing around with prooph and broadway, I finally decided to write something on my own. Took me little more than an hour and two classes later I have what I need for now to work on domain. Seriously. Writing this article took me more time than actual implementation.

Continue reading »

Docker - best practices

I have been using a docker for some time. Most of the knowledge I have is empirical acquired by numerous trials and supported by even more errors. Recently, I tried to gather and organize everything in one place.

Continue reading »

Running Docker behind proxy

Disclaimer: there are bunch of tutorials on how to do this. I’ve already tried setting proxy in OS env and /etc/docker/daemon.json file. Both without success just like few other tries. I’m writing down how I achieved this on my Ubuntu 18.04.

Continue reading »

Obfuscation with Cesar Cipher

Cryptography is everywhere. Securing data, connections, authorizations, anonymity, cryptocurrency, blockchain. Everywhere. Lately I’ve been digging into cryptography and found out that I know nothing about it. Or not as much as I thought. As for myself cryptography was underestimate and at least used incorrectly.

Continue reading »