Chances are, if you are writing software, you have some dependencies on other peoples code. There is no reason to reinvent the wheel, so you use the code someone else wrote. One of your options is to copy paste it, but then you won’t get any updates if they release a new version.
This is where dependency managers come into play. With a set of instructions, they retrieve the needed dependencies for you, and allow you to lock into specific versions, and update when you want. Before we head into dependency managers, lets first talk about semantic versioning (semver).
One of the hardest things to spot during a pr are whitespace issues. Did someone use tabs instead of spaces, trailing whitespace etc.
So, why not make it easy on yourself and help any contributors by adding an .editorconfig
file that automatcially fixes those things for you.
What is a clean solution to display a ‘default’ message to the user, when something they try to access isn’t there (anymore)? We could let the our repository throw an exception, catch it somewhere, and then let our controller handle it. Maybe we could return null, and pass that all the way up and add a fall back message for the content in the view somewhere? Why not try a better solution and work with a default object.
A while ago a
reddit post showed up, where someone installed version 9.99.99
of
paragonie/random_compat.
Seeing a package update from 2.*
to 9.99.99
may be a bit confusing, but given how autolaoding, polyfills and composer work in php, this is
actually quite a clever way of dealing with things. Lets take a look at version constraints, autoloading and composer to see why.
If you want to write a blog, or have another kind of static website, you need to deploy it somewhere. So why not host it on Github pages? It’s free and has https by default.