Ever get to the end of a project and have a panic moment when you realize that all the content entered contains links in the WYSIWYG that contain the full domain, and not just the relative path to content (ex. http://dev.mysite.com)?
Overriding a service in Drupal 8 is pretty easy. Within your sites directory, you will see a file called default.services.yml. You can adjust these defaults by adding a services.yml file in the sites directory. This is common when you want to enable twig debugging when in development (as development.services.yml).
Just wanted to drop a quick nod to a long awaited feature in PHP that other languages have enjoyed for a while now… type hints and return types.
In the last post, I touched on how you can define a service in your mymodule.services.yml file and pass it parameters to configure the object when it is injected as a dependency into other classes.