Blog

Anzeige der Einträge mit Tag 'php'

Checksum handling with prooph components

While working on this prooph components powered API, I realized it would make sense for our mobile client to know when data changed on the server-side without constantly pulling all data from the API and comparing it locally. In a "traditional" application I would have used a checksum mechanism - e.g. creating a checksum of all the data in the datastore - but with an event sourced application this is no longer needed as we can simply rely on the timestamp of the last event happened to know if things have changed.

mehr lesen...


Verfasst von Stephan Hochdörfer am 12.09.2017 | 0 Kommentare

Automating GitLab

When we made the move to GitLab 1,5 years ago, it was clear to me that we would need some automation to simplify the creation of groups and projects and to sync the LDAP group memberships to the matching GitLab groups. I did a quick search on Packagist for GitLab client libraries and found the m4tthumphrey/php-gitlab-api package.

mehr lesen...


Verfasst von Stephan Hochdörfer am 02.08.2017 | 0 Kommentare

Why using code as DI config is a win!

In my recent talk on introducing Disco - the DI container with the damn coolest name(tm) - I talk about why I believe that using XML or any other non-code configuration (YAML, JSON, ...) is not a good idea. This stirred some twitter discussion recently which led to this blog post.

mehr lesen...


Verfasst von Stephan Hochdörfer am 24.07.2017 | 0 Kommentare

Mattermost Webhooks and PHP

In a recent attempt to automate a few things even more, I was looking for a way to post messages to our Mattermost instance via the Incoming Webhook feature of Mattermost. I did a quick search on Packagist for Mattermost client libraries and as it turns out there a quite a few. I picked the thibaud-dauce/mattermost-php package simply because it was the first match ;)

mehr lesen...


Verfasst von Stephan Hochdörfer am 19.07.2017 | 0 Kommentare

Disco 0.9.0

Last week we released Disco version 0.9.0 with a few new features and unfortunatly some BC breaks. The BC breaks are all covered in the upgrade guide, but I would like to discuss them in greater detail to give you a better understanding why those changes happened:

mehr lesen...


Verfasst von Stephan Hochdörfer am 23.06.2017 | 0 Kommentare

Late Static Binding Mocking Problem

In a recent attempt to upgrade Disco to the latest version of ProxyManager I ran into this FATAL ERROR: "Declaration of Mock_ClassGenerator_f7ebad25::setExtendedClass($extendedClass): ProxyManager\Generator\ClassGenerator must be compatible with ProxyManager\Generator\ClassGenerator::setExtendedClass($extendedClass): Zend\Code\Generator\ClassGenerator" when I tried to execute the unit tests. It took me a while to understand the source of the problem, thus I think sharing the problem might help my future me and probably you as well. Let's assume you have two classes The_Parent and The_Child:

mehr lesen...


Verfasst von Stephan Hochdörfer am 18.05.2017 | 0 Kommentare

Mocking callables in an Expressive app

While working with Zend Expressive, a PSR-7 middleware microframework, I wanted to apply some unit testing with a nice coverage to my middlewares. Middlewares are called by the __invoke method if you provide them as an object and not as a closure. The signature of the __invoke method looks like this:

mehr lesen...


Verfasst von Florian Horn am 26.04.2017 | 0 Kommentare

method_exists vs. is_callable

As it turns out method_exists and is_callable work slightly different and you might not be aware of it. I figured this out last year when I introduced protected methods in the config classes of bitexpert/disco. Recently I saw a similar issue in another open-source project and thought it might be a good idea to share my findings with the world.

mehr lesen...


Verfasst von Stephan Hochdörfer am 27.01.2017 | 0 Kommentare

Announcing Disco 0.6.0

Beginning of this week I was finally able to release a new version of Disco which comes with one major change besides from the fact that I rewrote the generator logic for the bean methods and fix a few edge-case issues in the bean creation process.

mehr lesen...


Verfasst von Stephan Hochdörfer am 09.11.2016 | 0 Kommentare

Announcing Disco 0.5.0

Yesterday I was finally able to release a new version of Disco which comes with 4 major changes that I want to highlight briefly in this blog post.

mehr lesen...


Verfasst von Stephan Hochdörfer am 02.09.2016 | 0 Kommentare