Repository: overtrue/easy-sms (language: php)

Issue:
failed to open stream: File exists
```php
ZipArchive::extractTo(/www/wwwroot/box/vendor/composer/87927004/overtrue-easy-sms-85040b8/src/Gateways/ModuyunGateway.php): failed to open stream: File exists
```

已发现1.3.1版本解决该问题，但是安装还是会出错


Discussion / hints:
```shell
[root@34680e761697 box]# composer require "overtrue/easy-sms"
The "hirak/prestissimo" plugin (installed globally) was skipped because it requires a Plugin API version ("^1.0.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Using version ^1.3 for overtrue/easy-sms
./composer.json has been updated
The "hirak/prestissimo" plugin (installed globally) was skipped because it requires a Plugin API version ("^1.0.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Running composer update overtrue/easy-sms
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking overtrue/easy-sms (1.3.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Downloading overtrue/easy-sms (1.3.1)
  - Installing overtrue/easy-sms (1.3.1): Extracting archive
    Failed to extract overtrue/easy-sms: (50) unzip -qq  '/www/wwwroot/box/vendor/composer/tmp-94c39ae1c67d96901f15fe8081f1cb7d' -d '/www/wwwroot/box/vendor/composer/2d98a6f3'

error:  cannot create /www/wwwroot/box/vendor/composer/2d98a6f3/overtrue-easy-sms-85040b8/src/Gateways/ModuyunGateway.php
        File exists

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
    Install of overtrue/easy-sms failed

Installation failed, reverting ./composer.json and ./composer.lock to their original content.


  [RuntimeException]
  The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): ZipArchive::extractTo(/www/wwwroot/box/vendor/composer/2d98a6f3/overtrue-easy-sms-85040b8/src/Gateways/ModuyunGateway.php): failed to open stre
  am: File exists



  [ErrorException]
  ZipArchive::extractTo(/www/wwwroot/box/vendor/composer/2d98a6f3/overtrue-easy-sms-85040b8/src/Gateways/ModuyunGateway.php): failed to open stream: File exists


require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-scripts] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...
```

Fix patch:
diff --git a/src/Gateways/MoDuYunGateway.php b/src/Gateways/MoDuYunGateway.php
deleted file mode 100644
index a3defea..0000000
--- a/src/Gateways/MoDuYunGateway.php
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-
-/*
- * This file is part of the overtrue/easy-sms.
- *
- * (c) overtrue <i@overtrue.me>
- *
- * This source file is subject to the MIT license that is bundled
- * with this source code in the file LICENSE.
- */
-
-namespace Overtrue\EasySms\Gateways;
-
-use Overtrue\EasySms\Contracts\MessageInterface;
-use Overtrue\EasySms\Contracts\PhoneNumberInterface;
-use Overtrue\EasySms\Exceptions\GatewayErrorException;
-use Overtrue\EasySms\Support\Config;
-use Overtrue\EasySms\Traits\HasHttpRequest;
-
-/**
- * Class MoDuYunGateway.
- *
- * @see https://www.moduyun.com/doc/index.html#10002
- */
-class MoDuYunGateway extends Gateway
-{
-    use HasHttpRequest;
-
-    const ENDPOINT_URL = 'https://live.moduyun.com/sms/v2/sendsinglesms';
-
-    /**
-     * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to
-     * @param \Overtrue\EasySms\Contracts\MessageInterface     $message
-     * @param \Overtrue\EasySms\Support\Config                 $config
-     *
-     * @return array
-     *
-     * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ;
-     */
-    public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config)
-    {
-        $urlParams = [
-            'accesskey' => $config->get('accesskey'),
-            'random' => rand(100000, 999999),
-        ];
-
-        $params = [
-            'tel' => [
-                'mobile' => $to->getNumber(),
-                'nationcode' => $to->getIDDCode() ?: '86',
-            ],
-            'signId' => $config->get('signId', ''),
-            'templateId' => $message->getTemplate($this),
-            'time' => time(),
-            'type' => $config->get('type', 0),
-            'params' => array_values($message->getData($this)),
-            'ext' => '',
-            'extend' => '',
-        ];
-        $params['sig'] = $this->generateSign($params, $urlParams['random']);
-
-        $result = $this->request('post', $this->getEndpointUrl($urlParams), [
-            'headers' => [
-                'Content-Type' => 'application/json',
-                'Accept' => 'application/json'
-            ],
-            'json' => $params,
-        ]);
-
-        $result = is_string($result) ? json_decode($result, true) : $result;
-        if (0 != $result['result']) {
-            throw new GatewayErrorException($result['errmsg'], $result['result'], $result);
-        }
-
-        return $result;
-    }
-
-    /**
-     * @param array $params
-     *
-     * @return string
-     */
-    protected function getEndpointUrl($params)
-    {
-        return self::ENDPOINT_URL . '?' . http_build_query($params);
-    }
-
-    /**
-     * Generate Sign.
-     *
-     * @param array  $params
-     * @param string $random
-     *
-     * @return string
-     */
-    protected function generateSign($params, $random)
-    {
-        return hash('sha256', sprintf(
-            'secretkey=%s&random=%d&time=%d&mobile=%s',
-            $this->config->get('secretkey'),
-            $random,
-            $params['time'],
-            $params['tel']['mobile']
-        ));
-    }
-}


Test patch:
diff --git a/tests/Gateways/MoDuYunGatewayTest.php b/tests/Gateways/MoDuYunGatewayTest.php
deleted file mode 100644
index 94769a5..0000000
--- a/tests/Gateways/MoDuYunGatewayTest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-/*
- * This file is part of the overtrue/easy-sms.
- *
- * (c) overtrue <i@overtrue.me>
- *
- * This source file is subject to the MIT license that is bundled
- * with this source code in the file LICENSE.
- */
-
-namespace Overtrue\EasySms\Tests\Gateways;
-
-use Overtrue\EasySms\Exceptions\GatewayErrorException;
-use Overtrue\EasySms\Gateways\MoDuYunGateway;
-use Overtrue\EasySms\Message;
-use Overtrue\EasySms\PhoneNumber;
-use Overtrue\EasySms\Support\Config;
-use Overtrue\EasySms\Tests\TestCase;
-
-class MoDuYunGatewayTest extends TestCase
-{
-    public function testSend()
-    {
-        $config = [
-            'accesskey' => 'mock-accesskey',
-            'secretkey' => 'mock-secretkey',
-        ];
-        $gateway = \Mockery::mock(MoDuYunGateway::class . '[request]', [$config])->shouldAllowMockingProtectedMethods();
-
-        $gateway->shouldReceive('request')
-            ->andReturn(
-                [
-                    'result' => 0,
-                    'errmsg' => 'OK',
-                    'ext' => '',
-                    'sid' => "mock-sid",
-                    'surplus' => 4,
-                    'balance' => 0,
-                ],
-                [
-                    'result' => 1001,
-                    'errmsg' => 'accesskey not exist.',
-                ]
-            )->twice();
-
-        $message = new Message([
-            'template' => 'mock-template',
-            'data' => [
-                'code' => 1234,
-            ],
-        ]);
-
-        $config = new Config($config);
-
-        $this->assertSame([
-            'result' => 0,
-            'errmsg' => 'OK',
-            'ext' => '',
-            'sid' => "mock-sid",
-            'surplus' => 4,
-            'balance' => 0,
-        ], $gateway->send(new PhoneNumber(18888888888), $message, $config));
-
-        $this->expectException(GatewayErrorException::class);
-        $this->expectExceptionCode(1001);
-        $this->expectExceptionMessage('accesskey not exist.');
-
-        $gateway->send(new PhoneNumber(18888888888), $message, $config);
-    }
-}