diff --git a/frameworks/PHP/hyperf/.env b/frameworks/PHP/hyperf/.env deleted file mode 100644 index abf6c9d9b59..00000000000 --- a/frameworks/PHP/hyperf/.env +++ /dev/null @@ -1,16 +0,0 @@ -APP_NAME=skeleton - -DB_DRIVER=mysql -DB_HOST=tfb-database -DB_PORT=3306 -DB_DATABASE=hello_world -DB_USERNAME=benchmarkdbuser -DB_PASSWORD=benchmarkdbpass -DB_CHARSET=utf8mb4 -DB_COLLATION=utf8mb4_unicode_ci -DB_PREFIX= - -REDIS_HOST=localhost -REDIS_AUTH= -REDIS_PORT=6379 -REDIS_DB=0 \ No newline at end of file diff --git a/frameworks/PHP/hyperf/.gitignore b/frameworks/PHP/hyperf/.gitignore deleted file mode 100644 index a757318145d..00000000000 --- a/frameworks/PHP/hyperf/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -.buildpath -.settings/ -.project -*.patch -.idea/ -.git/ -runtime/ -vendor/ -.phpintel/ -.DS_Store -*.lock -.phpunit* \ No newline at end of file diff --git a/frameworks/PHP/hyperf/README.md b/frameworks/PHP/hyperf/README.md deleted file mode 100644 index c4d62222b09..00000000000 --- a/frameworks/PHP/hyperf/README.md +++ /dev/null @@ -1,30 +0,0 @@ -English | [中文](./README-CN.md) - -[![Build Status](https://travis-ci.org/hyperf-cloud/hyperf.svg?branch=master)](https://travis-ci.org/hyperf-cloud/hyperf) -[![Php Version](https://img.shields.io/badge/php-%3E=7.2-brightgreen.svg?maxAge=2592000)](https://secure.php.net/) -[![Swoole Version](https://img.shields.io/badge/swoole-%3E=4.3.3-brightgreen.svg?maxAge=2592000)](https://github.com/swoole/swoole-src) -[![Hyperf License](https://img.shields.io/github/license/hyperf-cloud/hyperf.svg?maxAge=2592000)](https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE.md) - -# Introduction - -Hyperf is a high-performance, highly flexible PHP CLI framework based on `Swoole 4.3+`. It has a built-in coroutine server with a large number of commonly used components. It provides ultra-high and better performance than the traditional PHP-FPM-based framework and also maintains extremely flexible scalability at the same time. Standard components are implemented in the latest PSR standards, and a powerful dependency injection design ensures that most components or classes within the framework are replaceable. - -In addition to providing `MySQL coroutine client` and `Redis coroutine client`, common coroutine clients, the Hyperf component libraries are also prepared for the coroutine version of `Eloquent ORM`, `GRPC server and client`, `Zipkin (OpenTracing) client`, `Guzzle HTTP client`, `Elasticsearch client`, `Consul client`, `ETCD client`, `AMQP component`, `Apollo configuration center`, `Token bucket algorithm-based limiter`, and `Universal connection pool`, etc. Therefore, the trouble of implementing the corresponding coroutine version client by yourself can be avoided. Hyperf also provides convenient functions such as `Dependency injection`, `Annotation`, `AOP (aspect-oriented programming)`, `Middleware`, `Custom Processes`, `Event Manager`, `Simply Redis message queue`, and `Full-featured RabbitMQ message queue` to meet a wide range of technical and business scenarios. - -# Original intention - -Although there are many new PHP frameworks have been appeared, but we still has not seen a perfect framework which has the coexistence of elegant design and ultra-high performance, nor would we find a framework that really paves the way for PHP microservices. For the original intention of Hyperf and its team members, we will continue to invest to it, and you are welcome to join us to participate in open source construction. - -# Design concept - -`Hyperspeed + Flexibility = Hyperf`, from the framework name we have been used `hyperfspeed (ultra-high performance)` and `flexibility` as the gene of Hyperf. - -For ultra-high performance, Hyperf based on the Swoole coroutine, it providered an amazing performance, Hyperf team also makes a lots of code optimizations on the framework design to ensure ultra-high performance. - -For flexibility, based on the powerful dependency injection component of Hyperf, all components are based on [PSR](https://www.php-fig.org/psr) and the contracts that defined by Hyperf, so that most of the components or classes within the framework are replaceable and re-useable. - -Based on the above characteristics, Hyperf has a lots of possibilities, such as implementing Web servers, gateway servers, distributed middleware software, microservices architecture, game servers, and Internet of Things (IoT). - -# Documentation - -[https://doc.hyperf.io/](https://doc.hyperf.io/) diff --git a/frameworks/PHP/hyperf/app/Controller/IndexController.php b/frameworks/PHP/hyperf/app/Controller/IndexController.php deleted file mode 100644 index 0f42e85fbf0..00000000000 --- a/frameworks/PHP/hyperf/app/Controller/IndexController.php +++ /dev/null @@ -1,197 +0,0 @@ -response->json(['message' => 'Hello, World!']); - } - - /** - * @GetMapping(path="/db") - */ - public function db() - { - return $this->response->json(World::find(random_int(1, 10000))); - } - - /** - * @GetMapping(path="/raw-db") - */ - public function rawDb() - { - return $this->response->json(Db::select('SELECT id, randomNumber FROM World WHERE id = ?', [random_int(1, 10000)])); - } - - /** - * @GetMapping(path="/queries/[{queries}]") - */ - public function queries($queries = 1) - { - $queries = $this->clamp($queries); - - $rows = []; - - while ($queries--) { - $rows[] = World::find(random_int(1, 10000)); - } - - return $this->response->json($rows); - } - - /** - * @GetMapping(path="/raw-queries/[{queries}]") - */ - public function rawQueries($queries = 1) - { - $queries = $this->clamp($queries); - - $rows = []; - - while ($queries--) { - $rows[] = Db::selectOne('SELECT id, randomNumber FROM World WHERE id = ?', [random_int(1, 10000)]); - } - - return $this->response->json($rows); - } - - /** - * @GetMapping(path="/fortunes") - */ - public function fortunes() - { - $rows = Fortune::all(); - - $insert = new Fortune(); - $insert->id = 0; - $insert->message = 'Additional fortune added at request time.'; - - $rows->add($insert); - $rows = $rows->sortBy('message'); - - return $this->render->render('fortunes', ['rows' => $rows]); - } - - /** - * @GetMapping(path="/micro-fortunes") - */ - public function microFortunes() - { - $rows = Db::select('SELECT id, message FROM Fortune'); - - $fortune = []; - foreach ($rows ?? [] as $row) { - $fortune[$row->id] = $row->message; - } - $fortune[0] = 'Additional fortune added at request time.'; - asort($fortune); - - $html = 'Fortunes'; - foreach ($fortune as $id => $message) { - $message = htmlspecialchars($message, ENT_QUOTES, 'UTF-8'); - $html .= ""; - } - - $html .= '
idmessage
{$id}{$message}
'; - return $this->response->withAddedHeader('content-type', 'text/html; charset=utf-8')->withBody(new SwooleStream($html)); - } - - /** - * @GetMapping(path="/updates/[{queries}]") - */ - public function updates($queries = 1) - { - $queries = $this->clamp($queries); - - $rows = []; - - while ($queries--) { - $row = World::find(random_int(1, 10000)); - $row->randomNumber = random_int(1, 10000); - $row->save(); - $rows[] = $row; - } - - return $this->response->json($rows); - } - - /** - * @GetMapping(path="/raw-updates/[{queries}]") - */ - public function rawUpdates($queries = 1) - { - $queries = $this->clamp($queries); - - $rows = []; - - while ($queries--) { - $row = Db::selectOne('SELECT id, randomNumber FROM World WHERE id = ?', [$id = random_int(1, 10000)]); - $rand = random_int(1, 10000); - $row->randomNumber = $rand; - Db::update('UPDATE World SET randomNumber = ? WHERE id = ?', [$rand, $id]); - $rows[] = $row; - } - - return $this->response->json($rows); - } - - /** - * @GetMapping(path="/plaintext") - */ - public function plaintext() - { - return $this->response->raw('Hello, World!'); - } - - private function clamp($value): int - { - if (! is_numeric($value) || $value < 1) { - return 1; - } - if ($value > 500) { - return 500; - } - return (int)$value; - } -} diff --git a/frameworks/PHP/hyperf/app/Model/Fortune.php b/frameworks/PHP/hyperf/app/Model/Fortune.php deleted file mode 100644 index 224b678e61a..00000000000 --- a/frameworks/PHP/hyperf/app/Model/Fortune.php +++ /dev/null @@ -1,22 +0,0 @@ -mode) { - case Mode::SYNC: - /** @var EngineInterface $engine */ - $engine = $this->container->get($this->engine); - $result = $engine->render($template, $data, $this->config); - break; - case Mode::TASK: - default: - $executor = $this->container->get(TaskExecutor::class); - $result = $executor->execute(new Task([$this->engine, 'render'], [$template, $data, $this->config])); - } - - return $this->response()->withAddedHeader('content-type', 'text/html; charset=utf-8')->withBody(new SwooleStream($result)); - } - - -} diff --git a/frameworks/PHP/hyperf/benchmark_config.json b/frameworks/PHP/hyperf/benchmark_config.json deleted file mode 100755 index f52a0f46719..00000000000 --- a/frameworks/PHP/hyperf/benchmark_config.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "framework": "hyperf", - "tests": [ - { - "default": { - "json_url": "/json", - "db_url": "/db", - "query_url": "/queries/", - "fortune_url": "/fortunes", - "update_url": "/updates/", - "plaintext_url": "/plaintext", - "port": 9501, - "approach": "Realistic", - "classification": "Fullstack", - "database": "MySQL", - "framework": "Hyperf", - "language": "PHP", - "flavor": "None", - "orm": "Full", - "platform": "swoole", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "Hyperf", - "notes": "", - "versus": "swoole", - "tags": ["broken"] - }, - "raw": { - "db_url": "/raw-db", - "query_url": "/raw-queries/", - "update_url": "/raw-updates/", - "port": 9501, - "approach": "Realistic", - "classification": "Fullstack", - "database": "MySQL", - "framework": "Hyperf", - "language": "PHP", - "flavor": "None", - "orm": "Raw", - "platform": "swoole", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "Hyperf", - "notes": "", - "versus": "swoole", - "tags": ["broken"] - }, - "micro": { - "fortune_url": "/micro-fortunes", - "port": 9501, - "approach": "Realistic", - "classification": "Micro", - "database": "MySQL", - "framework": "Hyperf", - "language": "PHP", - "flavor": "None", - "orm": "Raw", - "platform": "swoole", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "Hyperf", - "notes": "", - "versus": "swoole", - "tags": ["broken"] - } - } - ] -} diff --git a/frameworks/PHP/hyperf/bin/hyperf.php b/frameworks/PHP/hyperf/bin/hyperf.php deleted file mode 100644 index 2860f834f88..00000000000 --- a/frameworks/PHP/hyperf/bin/hyperf.php +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env php -get(\Hyperf\Contract\ApplicationInterface::class); - $application->run(); -})(); diff --git a/frameworks/PHP/hyperf/composer.json b/frameworks/PHP/hyperf/composer.json deleted file mode 100644 index 8f0970acb95..00000000000 --- a/frameworks/PHP/hyperf/composer.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "hyperf/hyperf-skeleton", - "type": "project", - "keywords": [ - "php", - "swoole", - "framework", - "hyperf", - "microservice", - "middleware" - ], - "description": "A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.", - "license": "Apache-2.0", - "require": { - "php": ">=7.2", - "ext-swoole": ">=4.2", - "hyperf/command": "~1.1.0", - "hyperf/config": "~1.1.0", - "hyperf/contract": "~1.1.0", - "hyperf/database": "~1.1.0", - "hyperf/db-connection": "~1.1.0", - "hyperf/di": "~1.1.0", - "hyperf/dispatcher": "~1.1.0", - "hyperf/event": "~1.1.0", - "hyperf/exception-handler": "~1.1.0", - "hyperf/framework": "~1.1.0", - "hyperf/http-server": "~1.1.0", - "hyperf/logger": "~1.1.0", - "hyperf/paginator": "~1.1.0", - "hyperf/pool": "~1.1.0", - "hyperf/utils": "~1.1.0", - "hyperf/view": "~1.1.0", - "duncan3dc/blade": "^4.6", - "hyperf/task": "~1.1.0" - }, - "require-dev": { - "swoft/swoole-ide-helper": "^4.2", - "phpmd/phpmd": "^2.6", - "friendsofphp/php-cs-fixer": "^2.14", - "mockery/mockery": "^1.0", - "doctrine/common": "^2.9", - "phpstan/phpstan": "^0.11.2", - "hyperf/testing": "~1.1.0" - }, - "suggest": { - "ext-openssl": "Required to use HTTPS.", - "ext-json": "Required to use JSON.", - "ext-pdo": "Required to use MySQL Client.", - "ext-pdo_mysql": "Required to use MySQL Client.", - "ext-redis": "Required to use Redis Client." - }, - "autoload": { - "psr-4": { - "App\\": "app/" - }, - "files": [] - }, - "autoload-dev": { - "psr-4": { - "HyperfTest\\": "./test/" - } - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": [], - "scripts": { - "post-root-package-install": [ - "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" - ], - "test": "co-phpunit -c phpunit.xml --colors=always", - "cs-fix": "php-cs-fixer fix $1", - "analyze": "phpstan analyse --memory-limit 300M -l 0 -c phpstan.neon ./app ./config", - "start": "php ./bin/hyperf.php start" - }, - "repositories": { - "packagist": { - "type": "composer", - "url": "https://mirrors.aliyun.com/composer" - } - } -} diff --git a/frameworks/PHP/hyperf/config.toml b/frameworks/PHP/hyperf/config.toml deleted file mode 100644 index f72bdfc0dec..00000000000 --- a/frameworks/PHP/hyperf/config.toml +++ /dev/null @@ -1,45 +0,0 @@ -[framework] -name = "hyperf" - -[main] -urls.plaintext = "/plaintext" -urls.json = "/json" -urls.db = "/db" -urls.query = "/queries/" -urls.update = "/updates/" -urls.fortune = "/fortunes" -approach = "Realistic" -classification = "Fullstack" -database = "MySQL" -database_os = "Linux" -os = "Linux" -orm = "Full" -platform = "swoole" -webserver = "None" -versus = "swoole" - -[raw] -urls.db = "/raw-db" -urls.query = "/raw-queries/" -urls.update = "/raw-updates/" -approach = "Realistic" -classification = "Fullstack" -database = "MySQL" -database_os = "Linux" -os = "Linux" -orm = "Raw" -platform = "swoole" -webserver = "None" -versus = "swoole" - -[micro] -urls.fortune = "/micro-fortunes" -approach = "Realistic" -classification = "Micro" -database = "MySQL" -database_os = "Linux" -os = "Linux" -orm = "Raw" -platform = "swoole" -webserver = "None" -versus = "swoole" diff --git a/frameworks/PHP/hyperf/config/autoload/annotations.php b/frameworks/PHP/hyperf/config/autoload/annotations.php deleted file mode 100644 index 88f829b9838..00000000000 --- a/frameworks/PHP/hyperf/config/autoload/annotations.php +++ /dev/null @@ -1,22 +0,0 @@ - [ - 'paths' => [ - BASE_PATH . '/app', - ], - 'ignore_annotations' => [ - 'mixin', - ], - ], -]; diff --git a/frameworks/PHP/hyperf/config/autoload/databases.php b/frameworks/PHP/hyperf/config/autoload/databases.php deleted file mode 100644 index ecebcd82b03..00000000000 --- a/frameworks/PHP/hyperf/config/autoload/databases.php +++ /dev/null @@ -1,40 +0,0 @@ - [ - 'driver' => env('DB_DRIVER', 'mysql'), - 'host' => env('DB_HOST', 'localhost'), - 'database' => env('DB_DATABASE', 'hyperf'), - 'port' => env('DB_PORT', 3306), - 'username' => env('DB_USERNAME', 'root'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => env('DB_CHARSET', 'utf8'), - 'collation' => env('DB_COLLATION', 'utf8_unicode_ci'), - 'prefix' => env('DB_PREFIX', ''), - 'pool' => [ - 'min_connections' => 100, - 'max_connections' => 512, - 'connect_timeout' => 10.0, - 'wait_timeout' => 3.0, - 'heartbeat' => -1, - 'max_idle_time' => (float) env('DB_MAX_IDLE_TIME', 60), - ], - 'commands' => [ - 'db:model' => [ - 'path' => 'app/Model', - 'force_casts' => true, - 'inheritance' => 'Model', - ], - ], - ], -]; diff --git a/frameworks/PHP/hyperf/config/autoload/dependencies.php b/frameworks/PHP/hyperf/config/autoload/dependencies.php deleted file mode 100644 index aee47ca5823..00000000000 --- a/frameworks/PHP/hyperf/config/autoload/dependencies.php +++ /dev/null @@ -1,14 +0,0 @@ - [ - 'amqp' => [ - 'consumer' => [ - 'namespace' => 'App\\Amqp\\Consumer', - ], - 'producer' => [ - 'namespace' => 'App\\Amqp\\Producer', - ], - ], - 'aspect' => [ - 'namespace' => 'App\\Aspect', - ], - 'command' => [ - 'namespace' => 'App\\Command', - ], - 'controller' => [ - 'namespace' => 'App\\Controller', - ], - 'job' => [ - 'namespace' => 'App\\Job', - ], - 'listener' => [ - 'namespace' => 'App\\Listener', - ], - 'middleware' => [ - 'namespace' => 'App\\Middleware', - ], - 'Process' => [ - 'namespace' => 'App\\Processes', - ], - ], -]; diff --git a/frameworks/PHP/hyperf/config/autoload/logger.php b/frameworks/PHP/hyperf/config/autoload/logger.php deleted file mode 100644 index 3bf7c5454d1..00000000000 --- a/frameworks/PHP/hyperf/config/autoload/logger.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'handler' => [ - 'class' => Monolog\Handler\StreamHandler::class, - 'constructor' => [ - 'stream' => BASE_PATH . '/runtime/logs/hyperf.log', - 'level' => Monolog\Logger::DEBUG, - ], - ], - 'formatter' => [ - 'class' => Monolog\Formatter\LineFormatter::class, - 'constructor' => [ - 'format' => null, - 'dateFormat' => null, - 'allowInlineLineBreaks' => true, - ], - ], - ], -]; diff --git a/frameworks/PHP/hyperf/config/autoload/server.php b/frameworks/PHP/hyperf/config/autoload/server.php deleted file mode 100644 index a86da9172eb..00000000000 --- a/frameworks/PHP/hyperf/config/autoload/server.php +++ /dev/null @@ -1,49 +0,0 @@ - SWOOLE_BASE, - 'servers' => [ - [ - 'name' => 'http', - 'type' => Server::SERVER_HTTP, - 'host' => '0.0.0.0', - 'port' => 9501, - 'sock_type' => SWOOLE_SOCK_TCP, - 'callbacks' => [ - SwooleEvent::ON_REQUEST => [Hyperf\HttpServer\Server::class, 'onRequest'], - ], - ], - ], - 'settings' => [ - 'enable_coroutine' => true, - 'reactor_num' => swoole_cpu_num() * 2, - 'worker_num' => swoole_cpu_num(), - 'task_worker_num' => swoole_cpu_num(), - 'pid_file' => BASE_PATH . '/runtime/hyperf.pid', - 'open_tcp_nodelay' => true, - 'open_cpu_affinity' => true, - 'max_connection' => 100000, - 'log_level' => SWOOLE_LOG_NONE, - ], - 'callbacks' => [ - SwooleEvent::ON_BEFORE_START => [Hyperf\Framework\Bootstrap\ServerStartCallback::class, 'beforeStart'], - SwooleEvent::ON_WORKER_START => [Hyperf\Framework\Bootstrap\WorkerStartCallback::class, 'onWorkerStart'], - SwooleEvent::ON_PIPE_MESSAGE => [Hyperf\Framework\Bootstrap\PipeMessageCallback::class, 'onPipeMessage'], - // Task callbacks - SwooleEvent::ON_TASK => [Hyperf\Framework\Bootstrap\TaskCallback::class, 'onTask'], - SwooleEvent::ON_FINISH => [Hyperf\Framework\Bootstrap\FinishCallback::class, 'onFinish'], - ], -]; diff --git a/frameworks/PHP/hyperf/config/autoload/view.php b/frameworks/PHP/hyperf/config/autoload/view.php deleted file mode 100644 index 6137c84fb1e..00000000000 --- a/frameworks/PHP/hyperf/config/autoload/view.php +++ /dev/null @@ -1,17 +0,0 @@ - BladeEngine::class, - // 不填写则默认为 Task 模式,推荐使用 Task 模式 - 'mode' => Mode::TASK, - 'config' => [ - // 若下列文件夹不存在请自行创建 - 'view_path' => BASE_PATH . '/storage/view/', - 'cache_path' => BASE_PATH . '/runtime/view/', - ], -]; \ No newline at end of file diff --git a/frameworks/PHP/hyperf/config/config.php b/frameworks/PHP/hyperf/config/config.php deleted file mode 100644 index b93552b9b80..00000000000 --- a/frameworks/PHP/hyperf/config/config.php +++ /dev/null @@ -1,22 +0,0 @@ - env('APP_NAME', 'skeleton'), - StdoutLoggerInterface::class => [ - 'log_level' => [ - ], - ], -]; diff --git a/frameworks/PHP/hyperf/config/container.php b/frameworks/PHP/hyperf/config/container.php deleted file mode 100644 index 0342bebd701..00000000000 --- a/frameworks/PHP/hyperf/config/container.php +++ /dev/null @@ -1,26 +0,0 @@ -" version="1.0" license="MIT" - -## -# ---------- env settings ---------- -## -# --build-arg timezone=Asia/Shanghai -ARG timezone - -ENV TIMEZONE=${timezone:-"America/Los_Angeles"} \ - COMPOSER_VERSION=1.8.6 \ - APP_ENV=prod - -# update -RUN set -ex \ - # install composer - && cd /tmp \ - && wget https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar \ - && chmod u+x composer.phar \ - && mv composer.phar /usr/local/bin/composer \ - # show php version and extensions - && php -v \ - && php -m \ - # ---------- some config ---------- - && cd /etc/php7 \ - # - config PHP - && { \ - echo "upload_max_filesize=100M"; \ - echo "post_max_size=108M"; \ - echo "memory_limit=1024M"; \ - echo "date.timezone=${TIMEZONE}"; \ - } | tee conf.d/99-overrides.ini \ - # - config timezone - && ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \ - && echo "${TIMEZONE}" > /etc/timezone \ - # ---------- clear works ---------- - && rm -rf /var/cache/apk/* /tmp/* /usr/share/man \ - && echo -e "\033[42;37m Build Completed :).\033[0m\n" - -COPY . /opt/www - -WORKDIR /opt/www - -RUN composer install --no-dev \ - && composer dump-autoload -o \ - && php /opt/www/bin/hyperf.php di:init-proxy - -EXPOSE 9501 - -ENTRYPOINT ["php", "/opt/www/bin/hyperf.php", "start"] diff --git a/frameworks/PHP/hyperf/hyperf-raw.dockerfile b/frameworks/PHP/hyperf/hyperf-raw.dockerfile deleted file mode 100644 index 7beaa422afd..00000000000 --- a/frameworks/PHP/hyperf/hyperf-raw.dockerfile +++ /dev/null @@ -1,57 +0,0 @@ -# Default Dockerfile -# -# @link https://www.hyperf.io -# @document https://doc.hyperf.io -# @contact group@hyperf.io -# @license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE - -FROM hyperf/hyperf:7.2-alpine-cli -LABEL maintainer="Hyperf Developers " version="1.0" license="MIT" - -## -# ---------- env settings ---------- -## -# --build-arg timezone=Asia/Shanghai -ARG timezone - -ENV TIMEZONE=${timezone:-"America/Los_Angeles"} \ - COMPOSER_VERSION=1.8.6 \ - APP_ENV=prod - -# update -RUN set -ex \ - # install composer - && cd /tmp \ - && wget https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar \ - && chmod u+x composer.phar \ - && mv composer.phar /usr/local/bin/composer \ - # show php version and extensions - && php -v \ - && php -m \ - # ---------- some config ---------- - && cd /etc/php7 \ - # - config PHP - && { \ - echo "upload_max_filesize=100M"; \ - echo "post_max_size=108M"; \ - echo "memory_limit=1024M"; \ - echo "date.timezone=${TIMEZONE}"; \ - } | tee conf.d/99-overrides.ini \ - # - config timezone - && ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \ - && echo "${TIMEZONE}" > /etc/timezone \ - # ---------- clear works ---------- - && rm -rf /var/cache/apk/* /tmp/* /usr/share/man \ - && echo -e "\033[42;37m Build Completed :).\033[0m\n" - -COPY . /opt/www - -WORKDIR /opt/www - -RUN composer install --no-dev \ - && composer dump-autoload -o \ - && php /opt/www/bin/hyperf.php di:init-proxy - -EXPOSE 9501 - -ENTRYPOINT ["php", "/opt/www/bin/hyperf.php", "start"] diff --git a/frameworks/PHP/hyperf/hyperf.dockerfile b/frameworks/PHP/hyperf/hyperf.dockerfile deleted file mode 100644 index 7beaa422afd..00000000000 --- a/frameworks/PHP/hyperf/hyperf.dockerfile +++ /dev/null @@ -1,57 +0,0 @@ -# Default Dockerfile -# -# @link https://www.hyperf.io -# @document https://doc.hyperf.io -# @contact group@hyperf.io -# @license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE - -FROM hyperf/hyperf:7.2-alpine-cli -LABEL maintainer="Hyperf Developers " version="1.0" license="MIT" - -## -# ---------- env settings ---------- -## -# --build-arg timezone=Asia/Shanghai -ARG timezone - -ENV TIMEZONE=${timezone:-"America/Los_Angeles"} \ - COMPOSER_VERSION=1.8.6 \ - APP_ENV=prod - -# update -RUN set -ex \ - # install composer - && cd /tmp \ - && wget https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar \ - && chmod u+x composer.phar \ - && mv composer.phar /usr/local/bin/composer \ - # show php version and extensions - && php -v \ - && php -m \ - # ---------- some config ---------- - && cd /etc/php7 \ - # - config PHP - && { \ - echo "upload_max_filesize=100M"; \ - echo "post_max_size=108M"; \ - echo "memory_limit=1024M"; \ - echo "date.timezone=${TIMEZONE}"; \ - } | tee conf.d/99-overrides.ini \ - # - config timezone - && ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \ - && echo "${TIMEZONE}" > /etc/timezone \ - # ---------- clear works ---------- - && rm -rf /var/cache/apk/* /tmp/* /usr/share/man \ - && echo -e "\033[42;37m Build Completed :).\033[0m\n" - -COPY . /opt/www - -WORKDIR /opt/www - -RUN composer install --no-dev \ - && composer dump-autoload -o \ - && php /opt/www/bin/hyperf.php di:init-proxy - -EXPOSE 9501 - -ENTRYPOINT ["php", "/opt/www/bin/hyperf.php", "start"] diff --git a/frameworks/PHP/hyperf/phpunit.xml b/frameworks/PHP/hyperf/phpunit.xml deleted file mode 100644 index 2e5c03909bc..00000000000 --- a/frameworks/PHP/hyperf/phpunit.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - ./test - - - - - ./app - - - diff --git a/frameworks/PHP/hyperf/storage/view/fortunes.blade.php b/frameworks/PHP/hyperf/storage/view/fortunes.blade.php deleted file mode 100644 index e8791bd34a8..00000000000 --- a/frameworks/PHP/hyperf/storage/view/fortunes.blade.php +++ /dev/null @@ -1,13 +0,0 @@ - - -Fortunes - - - - - @foreach($rows as $row) - - @endforeach -
idmessage
{{$row->id}}{{$row->message}}
- - \ No newline at end of file