Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
edgrosvenor committed Aug 6, 2020
1 parent 15e3ceb commit 5927abc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# Shiftable Configs

### This package is a work in progress and won't be considered production ready until I've used it to upgrade a bunch of sites to Laravel 8 this fall
### This package is a work in progress and won't be considered production ready until I've used it to help upgrade a bunch of sites to Laravel 8 this fall

As [JMac](https://twitter.com/gonedark) points out in [Base Laravel](https://baselaravel.com/), new major versions of Laravel often come with new values in the default configuration files. If those values are missing post-upgrade it can lead to errors and sometimes those errors are tough to track down.

The best way to avoid this is to leave Laravel's core configurations in their default state and just using environment variables. That way when you upgrade, whether using [Laravel Shift](https://laravelshift.com/) or by hand, you can confidently pull in the new configuration files without worrying about losing any of your own settings.
The best way to avoid this is to leave Laravel's core configurations in their default state and just use environment variables. That way when you upgrade, whether using [Laravel Shift](https://laravelshift.com/) or by hand, you can confidently pull in the new configuration files without worrying about losing any of your own settings.

This mostly works, but it does have its limitations. We have to deviate from this practice in the following situations:

* We have to add database connections, which requires editing config/databases.php

* We have to register aliases or providers manually, which requires editing config/app.php

* We want to use the app/services.php file for its intended use and add non-default servcies to it (I usually just create a separate configuration file for each service)

My personal approach is to do absolutely everything I possibly can outside the core configuration files, leaving myself with just this tiny list of times when I have to break the rules. Then I use this package to make sure my customizations survive an upgrade.

### Installation
Expand Down

0 comments on commit 5927abc

Please sign in to comment.