The problem When a software handles multiple concurrent operations an entire class of problems arises. In our case multiple requests would try to update centralized information leading to unique constraint violations at the database level. That was because the code would check if an entity to update already existed and…
Symfony
You all, at some point, faced the necessity to compare old and new values when storing an entity. Here is where Doctrine EntityListener comes at help. Let imagine you have this User entity
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<?php namespace App/Entity; class User { /** @var string $email */ private $email; public function getEmail(): string { return $this->email; } } |
and you want to notify the user when the email address has been changed. All you…
Il Page Object è un pattern utilizzato nei functional test per astrarre l’interazione con gli elementi della UI. All’interno di un oggetto vengono incapsulate le interazioni e le funzionalità di una pagina web che vengono esposte tramite api, nascondendo la struttura degli elementi HTML all’esterno. Per approfondire il concetto rimando…
In some circumstances knowing how to generate a criptographically secure random string could avoid to introduce a security breach in your application. If you want to create a random password for a new user or a cryptographic key, you’d better use a strong algorithm which guarantees unpredictable values. But first…
Martedi 9 Gennaio 2018 Madisoft sarà al Cowo42 di Osimo (AN) per parlare di scalabilità di applicazioni PHP. Partendo da sfide affrontate quotidianamente sul nostro software Nuvola, vedremo come siamo riusciti a scalare con successo l’applicazione per gestire milioni di visite e miliardi di dati. La serata è gratuita, compresa la…
As written before we have taken part in Symfony Day. Couple of days ago video of the event were uploaded and you can check them out here We would be happy to have feedbacks so, don’t hesitate!
Symfony form is a standalone component you can use to save a lot of time when developing an application that needs forms to interact with users (checkout my talk and slides from SfDayIt 2016 in Rome) As every powerful component/library/extension, power comes to a price. The price to pay for using…
We are very proud to have taken part at the 2017 Symfony day. Samuele and I spoke about Behat best practices and how to integrate it in your Symfony project. Here are the slides: https://www.slideshare.net/matteomoro8/behat-from-zero-to-hero-a-practical-guide-to-symfony-integration-and-usage Video of the talk will be published by Grusp in the next weeks. For any feedback…
If you are a Symfony developer you can’t miss the annual SymfonyDay conference in Italy. It’s always been a great day to listen to interesting talks and do some networking. As Madisoft we strongly believe both in this amazing framework and in such events. So, also this year, we decided to…
In a previous post we’ve seen how leverage Doctrine sharding functionalities. But how can we tell our app to use a specific shard? A common web app has usually at least two sources: http requests and cli commands. Let’s see one at the time. Http request As you already know HTTP is a…