One of our internally used application uses HTTP Basic auth to authenticate a user against our LDAP instance. In a recent attempt I had the need to expose one endpoint publicly without the need of an authentication. I tried several solutions but each of them did not work for my specific use case. At first I tried several Location directives but that did not work as expected. I also tried the LocationMatch directive which also did not work. By accident I came across a blog post stating that Apache 2.4 supports if/else style syntax and that seemed to work fine for me.
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...
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.
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 ;)
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.
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.
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.
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:
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.
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.