code: public function loadFiles(string $path, $extension = 'yml')
      {
          $finder = new Finder();
          $finder->in($path)->name('*.'.$extension)->files();
          $loader = new YamlFileLoader($this->container, new FileLocator($path));
          foreach ($finder as $file) {
              $loader->load($file->getFilename());
          }
      }
docs: @param string $path
  @param string $extension
  
  @throws \Exception