Skip to content

Instantly share code, notes, and snippets.

@gnugat
Created September 16, 2015 13:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gnugat/e58f486e23ab9c95ac6f to your computer and use it in GitHub Desktop.
Save gnugat/e58f486e23ab9c95ac6f to your computer and use it in GitHub Desktop.
<?php
// File: app/config/importer.php
use Symfony\Component\Finder\Finder;
$finder = new Finder();
$files = $finder->files()->name('*.yml')->in(__DIR__.'/services')->in(__DIR__.'/vendors');
foreach ($files as $file) {
$loader->import($file->getRealpath());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment