title: Using composer in child theme
body: <p>I am using <code>PHP 7.1.8</code> and I have setup <code>wordpress 4.9.8</code>.</p>
  
  <p>I am trying to read data from a spreadsheet using <code>composer require google/apiclient:^2.0</code> within my child directory. My <code>composer.json</code> looks like the following:</p>
  
  <pre><code>{
      "require": {
          "google/apiclient": "2.0"
      }
  }
  </code></pre>
  
  <p>My child-theme is located within the following directory:</p>
  
  <pre><code>themes
  └───child-theme
      ├───css
      ├───inc
      ├───js
      ├───template-parts
      └───vendor
          ├───composer
          ├───firebase
          ├───google
          ├───guzzlehttp
          ├───monolog
          ├───phpseclib
          └───psr
              ├───http-message
              │   └───src
              └───log
                  └───Psr
                      └───Log
                          └───Test
  </code></pre>
  
  <p>Within my <code>functions.php</code> file I am trying to load the library as the following:</p>
  
  <pre><code>if ( file_exists( get_theme_file_path() . '/vendor/autoload.php' ) ) {
      require get_theme_file_path() . '/vendor/autoload.php';
  }
  ...
  $client = new \Google_Client(); &lt;-- here I get an error
  </code></pre>
  
  <p>However, the last line <code>$client = new \Google_Client();</code> gives me an error, where I do not have any further infos about the error.</p>
  
  <p>Any suggestions what I am doing wrong?</p>