title: Using grpc in Symfony 4.1, “Class 'Grpc\ChannelCredentials' not found.”
body: <p>After setting everything up to use grpc, according to the grpc documentation for php "<a href="https://grpc.io/docs/quickstart/php.html" rel="nofollow noreferrer">https://grpc.io/docs/quickstart/php.html</a>", I tried to construct a client object from the classes I got from compiling some proto files with the proto compiler. </p>
  
  <pre class="lang-php prettyprint-override"><code>$rezept_nameservice_client = new Rezept_NameserviceClient('localhost:8082',
          [ 'credentials' =&gt; Grpc\ChannelCredentials::createInsecure()]);
  </code></pre>
  
  <p>When I try to run my code, I get the following exception:</p>
  
  <blockquote>
    <p>Attempted to load class "ChannelCredentials" from namespace "App\Controller\Grpc".
        Did you forget a "use" statement for another namespace?</p>
  </blockquote>
  
  <p>Working enviroment:</p>
  
  <ul>
  <li>Ubuntu 18.04</li>
  <li>Phpstorm</li>
  <li>Symfony 4.1</li>
  <li>Nginx 1.14.0</li>
  <li>grpc v1.15.0</li>
  <li>protobuf v3.6.1</li>
  </ul>
  
  <p>I already tried different things to solve the problem which I found here:</p>
  
  <p><a href="https://stackoverflow.com/questions/38185416/using-grpc-in-laravel-class-grpc-channelcredentials-not-found">This Problem is the closest to the problem I have</a></p>