diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1e0cc99 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +docker-compose.override.yml \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6642893..38c32eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -84,7 +84,9 @@ RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc && apt-get install -y \ php${PHP} \ php${PHP}-dev \ - && pecl install openswoole + && pecl install openswoole \ + && bash -c "echo 'extension=openswoole' >> $(php -i | grep /.+/php.ini -oE)" \ + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # JavaScript ARG NODE=20.11.0 diff --git a/php/.gitignore b/php/.gitignore new file mode 100644 index 0000000..a725465 --- /dev/null +++ b/php/.gitignore @@ -0,0 +1 @@ +vendor/ \ No newline at end of file diff --git a/php/Makefile b/php/Makefile new file mode 100644 index 0000000..6455d90 --- /dev/null +++ b/php/Makefile @@ -0,0 +1,2 @@ +all: + composer install \ No newline at end of file diff --git a/php/composer.json b/php/composer.json new file mode 100644 index 0000000..cc654ed --- /dev/null +++ b/php/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "openswoole/core": "^22.1.5" + } +} \ No newline at end of file diff --git a/php/composer.lock b/php/composer.lock new file mode 100644 index 0000000..77144d6 --- /dev/null +++ b/php/composer.lock @@ -0,0 +1,256 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "b7afbd1879864d8ff7f6ba4cb320c89b", + "packages": [ + { + "name": "openswoole/core", + "version": "22.1.5", + "source": { + "type": "git", + "url": "https://github.com/openswoole/core.git", + "reference": "06dae68fdac73341ccf565ecef388434bd893141" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/openswoole/core/zipball/06dae68fdac73341ccf565ecef388434bd893141", + "reference": "06dae68fdac73341ccf565ecef388434bd893141", + "shasum": "" + }, + "require": { + "ext-openswoole": ">=22.0", + "php": ">=7.4", + "psr/http-message": "^1.0 || ^2.0", + "psr/http-server-middleware": "^1.0.0" + }, + "require-dev": { + "ext-curl": "*", + "ext-sockets": "*", + "friendsofphp/php-cs-fixer": "^3.6", + "openswoole/ide-helper": "^22.0", + "php-http/psr7-integration-tests": "^1.1", + "phpunit/phpunit": "^9.5" + }, + "suggest": { + "ext-mysqli": "*", + "ext-pdo": "*", + "ext-redis": "Required to use redis database, and the required version is greater than or equal to 3.1.3" + }, + "type": "library", + "autoload": { + "files": [ + "src/Coroutine/functions.php" + ], + "psr-4": { + "OpenSwoole\\Core\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "OpenSwoole Group", + "email": "hello@openswoole.com" + } + ], + "description": "Openswoole core library", + "homepage": "https://openswoole.com", + "keywords": [ + "http", + "http2", + "mqtt", + "openswoole", + "php", + "tcp", + "websocket" + ], + "support": { + "docs": "https://openswoole.com/docs", + "issues": "https://github.com/openswoole/openswoole/issues", + "pull-request": "https://github.com/openswoole/openswoole/pulls", + "source": "https://github.com/openswoole/openswoole" + }, + "time": "2023-12-10T19:02:13+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/http-server-handler", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-server-handler.git", + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP server-side request handler", + "keywords": [ + "handler", + "http", + "http-interop", + "psr", + "psr-15", + "psr-7", + "request", + "response", + "server" + ], + "support": { + "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" + }, + "time": "2023-04-10T20:06:20+00:00" + }, + { + "name": "psr/http-server-middleware", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-server-middleware.git", + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0 || ^2.0", + "psr/http-server-handler": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP server-side middleware", + "keywords": [ + "http", + "http-interop", + "middleware", + "psr", + "psr-15", + "psr-7", + "request", + "response" + ], + "support": { + "issues": "https://github.com/php-fig/http-server-middleware/issues", + "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" + }, + "time": "2023-04-11T06:14:47+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.6.0" +}