Skip to main content

method_exists vs. is_callable

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 3 min read
Stephan Hochdörfer
Head of IT Business Operations

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.

Upsert with PostgreSQL

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 3 min read
Stephan Hochdörfer
Head of IT Business Operations

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.

Using the Silverstripe TemplateParser for something else...

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

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 looknfeel 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 ;)

Announcing Disco 0.6.0

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· One min read
Stephan Hochdörfer
Head of IT Business Operations

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.

DevOps Camp compact 2016 Retrospektive

· 2 min read
Marcel Dupré
Marcel Dupré

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.

Announcing Disco 0.5.0

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 3 min read
Stephan Hochdörfer
Head of IT Business Operations

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.

Enforce software layer dependencies with deptrac

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 3 min read
Stephan Hochdörfer
Head of IT Business Operations

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:

Delivering files with PSR-7

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

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.

Running Matrix builds with GitLab CI

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

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.

Having fun with PSR-7

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 3 min read
Stephan Hochdörfer
Head of IT Business Operations

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 ;)