Skip to content

Instantly share code, notes, and snippets.

View Jean85's full-sized avatar

Alessandro Lai Jean85

View GitHub Profile
@Jean85
Jean85 / composer-outdated.sh
Last active March 3, 2019 01:59
How to check in CI if any Composer dependency can be upgraded, using a committed file as a way to ignore upgrades blocked by external factors.
#!/usr/bin/env bash
rm outdated-status.txt
touch outdated-status.txt
for package in `composer outdated | awk '{ print $1":"$4 }'`;
do
echo "New version: $package" > outdated-status.txt
composer why-not $package > outdated-status.txt
echo "----------" > outdated-status.txt
@Jean85
Jean85 / abstract-event-sourcing.md
Last active January 15, 2018 12:03
Abstract: Adding Event Sourcing to an existing PHP project (for the right reasons)

Adding Event Sourcing to an existing PHP project (for the right reasons)

"Event Sourcing", along with "CQRS" (Command Query Responsibility Segregation), have recently become trending terms, and now there is so much theory, blog posts and talks about them.

However, most of these deal with the problem starting from an utopian assumption: having to write a project from scratch (greenfield), but at the same time with a high domain complexity right from the start, enough to justify the use of a complex technique like event sourcing and CQRS, which carry a fair amount of inherent complexity. But the reality greatly differs: projects are born from

Keybase proof

I hereby claim:

  • I am Jean85 on github.
  • I am alessandrolai (https://keybase.io/alessandrolai) on keybase.
  • I have a public key whose fingerprint is 4B93 A72F 5C83 4418 0B02 3DB5 5D9C 513B E4F5 798D

To claim this, I am signing this object: