title: Call to undefined method ZipArchive::setEncryptionName() on AWS Elastic Beanstalk PHP 7.2.17 with zip module enabled
body: <p>I'm running instance on AWS setup with Elastic Beanstalk (it's an Laravel 5.8 application running on a PHP 7.2 running on 64bit Amazon Linux/2.8.9 configuration).</p>
  
  <p>When I SSH into the instance and run a custom artisan command using the ZipArchive module the following error occurs:</p>
  
  <pre><code> Symfony\Component\Debug\Exception\FatalThrowableError  : Call to undefined method ZipArchive::setEncryptionName()
  </code></pre>
  
  <p>If I check the PHP version by calling <code>php -v</code> the following shows:</p>
  
  <pre><code>PHP 7.2.17 (cli) (built: Apr 15 2019 23:21:08) ( NTS )
  </code></pre>
  
  <p>Since <code>ZipArchive::setEncryptionName()</code> should be available from PHP >= 7.2.0 I don't understand why this error occurs.</p>
  
  <p>Also if I check the enabled PHP modules by calling <code>php -m</code> the <code>zip</code> module is in the list of modules.</p>
  
  <p>Can somebody help me figure out how to solve this error?</p>
  
  <p>Thanks in advance.</p>
  
  <p>The code lines where the error occurs are:</p>
  
  <pre><code>$zip_file = storage_path('app\export-' . Carbon::now()-&gt;format('d-m-Y-H-i') . '.zip');
  $zip = new ZipArchive;
  if ($zip-&gt;open($zip_file, ZipArchive::CREATE | ZipArchive::OVERWRITE) === TRUE) {
      $this-&gt;info("adding files");
  
      if (!$zip-&gt;addFile(storage_path('app/export.xlsx'), 'export.xlsx')) {
          Mail::to('xxx')-&gt;send(new ExportFailed('Could not add export.xlsx to zip'));
          $this-&gt;error('Could not add export.xlsx to zip');
      } else {
          if(!$zip-&gt;setEncryptionName('export.xlsx', ZipArchive::EM_AES_256)){
              Mail::to('xxx')-&gt;send(new ExportFailed('Could not set encryption for export.xlsx in zip'));
              $this-&gt;error('Could not set encryption for export.xlsx in zip');
          }
      }
  }
  </code></pre>