antonioribeiro/firewall

Usage of Facades in Migration stub

Closed this issue · 0 comments

I would recommend to not use the Firewall facade in migrations because it is not guaranteed to be available. For instance:

  • Dev 1 installed Firewall package
  • A few days pass, Dev 1 decides to remove Firewall package.
  • Dev 2 comes back from holiday, pulls down the latest changes in master and attempts to migrate:
 [Symfony\Component\Debug\Exception\FatalErrorException]
Class 'PragmaRX\Firewall\Vendor\Laravel\Facade' not found

The state of migrations should ideally be allowed to run regardless of what packages are/are not installed (with the "sane" exception of DB::). What are you thoughts?

https://github.com/antonioribeiro/firewall/blob/master/src/stubs/create_firewall_tables.stub