<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Franz</title>
    <description>The latest articles on DEV Community by Franz (@franzka).</description>
    <link>https://dev.to/franzka</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F501693%2Fc7fdb549-ae7b-46ff-851b-404f00adf050.jpeg</url>
      <title>DEV Community: Franz</title>
      <link>https://dev.to/franzka</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/franzka"/>
    <language>en</language>
    <item>
      <title>Composer install error Failed to extract</title>
      <dc:creator>Franz</dc:creator>
      <pubDate>Thu, 29 Oct 2020 14:43:51 +0000</pubDate>
      <link>https://dev.to/franzka/composer-install-error-failed-to-extract-2ed7</link>
      <guid>https://dev.to/franzka/composer-install-error-failed-to-extract-2ed7</guid>
      <description>&lt;p&gt;Yesterday I updated a CakePHP app as I routinely do and a strange error popup-ed in the &lt;code&gt;composer install&lt;/code&gt; stage of my docker build:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Failed to extract wyrihaximus/twig-view: (9) unzip -qq  '/var/www/html/vendor/composer/tmp-d8e7d258ae112df88e50fadda2ad540d' -d '/var/www/html/vendor/composer/c379dd11'

unzip:  cannot find or open /var/www/html/vendor/composer/tmp-d8e7d258ae112df88e50fadda2ad540d.

    This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
    See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
    Failed to extract cakephp/bake: (9) unzip -qq  '/var/www/html/vendor/composer/tmp-0ea29ff25d5dad521623339cec9bf3bb' -d '/var/www/html/vendor/composer/cc137293'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same happened with &lt;code&gt;cakephp/debug_kit&lt;/code&gt;, &lt;code&gt;cakephp/migrations&lt;/code&gt;, &lt;code&gt;cakephp/bake&lt;/code&gt; and &lt;code&gt;josegonzalez/cakephp-upload&lt;/code&gt; dependencies.&lt;/p&gt;

&lt;p&gt;After researching and testing I realized Composer had updated to version 2 a couple of days ago and in my Dockerfile I installed it with the command:&lt;br&gt;
&lt;code&gt;RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Clearly this brought Coposer's latest version and broke some dependencies. The solution was to freeze Composer's version download to 1.x:&lt;br&gt;
&lt;code&gt;RUN curl -sS https://getcomposer.org/composer-1.phar -o composer.phar&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Doing this also required me to run &lt;code&gt;php composer.phar install&lt;/code&gt; instead of &lt;code&gt;composer install&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And done, the app was good and running once again!&lt;/p&gt;

</description>
      <category>php</category>
      <category>webdev</category>
      <category>docker</category>
      <category>composer</category>
    </item>
  </channel>
</rss>
