Blog

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

Upsert with PostgreSQL

Since version 9.5 PostgreSQL provides support for upsert. Upsert allows you to "atomically either insert a row, or on the basis of the row already existing, UPDATE that existing row instead, while safely giving little to no further thought to concurrency". While experimenting with the Prooph Event Store library I came across a good use-case for upsert, so I gave it a try. The goal was to build a projection based on the event stream to count the number certain events based for a specific day - think of registrations per day.

mehr lesen...


Verfasst von Stephan Hochdörfer am 03.01.2017 | 0 Kommentare

Using the Silverstripe TemplateParser for something else...

We are currently experimenting with Bookdown to generate the documentation for our open-source components in one central location. Obviously the generated site should have a similar look`n`feel as this blog or our website. Since both instances are powered by Silverstripe and share a theme I was curious if it is possible to use this theme within Bookdown. As it turns out, it is not that difficult ;)

mehr lesen...


Verfasst von Stephan Hochdörfer am 30.12.2016 | 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

DevOps Camp compact 2016 Retrospektive

Vor Rund einem Jahr war ich zum ersten Mal bei einem DevOps Camp in Nürnberg. In einem Jahr finden zwei solcher Veranstaltungen statt, einmal das "große" Camp mit über zwei Session-Tage im Frühjahr und das DevOps Camp compact mit einem Session-Tag im Herbst. Typisch für ein Barcamp ist die Planung der Themen und der Session-Ablauf, diese werden erst vor Ort von den Teilnehmern genau definiert.

mehr lesen...


Verfasst von Marcel Dupré am 11.10.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

Enforce software layer dependencies with deptrac

Deptrac is a tool recently announced by Sensionlabs. It helps you keep dependencies between the different layers in your architecture under better control by providing insight into the current state of the dependencies and warns you when unwanted dependencies get introduced. To use Deptrac in your application either download the .phar file or add the following dependencies to your Composer configuration:

mehr lesen...


Verfasst von Stephan Hochdörfer am 18.08.2016 | 0 Kommentare

Delivering files with PSR-7

When it comes to reading and returning the contents of a file in a PSR-7 middleware most developers seem use code that does the following: Read the file first, then write it to the response body.

mehr lesen...


Verfasst von Stephan Hochdörfer am 09.08.2016 | 0 Kommentare

Running Matrix builds with GitLab CI

We recently started experimenting with the GitLab CI Runners as we are looking to replace our "old" Jenkins v1.x set up with something new. And since over the last few weeks we had some issues with the Jenkins GitLab plugin we thought it might a good idea to take a deeper look into the GitLab CI Runners. One the plus side the GitLab CI Runners are configured via a YAML file in a similar fashion as you would configure Travis CI which we use to build our open-source components. Since on Travis we rely a lot on the so-called matrix builds to run the unit tests for different PHP versions I was wondering how we could solve the problem with GitLab CI. At first glance GitLab CI does not have a matrix build command but it comes with a feature called Anchors which kind of act as a template that can be merged in a job configuration.

mehr lesen...


Verfasst von Stephan Hochdörfer am 03.08.2016 | 0 Kommentare

Having fun with PSR-7

When I came up with the idea to build a PSR-7 based flat-file CMS I thought that it must be fairly trivial to build a static page exporter by simply "faking" requests and storing the resulting responses. Turns out I was right and this an quick recap of what I did ;)

mehr lesen...


Verfasst von Stephan Hochdörfer am 25.07.2016 | 0 Kommentare