From 77574f9de9ba70391f0729087dd82846ae01facd Mon Sep 17 00:00:00 2001 From: Avril Li Date: Thu, 18 Jun 2020 20:42:04 +0800 Subject: [PATCH 01/54] feat: upgrade laravel to v2 --- .eslintignore | 1 + .eslintrc.js | 4 +- .gitignore | 5 +- .npmignore | 10 +- .travis.yml | 22 + CHANGELOG.md | 73 - LICENSE | 222 +- README.en.md | 87 +- README.md | 87 +- docs/configure.md | 311 +- example/.env.example | 25 +- example/.gitattributes | 5 + example/.gitignore | 2 +- example/README.md | 3 +- example/app/Console/Kernel.php | 3 +- example/app/Exceptions/Handler.php | 16 +- .../Auth/ConfirmPasswordController.php | 40 - .../Auth/ForgotPasswordController.php | 22 - .../Http/Controllers/Auth/LoginController.php | 40 - .../Controllers/Auth/RegisterController.php | 73 - .../Auth/ResetPasswordController.php | 30 - .../Auth/VerificationController.php | 42 - .../app/Http/Controllers/UserController.php | 26 - example/app/Http/Kernel.php | 21 +- example/app/Http/Middleware/TrustHosts.php | 20 + example/app/Http/Middleware/TrustProxies.php | 2 +- .../app/Http/Middleware/VerifyCsrfToken.php | 7 - .../app/Providers/RouteServiceProvider.php | 10 +- example/app/User.php | 42 +- example/app/UserAuth.php | 39 - example/composer.json | 18 +- example/composer.lock | 2855 ++++++++++++----- example/config/app.php | 3 +- example/config/cache.php | 1 + example/config/cors.php | 34 + example/config/database.php | 8 +- example/config/filesystems.php | 16 + example/config/logging.php | 4 + example/config/mail.php | 130 +- example/config/queue.php | 1 + example/config/session.php | 14 +- example/database/factories/UserFactory.php | 1 + .../2014_10_12_000000_create_users_table.php | 2 +- ...12_100000_create_password_resets_table.php | 32 - ..._08_19_000000_create_failed_jobs_table.php | 2 +- example/database/seeds/DatabaseSeeder.php | 2 +- example/package.json | 10 +- example/phpunit.xml | 12 +- example/public/.htaccess | 2 +- example/public/favicon.ico | Bin 15086 -> 0 bytes example/resources/lang/en/passwords.php | 4 +- example/resources/lang/en/validation.php | 4 +- example/routes/api.php | 11 +- example/routes/channels.php | 2 + example/routes/console.php | 1 + example/routes/web.php | 2 + example/serverless.yml | 34 +- package.json | 79 +- serverless.component.yml | 10 + serverless.js | 3 - .../sl_handler.php} | 0 src/config.js | 14 + src/index.js | 49 - src/package.json | 18 + src/serverless.js | 238 ++ src/utils.js | 366 +++ 66 files changed, 3312 insertions(+), 1960 deletions(-) create mode 100644 .travis.yml delete mode 100644 CHANGELOG.md create mode 100644 example/.gitattributes delete mode 100644 example/app/Http/Controllers/Auth/ConfirmPasswordController.php delete mode 100644 example/app/Http/Controllers/Auth/ForgotPasswordController.php delete mode 100644 example/app/Http/Controllers/Auth/LoginController.php delete mode 100644 example/app/Http/Controllers/Auth/RegisterController.php delete mode 100644 example/app/Http/Controllers/Auth/ResetPasswordController.php delete mode 100644 example/app/Http/Controllers/Auth/VerificationController.php delete mode 100644 example/app/Http/Controllers/UserController.php create mode 100644 example/app/Http/Middleware/TrustHosts.php delete mode 100644 example/app/UserAuth.php create mode 100644 example/config/cors.php delete mode 100644 example/database/migrations/2014_10_12_100000_create_password_resets_table.php mode change 100755 => 100644 package.json create mode 100644 serverless.component.yml delete mode 100644 serverless.js rename src/{shims/serverless-handler.php => _shims/sl_handler.php} (100%) create mode 100644 src/config.js delete mode 100644 src/index.js create mode 100644 src/package.json create mode 100644 src/serverless.js create mode 100644 src/utils.js diff --git a/.eslintignore b/.eslintignore index d5e62b2..475c1e9 100755 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,4 @@ coverage dist node_modules example +*.test.js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index c7d86c5..abba4fc 100755 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -36,14 +36,14 @@ module.exports = { 'id-length': [ 'error', { - min: 2, + min: 1, max: 50, properties: 'never', exceptions: ['e', 'i', 'n', 't', 'x', 'y', 'z', '_', '$'] } ], 'no-alert': 'error', - 'no-console': 'error', + 'no-console': 'off', 'no-const-assign': 'error', 'no-else-return': 'error', 'no-empty': 'off', diff --git a/.gitignore b/.gitignore index 74f2811..f37c1a6 100755 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,8 @@ node_modules dist .idea build/ -.env +.env* env.js package-lock.json -yarn.lock +test +yarn.lock \ No newline at end of file diff --git a/.npmignore b/.npmignore index 64ced1d..a41f26e 100755 --- a/.npmignore +++ b/.npmignore @@ -1,10 +1,2 @@ -components -examples -example -.idea -.serverless -coverage -.env* -env.js -tmp test +example \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b9f070c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: node_js + +node_js: + - 8 + - 10 + +install: + - npm install + +# should change to serverless registry publish +jobs: + include: + # Define the release stage that runs semantic-release + - stage: release + node_js: 10.18 + # Advanced: optionally overwrite your default `script` step to skip the tests + # script: skip + deploy: + provider: script + skip_cleanup: true + script: + - npm run release diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 8ed8c6a..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,73 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [1.0.3](https://github.com/serverless-components/tencent-laravel/compare/v1.0.2...v1.0.3) (2020-04-07) - - -### Bug Fixes - -* upgrade framework ([121fa78](https://github.com/serverless-components/tencent-laravel/commit/121fa7833e93c9b0431d4321875866e2fbb381d5)) - -### [1.0.2](https://github.com/serverless-components/tencent-laravel/compare/v1.0.1...v1.0.2) (2020-03-27) - - -### Features - -* upgrade framework support function descripton ([ba4cfe7](https://github.com/serverless-components/tencent-laravel/commit/ba4cfe731752bad1c7757007162ddde219bdbe57)) - -### [1.0.1](https://github.com/serverless-components/tencent-laravel/compare/v1.0.0...v1.0.1) (2020-03-17) - - -### Bug Fixes - -* remove unuse deps ([e72a706](https://github.com/serverless-components/tencent-laravel/commit/e72a7064238046107bba1218600f93179e73ec4e)) - -## [1.0.0](https://github.com/serverless-components/tencent-laravel/compare/v0.2.2...v1.0.0) (2020-03-17) - - -### Features - -* refactor using framework ([d6b4513](https://github.com/serverless-components/tencent-laravel/commit/d6b451390e863db658b99f3f6665667c454ce21c)) - -### [0.2.2](https://github.com/serverless-components/tencent-laravel/compare/v0.2.1...v0.2.2) (2020-03-12) - - -### Bug Fixes - -* apigw namespace ([1e2d672](https://github.com/serverless-components/tencent-laravel/commit/1e2d67274ddf130bf618e5f37c868566573a0eb4)) - -### [0.2.1](https://github.com/serverless-components/tencent-laravel/compare/v0.2.0...v0.2.1) (2020-02-27) - - -### Bug Fixes - -* upgrade tencent-scf supporting upload bar ([2f39e57](https://github.com/serverless-components/tencent-laravel/commit/2f39e57515246475c969b4e0b4017ca41d2dc07e)) - -## [0.2.0](https://github.com/serverless-components/tencent-laravel/compare/v0.1.4...v0.2.0) (2020-02-18) - - -### Features - -* update dependency apigw for supporting custom domain ([6789314](https://github.com/serverless-components/tencent-laravel/commit/6789314e5ee63e522c38b3a2687d5b0d3d5ffd5e)) - -### [0.1.4](https://github.com/serverless-components/tencent-laravel/compare/v0.1.2...v0.1.4) (2020-02-04) - - -### Bug Fixes - -* example yml ([9f61eeb](https://github.com/serverless-components/tencent-laravel/commit/9f61eebdd8b14d784a322c309815f370ea738f13)) -* remove unuse dependencies ([8cde57b](https://github.com/serverless-components/tencent-laravel/commit/8cde57b5f674acbe96144a016d159d1493cae76f)) - -### [0.1.1](https://github.com/serverless-components/tencent-laravel/compare/v0.1.0...v0.1.1) (2019-12-30) - - -### Bug Fixes - -* tencent-scf version ([2d34e41](https://github.com/serverless-components/tencent-laravel/commit/2d34e413b06638f46d14c1403f28c5027729083b)) - -## [0.1.0](https://github.com/serverless-components/tencent-laravel/compare/v0.1.0-alpha.0...v0.1.0) (2019-12-25) - -### Features - -- clean state after removing state ([6269052](https://github.com/serverless-components/tencent-laravel/commit/6269052ed75c1b9a8e727e3b17c9a7b5ac745e22)) diff --git a/LICENSE b/LICENSE index 261eeb9..44fae25 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,21 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +MIT License + +Copyright (c) 2020 Tencent Cloud, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.en.md b/README.en.md index f9a9b5d..c39360e 100755 --- a/README.en.md +++ b/README.en.md @@ -93,25 +93,21 @@ TENCENT_SECRET_KEY=XXX ```yml # serverless.yml -MyComponent: - component: '@serverless/tencent-laravel' - inputs: - region: ap-guangzhou - functionName: laravel-function - code: ./ - functionConf: - timeout: 10 - memorySize: 128 - environment: - variables: - TEST: vale - vpcConfig: - subnetId: '' - vpcId: '' - apigatewayConf: - protocols: - - https - environment: release +component: laravel +name: laravelDemo +org: orgDemo +app: appDemo +stage: dev + +inputs: + src: ./ + region: ap-guangzhou + runtime: Php7 + apigatewayConf: + protocols: + - http + - https + environment: release ``` - [More Options](https://github.com/serverless-components/tencent-laravel/tree/master/docs/configure.md) @@ -121,49 +117,7 @@ MyComponent: > Notice: **Before deploying, you should clear local run config cache, run `php artisan config:clear`.** ```bash -$ sls --debug - - DEBUG ─ Resolving the template's static variables. - DEBUG ─ Collecting components from the template. - DEBUG ─ Downloading any NPM components found in the template. - DEBUG ─ Analyzing the template's components dependencies. - DEBUG ─ Creating the template's components graph. - DEBUG ─ Syncing template state. - DEBUG ─ Executing the template's components graph. - DEBUG ─ Compressing function laravel-function file to /Users/yugasun/Desktop/Develop/serverless/tencent-laravel/example/.serverless/laravel-function.zip. - DEBUG ─ Compressed function laravel-function file successful - DEBUG ─ Uploading service package to cos[sls-cloudfunction-ap-guangzhou-code]. sls-cloudfunction-default-laravel-function-1584409722.zip - DEBUG ─ Uploaded package successful /Users/yugasun/Desktop/Develop/serverless/tencent-laravel/example/.serverless/laravel-function.zip - DEBUG ─ Creating function laravel-function - laravel-function [████████████████████████████████████████] 100% | ETA: 0s | Speed: 437.95k/s - DEBUG ─ Created function laravel-function successful - DEBUG ─ Setting tags for function laravel-function - DEBUG ─ Creating trigger for function laravel-function - DEBUG ─ Deployed function laravel-function successful - DEBUG ─ Starting API-Gateway deployment with name ap-guangzhou-apigateway in the ap-guangzhou region - DEBUG ─ Service with ID service-em7sgz40 created. - DEBUG ─ API with id api-lln5145m created. - DEBUG ─ Deploying service with id service-em7sgz40. - DEBUG ─ Deployment successful for the api named ap-guangzhou-apigateway in the ap-guangzhou region. - - MyLaravel: - functionName: laravel-function - functionOutputs: - ap-guangzhou: - Name: laravel-function - Runtime: Php7 - Handler: serverless-handler.handler - MemorySize: 128 - Timeout: 10 - Region: ap-guangzhou - Namespace: default - Description: This is a template function - region: ap-guangzhou - apiGatewayServiceId: service-em7sgz40 - url: https://service-em7sgz40-1251556596.gz.apigw.tencentcs.com/release/ - cns: (empty array) - - 51s › MyLaravel › done +$ sls deploy ``` > Notice: `sls` is short for `serverless` command. @@ -173,14 +127,7 @@ $ sls --debug ### 5. Remove ```bash -$ sls remove --debug - - DEBUG ─ Flushing template state and removing all components. - DEBUG ─ Removed function laravel-function successful - DEBUG ─ Removing any previously deployed API. api-lln5145m - DEBUG ─ Removing any previously deployed service. service-em7sgz40 - - 14s › MyLaravel › done +$ sls remove ``` ### More Components diff --git a/README.md b/README.md index 7bbce44..8ed6567 100644 --- a/README.md +++ b/README.md @@ -77,25 +77,21 @@ $ touch serverless.yml ```yml # serverless.yml -MyComponent: - component: '@serverless/tencent-laravel' - inputs: - region: ap-guangzhou - functionName: laravel-function - code: ./ - functionConf: - timeout: 10 - memorySize: 128 - environment: - variables: - TEST: vale - vpcConfig: - subnetId: '' - vpcId: '' - apigatewayConf: - protocols: - - https - environment: release +component: laravel +name: laravelDemo +org: orgDemo +app: appDemo +stage: dev + +inputs: + src: ./ + region: ap-guangzhou + runtime: Php7 + apigatewayConf: + protocols: + - http + - https + environment: release ``` - [更多配置](https://github.com/serverless-components/tencent-laravel/tree/master/docs/configure.md) @@ -109,49 +105,7 @@ MyComponent: 通过 `sls` 命令进行部署,并可以添加 `--debug` 参数查看部署过程中的信息 ```bash -$ sls --debug - - DEBUG ─ Resolving the template's static variables. - DEBUG ─ Collecting components from the template. - DEBUG ─ Downloading any NPM components found in the template. - DEBUG ─ Analyzing the template's components dependencies. - DEBUG ─ Creating the template's components graph. - DEBUG ─ Syncing template state. - DEBUG ─ Executing the template's components graph. - DEBUG ─ Compressing function laravel-function file to /Users/yugasun/Desktop/Develop/serverless/tencent-laravel/example/.serverless/laravel-function.zip. - DEBUG ─ Compressed function laravel-function file successful - DEBUG ─ Uploading service package to cos[sls-cloudfunction-ap-guangzhou-code]. sls-cloudfunction-default-laravel-function-1584409722.zip - DEBUG ─ Uploaded package successful /Users/yugasun/Desktop/Develop/serverless/tencent-laravel/example/.serverless/laravel-function.zip - DEBUG ─ Creating function laravel-function - laravel-function [████████████████████████████████████████] 100% | ETA: 0s | Speed: 437.95k/s - DEBUG ─ Created function laravel-function successful - DEBUG ─ Setting tags for function laravel-function - DEBUG ─ Creating trigger for function laravel-function - DEBUG ─ Deployed function laravel-function successful - DEBUG ─ Starting API-Gateway deployment with name ap-guangzhou-apigateway in the ap-guangzhou region - DEBUG ─ Service with ID service-em7sgz40 created. - DEBUG ─ API with id api-lln5145m created. - DEBUG ─ Deploying service with id service-em7sgz40. - DEBUG ─ Deployment successful for the api named ap-guangzhou-apigateway in the ap-guangzhou region. - - MyLaravel: - functionName: laravel-function - functionOutputs: - ap-guangzhou: - Name: laravel-function - Runtime: Php7 - Handler: serverless-handler.handler - MemorySize: 128 - Timeout: 10 - Region: ap-guangzhou - Namespace: default - Description: This is a template function - region: ap-guangzhou - apiGatewayServiceId: service-em7sgz40 - url: https://service-em7sgz40-1251556596.gz.apigw.tencentcs.com/release/ - cns: (empty array) - - 51s › MyLaravel › done +$ sls deploy ``` > 注意: `sls` 是 `serverless` 命令的简写。 @@ -161,14 +115,7 @@ $ sls --debug 通过以下命令移除部署的 Laravel 服务。 ```bash -$ sls remove --debug - - DEBUG ─ Flushing template state and removing all components. - DEBUG ─ Removed function laravel-function successful - DEBUG ─ Removing any previously deployed API. api-lln5145m - DEBUG ─ Removing any previously deployed service. service-em7sgz40 - - 14s › MyLaravel › done +$ sls remove ``` ### 账号配置(可选) diff --git a/docs/configure.md b/docs/configure.md index be2e958..3c83138 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -5,126 +5,195 @@ ```yml # serverless.yml -laravel: - component: '@serverless/tencent-laravel' - inputs: - region: ap-guangzhou - functionName: laravel-function - serviceName: mytest - serviceId: service-np1uloxw - code: ./ - functionConf: - timeout: 10 - memorySize: 128 - environment: - variables: - TEST: vale - vpcConfig: - subnetId: '' - vpcId: '' - apigatewayConf: - customDomain: - - domain: abc.com - certificateId: abcdefg - isDefaultMapping: 'FALSE' - pathMappingSet: - - path: / - environment: release - protocols: - - http - - https - protocols: - - http - - https - environment: test - usagePlan: - usagePlanId: 1111 - usagePlanName: slscmp - usagePlanDesc: sls create - maxRequestNum: 1000 - auth: - serviceTimeout: 15 - secretName: secret - secretIds: - - abc +component: laravel # (必选) 组件名称,在该实例中为flask +name: laravelDemo # (必选) 组件实例名称. +org: orgDemo # (可选) 用于记录组织信息,默认值为您的腾讯云账户 appid,必须为字符串 +app: appDemo # (可选) 用于记录组织信息. 默认与name相同,必须为字符串 +stage: dev # (可选) 用于区分环境信息,默认值是 dev + +inputs: + region: ap-guangzhou # 云函数所在区域 + functionName: laravel-function # 云函数名称 + serviceName: mytest # api网关服务名称 + serviceId: service-np1uloxw # api网关服务ID + runtime: Php7 # 运行环境 + src: ./ + # src: ./src # 第一种为string时,会打包src对应目录下的代码上传到默认cos上。 + # src: # 第二种,部署src下的文件代码,并打包成zip上传到bucket上 + # src: ./src # 本地需要打包的文件目录 + # bucket: bucket01 # bucket name,当前会默认在bucket name后增加 appid 后缀, 本例中为 bucket01-appid + # exclude: # 被排除的文件或目录 + # - .env + # - node_modules + # src: # 第三种,在指定存储桶bucket中已经存在了object代码,直接部署 + # bucket: bucket01 # bucket name,当前会默认在bucket name后增加 appid 后缀, 本例中为 bucket01-appid + # object: cos.zip # bucket key 指定存储桶内的文件 + layers: + - name: layerName # layer名称 + version: 1 # 版本 + functionConf: # 函数配置相关 + timeout: 10 # 超时时间,单位秒 + memorySize: 128 # 内存大小,单位MB + environment: # 环境变量 + variables: # 环境变量数组 + TEST: vale + vpcConfig: # 私有网络配置 + subnetId: '' # 私有网络的Id + vpcId: '' # 子网ID + apigatewayConf: # api网关配置 + isDisabled: false # 是否禁用自动创建 API 网关功能 + enableCORS: true # 允许跨域 + customDomains: # 自定义域名绑定 + - domain: abc.com # 待绑定的自定义的域名 + certificateId: abcdefg # 待绑定自定义域名的证书唯一 ID + # 自定义路径映射的路径。使用自定义映射时,可一次仅映射一个 path 到一个环境,也可映射多个 path 到多个环境。并且一旦使用自定义映射,原本的默认映射规则不再生效,只有自定义映射路径生效 + pathMappingSet: + - path: / + environment: release + protocols: # 绑定自定义域名的协议类型,默认与服务的前端协议一致 + - http # 支持http协议 + - https # 支持https协议 + protocols: + - http + - https + environment: test + serviceTimeout: 15 + usagePlan: # 用户使用计划 + usagePlanId: 1111 + usagePlanName: slscmp + usagePlanDesc: sls create + maxRequestNum: 1000 + auth: # 密钥 + secretName: secret + secretIds: + - xxx ``` -## Configuration description - -Main param description - -| Param | Required/Optional | Default | Description | -| --------------------------------------------------- | :---------------: | :----------: | :------------------------------------------------------------------- | -| region | Optional | ap-guangzhou | | -| functionName | Optional | | ServerlessCloudFunction Name | -| serviceName | Optional | | API-Gateway service name, default to create a new serivce | -| serviceId | Optional | | API-Gateway service id, if it has will use this APII-Gateway service | -| code | Optional | | Default is current working directory | -| [functionConf](#funtionConf-param-description) | Optional | | Function configure | -| [apigatewayConf](#apigatewayConf-param-description) | Optional | | API-Gateway configure | - -### funtionConf param description - -| Param | Required/Optional | Default | Description | -| ----------- | :---------------: | :-----: | :---------------------------------------------------------------------------------------------------------------------------------------------- | -| timeout | Optional | 3s | The duration a function allowed to execute. Choose a value between 1 and 300 seconds; The default is 3 seconds. | -| memorySize | Optional | 128M | The size of memory size available to the function during execution. Specify a value between 128 MB (default) and 1,536 MB in 128 MB increments. | -| environment | Optional | | Environment variable of the function | -| vpcConfig | Optional | | VPC configuration of the function | - -- environment param description - -| Param | Description | -| --------- | :------------------------- | -| variables | Environment variable array | - -- vpcConfig param description - -| Param | Description | -| -------- | :--------------- | -| subnetId | ID of the VPC | -| vpcId | ID of the subnet | - -### apigatewayConf param description - -| Param | Required/Optional | Description | -| ------------ | :---------------: | :------------------------------------------------------------------------------------------------------- | -| protocols | Optional | Frontend request type of the service, such as HTTP, HTTPS, HTTP and HTTPS. | -| environment | Optional | The name of the environment to be published. Three environments are supported: test, prepub and release. | -| usagePlan | Optional | | -| auth | Optional | | -| customDomain | Optional | Custom API Domain | - -- usagePlan param description - -| Param | Description | -| ------------- | :------------------------------------------------------------------------------------------------------------ | -| usagePlanId | User-defined usage plan id | -| usagePlanName | User-defined usage plan name | -| usagePlanDesc | User-defined usage plan description | -| maxRequestNum | Total number of requests allowed. If this is left empty, -1 will be used by default, indicating it’s disabled | - -- auth param description - -| Param | Description | -| -------------- | :---------------- | -| serviceTimeout | Service timeout | -| secretName | Secret name | -| secretIds | Secret Id (Array) | - -### apigatewayConf.customDomain param description - -| Param | Required/Optional | Default | Description | -| ---------------- | :---------------: | :------: | :-------------------------------------------------------------------------------------------------------- | -| domain | Required | | custom domain to bind. | -| certificateId | Optional | | Certificate for custom domain, if set https, it is required. | -| isDefaultMapping | Optional | `'TRUE'` | Whether using default path mapping. If want to customize path mapping, set to `FALSE` | -| pathMappingSet | Optional | `[]` | Custom path mapping, when `isDefaultMapping` is `FALSE`, it is required. | -| protocol | Optional | | Bind custom domain protocol type, such as HTTP, HTTPS, HTTP and HTTPS, default same as frontend protocols | - -- pathMappingSet - -| Param | Description | -| ----------- | :---------------------------- | -| path | Customize mapping path | -| environment | Customize mapping environment | +## 配置描述 + +主要的参数 + +| 参数名称 | 是否必选 | 默认值 | 描述 | +| ------------------------------------ | :------: | :-------------: | :------------------------------------------------------------------ | +| runtime | 否 | Python3.6 | 执行环境, 目前支持: Python3.x | +| region | 否 | ap-guangzhou | 项目部署所在区域,默认广州区 | +| functionName | 否 | | 云函数名称 | +| serviceName | 否 | | API 网关服务名称, 默认创建一个新的服务名称 | +| serviceId | 否 | | API 网关服务 ID,如果存在将使用这个 API 网关服务 | +| src | 否 | `process.cwd()` | 默认为当前目录, 如果是对象, 配置参数参考 [执行目录](#执行目录) | +| layers | 否 | | 云函数绑定的 layer, 配置参数参考 [层配置](#层配置) | +| exclude | 否 | | 不包含的文件 | +| include | 否 | | 包含的文件, 如果是相对路径,是相对于 `serverless.yml`的路径 | +| [functionConf](#函数配置) | 否 | | 函数配置 | +| [apigatewayConf](#API-网关配置) | 否 | | API 网关配置 | +| [cloudDNSConf](#DNS-配置) | 否 | | DNS 配置 | +| [Region special config](#指定区配置) | 否 | | 指定区配置 | + +## 执行目录 + +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +|---------|------|-----------------|-----|------------------------------------------------------------------------------------------------------------------------------| +| src | 否 | String | | 代码路径。与 object 不能同时存在。 | +| exclude | 否 | Array of String | | 不包含的文件或路径, 遵守 [glob 语法](https://github.com/isaacs/node-glob) | +| bucket | 否 | String | | bucket 名称。如果配置了 src,表示部署 src 的代码并压缩成 zip 后上传到 bucket-appid 对应的存储桶中;如果配置了 object,表示获取 bucket-appid 对应存储桶中 object 对应的代码进行部署。 | +| object | 否 | String | | 部署的代码在存储桶中的路径。 | | + +## 层配置 + +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| -------- | :------: | :----: | :----: | :------- | +| name | 否 | String | | 层名称 | +| version | 否 | String | | 层版本号 | + +### DNS 配置 + +参考: https://cloud.tencent.com/document/product/302/8516 + +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| ---------- | :------: | -------- | :----: | :---------------------------------------------- | +| ttl | 否 | Number | 600 | TTL 值,范围 1 - 604800,不同等级域名最小值不同 | +| recordLine | 否 | String[] | | 记录的线路名称 | + +### 指定区配置 + +| 参数名称 | 是否必选 | 类型 | 默认值 | 函数 | +| ------------------------------- | :------: | ------ | ------ | ------------ | +| [functionConf](#函数配置) | 否 | Object | | 函数配置 | +| [apigatewayConf](#API-网关配置) | 否 | Object | | API 网关配置 | +| [cloudDNSConf](#DNS-配置) | 否 | Object | | DNS 配置 | + +### 函数配置 + +参考: https://cloud.tencent.com/document/product/583/18586 + +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| ----------- | :------: | :----: | :----: | :------------------------------------------------------------------------------ | +| timeout | 否 | Number | 3 | 函数最长执行时间,单位为秒,可选值范围 1-900 秒,默认为 3 秒 | +| memorySize | 否 | Number | 128 | 函数运行时内存大小,默认为 128M,可选范围 64、128MB-3072MB,并且以 128MB 为阶梯 | +| environment | 否 | Object | | 函数的环境变量, 参考 [环境变量](#环境变量) | +| vpcConfig | 否 | Object | | 函数的 VPC 配置, 参考 [VPC 配置](#VPC-配置) | + +##### 环境变量 + +| 参数名称 | 类型 | 描述 | +| --------- | ---- | :---------------------------------------- | +| variables | | 环境变量参数, 包含多对 key-value 的键值对 | + +##### VPC 配置 + +| 参数名称 | 类型 | 描述 | +| -------- | ------ | :------ | +| subnetId | String | 子网 ID | +| vpcId | String | VPC ID | + +### API 网关配置 + +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| -------------- | :------: | :------- | :------- | :--------------------------------------------------------------------------------- | +| protocols | 否 | String[] | ['http'] | 前端请求的类型,如 http,https,http 与 https | +| environment | 否 | String | release | 发布环境. 目前支持三种发布环境: test(测试), prepub(预发布) 与 release(发布). | +| usagePlan | 否 | | | 使用计划配置, 参考 [使用计划](#使用计划) | +| auth | 否 | | | API 密钥配置, 参考 [API 密钥](#API-密钥配置) | +| customDomain | 否 | Object[] | | 自定义 API 域名配置, 参考 [自定义域名](#自定义域名) | +| enableCORS | 否 | Boolean | `false` | 开启跨域。默认值为否。 | +| serviceTimeout | 否 | Number | `15` | Api 超时时间,单位: 秒 | +| isDisabled | 否 | Boolean | `false` | 关闭自动创建 API 网关功能。默认值为否,即默认自动创建 API 网关。 | + +##### 使用计划 + +参考: https://cloud.tencent.com/document/product/628/14947 + +| 参数名称 | 是否必选 | 类型 | 描述 | +| ------------- | :------: | ------ | :------------------------------------------------------ | +| usagePlanId | 否 | String | 用户自定义使用计划 ID | +| usagePlanName | 否 | String | 用户自定义的使用计划名称 | +| usagePlanDesc | 否 | String | 用户自定义的使用计划描述 | +| maxRequestNum | 否 | Int | 请求配额总数,如果为空,将使用-1 作为默认值,表示不开启 | + +##### API 密钥配置 + +参考: https://cloud.tencent.com/document/product/628/14916 + +| 参数名称 | 类型 | 描述 | +| ---------- | :----- | :------- | +| secretName | String | 密钥名称 | +| secretIds | String | 密钥 ID | + +##### 自定义域名 + +Refer to: https://cloud.tencent.com/document/product/628/14906 + +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| ---------------- | :------: | :------: | :------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| domain | 是 | String | | 待绑定的自定义的域名。 | +| certificateId | 否 | String | | 待绑定自定义域名的证书唯一 ID,如果设置了 type 为 https,则为必选 | +| isDefaultMapping | 否 | String | `'TRUE'` | 是否使用默认路径映射,默认为 TRUE。为 FALSE 时,表示自定义路径映射,此时 pathMappingSet 必填。 | +| pathMappingSet | 否 | Object[] | `[]` | 自定义路径映射的路径。使用自定义映射时,可一次仅映射一个 path 到一个环境,也可映射多个 path 到多个环境。并且一旦使用自定义映射,原本的默认映射规则不再生效,只有自定义映射路径生效。 | +| protocol | 否 | String[] | | 绑定自定义域名的协议类型,默认与服务的前端协议一致。 | + +- 自定义路径映射 + +| 参数名称 | 是否必选 | 类型 | Description | +| ----------- | :------: | :----- | :------------- | +| path | 是 | String | 自定义映射路径 | +| environment | 是 | String | 自定义映射环境 | diff --git a/example/.env.example b/example/.env.example index b8af60f..ac74863 100644 --- a/example/.env.example +++ b/example/.env.example @@ -1,6 +1,6 @@ APP_NAME=Laravel APP_ENV=local -APP_KEY=base64:vaNkiGzlCFOBb57Q9DpUxosgcaXgACowubfOhxz2vKo= +APP_KEY= APP_DEBUG=true APP_URL=http://localhost @@ -16,19 +16,21 @@ DB_PASSWORD= BROADCAST_DRIVER=log CACHE_DRIVER=file QUEUE_CONNECTION=sync -SESSION_DRIVER=cookie +SESSION_DRIVER=file SESSION_LIFETIME=120 REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 -MAIL_DRIVER=smtp +MAIL_MAILER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null +MAIL_FROM_ADDRESS=null +MAIL_FROM_NAME="${APP_NAME}" AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= @@ -42,20 +44,3 @@ PUSHER_APP_CLUSTER=mt1 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" - -# views compiled path -VIEW_COMPILED_PATH=/tmp/storage/framework/views - -# We cannot store sessions to disk: if you don't need sessions (e.g. API) -# then use `array`, else store sessions in database or cookies -SESSION_DRIVER=array - -# Logging to stderr allows the logs to end up in Cloudwatch -LOG_CHANNEL=stderr - -# app storage dir must be /tmp -APP_STORAGE=/tmp - -# tencent crendential -TENCENT_SECRET_ID=123 -TENCENT_SECRET_KEY=123 diff --git a/example/.gitattributes b/example/.gitattributes new file mode 100644 index 0000000..967315d --- /dev/null +++ b/example/.gitattributes @@ -0,0 +1,5 @@ +* text=auto +*.css linguist-vendored +*.scss linguist-vendored +*.js linguist-vendored +CHANGELOG.md export-ignore diff --git a/example/.gitignore b/example/.gitignore index fcc6c48..0f7df0f 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -1,7 +1,7 @@ /node_modules /public/hot /public/storage -/storage +/storage/*.key /vendor .env .env.backup diff --git a/example/README.md b/example/README.md index 81f2f62..3cae01e 100644 --- a/example/README.md +++ b/example/README.md @@ -37,7 +37,7 @@ We would like to extend our thanks to the following sponsors for funding Laravel - **[64 Robots](https://64robots.com)** - **[Cubet Techno Labs](https://cubettech.com)** - **[Cyber-Duck](https://cyber-duck.co.uk)** -- **[British Software Development](https://www.britishsoftware.co)** +- **[Many](https://www.many.co.uk)** - **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** - **[DevSquad](https://devsquad.com)** - [UserInsights](https://userinsights.com) @@ -60,6 +60,7 @@ We would like to extend our thanks to the following sponsors for funding Laravel - [Hyper Host](https://hyper.host) - [Appoly](https://www.appoly.co.uk) - [OP.GG](https://op.gg) +- [云软科技](http://www.yunruan.ltd/) ## Contributing diff --git a/example/app/Console/Kernel.php b/example/app/Console/Kernel.php index a8c5158..69914e9 100644 --- a/example/app/Console/Kernel.php +++ b/example/app/Console/Kernel.php @@ -24,8 +24,7 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - // $schedule->command('inspire') - // ->hourly(); + // $schedule->command('inspire')->hourly(); } /** diff --git a/example/app/Exceptions/Handler.php b/example/app/Exceptions/Handler.php index 043cad6..59c585d 100644 --- a/example/app/Exceptions/Handler.php +++ b/example/app/Exceptions/Handler.php @@ -2,8 +2,8 @@ namespace App\Exceptions; -use Exception; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; +use Throwable; class Handler extends ExceptionHandler { @@ -29,10 +29,12 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * @param \Exception $exception + * @param \Throwable $exception * @return void + * + * @throws \Exception */ - public function report(Exception $exception) + public function report(Throwable $exception) { parent::report($exception); } @@ -41,10 +43,12 @@ public function report(Exception $exception) * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request - * @param \Exception $exception - * @return \Illuminate\Http\Response + * @param \Throwable $exception + * @return \Symfony\Component\HttpFoundation\Response + * + * @throws \Throwable */ - public function render($request, Exception $exception) + public function render($request, Throwable $exception) { return parent::render($request, $exception); } diff --git a/example/app/Http/Controllers/Auth/ConfirmPasswordController.php b/example/app/Http/Controllers/Auth/ConfirmPasswordController.php deleted file mode 100644 index 138c1f0..0000000 --- a/example/app/Http/Controllers/Auth/ConfirmPasswordController.php +++ /dev/null @@ -1,40 +0,0 @@ -middleware('auth'); - } -} diff --git a/example/app/Http/Controllers/Auth/ForgotPasswordController.php b/example/app/Http/Controllers/Auth/ForgotPasswordController.php deleted file mode 100644 index 465c39c..0000000 --- a/example/app/Http/Controllers/Auth/ForgotPasswordController.php +++ /dev/null @@ -1,22 +0,0 @@ -middleware('guest')->except('logout'); - } -} diff --git a/example/app/Http/Controllers/Auth/RegisterController.php b/example/app/Http/Controllers/Auth/RegisterController.php deleted file mode 100644 index c6a6de6..0000000 --- a/example/app/Http/Controllers/Auth/RegisterController.php +++ /dev/null @@ -1,73 +0,0 @@ -middleware('guest'); - } - - /** - * Get a validator for an incoming registration request. - * - * @param array $data - * @return \Illuminate\Contracts\Validation\Validator - */ - protected function validator(array $data) - { - return Validator::make($data, [ - 'name' => ['required', 'string', 'max:255'], - 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], - 'password' => ['required', 'string', 'min:8', 'confirmed'], - ]); - } - - /** - * Create a new user instance after a valid registration. - * - * @param array $data - * @return \App\User - */ - protected function create(array $data) - { - return User::create([ - 'name' => $data['name'], - 'email' => $data['email'], - 'password' => Hash::make($data['password']), - ]); - } -} diff --git a/example/app/Http/Controllers/Auth/ResetPasswordController.php b/example/app/Http/Controllers/Auth/ResetPasswordController.php deleted file mode 100644 index b1726a3..0000000 --- a/example/app/Http/Controllers/Auth/ResetPasswordController.php +++ /dev/null @@ -1,30 +0,0 @@ -middleware('auth'); - $this->middleware('signed')->only('verify'); - $this->middleware('throttle:6,1')->only('verify', 'resend'); - } -} diff --git a/example/app/Http/Controllers/UserController.php b/example/app/Http/Controllers/UserController.php deleted file mode 100644 index 1a04ffb..0000000 --- a/example/app/Http/Controllers/UserController.php +++ /dev/null @@ -1,26 +0,0 @@ - $user]); - } - public function list() - { - $user = new User('yugasun', 'yuga.sun.bj@gmail.com'); - return ['data' => array($user)]; - } - - public function user($id) - { - $user = new User('yugasun', 'yuga.sun.bj@gmail.com'); - return ['data' => $user]; - } -} diff --git a/example/app/Http/Kernel.php b/example/app/Http/Kernel.php index 2741c0a..36ced13 100644 --- a/example/app/Http/Kernel.php +++ b/example/app/Http/Kernel.php @@ -14,7 +14,9 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ + // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, + \Fruitcake\Cors\HandleCors::class, \App\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, @@ -39,7 +41,7 @@ class Kernel extends HttpKernel 'api' => [ 'throttle:60,1', - 'bindings', + \Illuminate\Routing\Middleware\SubstituteBindings::class, ], ]; @@ -62,21 +64,4 @@ class Kernel extends HttpKernel 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, ]; - - /** - * The priority-sorted list of middleware. - * - * This forces non-global middleware to always be in the given order. - * - * @var array - */ - protected $middlewarePriority = [ - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\Authenticate::class, - \Illuminate\Routing\Middleware\ThrottleRequests::class, - \Illuminate\Session\Middleware\AuthenticateSession::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - \Illuminate\Auth\Middleware\Authorize::class, - ]; } diff --git a/example/app/Http/Middleware/TrustHosts.php b/example/app/Http/Middleware/TrustHosts.php new file mode 100644 index 0000000..b0550cf --- /dev/null +++ b/example/app/Http/Middleware/TrustHosts.php @@ -0,0 +1,20 @@ +allSubdomainsOfApplicationUrl(), + ]; + } +} diff --git a/example/app/Http/Middleware/TrustProxies.php b/example/app/Http/Middleware/TrustProxies.php index ee5b595..14befce 100644 --- a/example/app/Http/Middleware/TrustProxies.php +++ b/example/app/Http/Middleware/TrustProxies.php @@ -10,7 +10,7 @@ class TrustProxies extends Middleware /** * The trusted proxies for this application. * - * @var array|string + * @var array|string|null */ protected $proxies; diff --git a/example/app/Http/Middleware/VerifyCsrfToken.php b/example/app/Http/Middleware/VerifyCsrfToken.php index 324a166..0c13b85 100644 --- a/example/app/Http/Middleware/VerifyCsrfToken.php +++ b/example/app/Http/Middleware/VerifyCsrfToken.php @@ -6,13 +6,6 @@ class VerifyCsrfToken extends Middleware { - /** - * Indicates whether the XSRF-TOKEN cookie should be set on the response. - * - * @var bool - */ - protected $addHttpCookie = true; - /** * The URIs that should be excluded from CSRF verification. * diff --git a/example/app/Providers/RouteServiceProvider.php b/example/app/Providers/RouteServiceProvider.php index 527eee3..540d17b 100644 --- a/example/app/Providers/RouteServiceProvider.php +++ b/example/app/Providers/RouteServiceProvider.php @@ -59,8 +59,8 @@ public function map() protected function mapWebRoutes() { Route::middleware('web') - ->namespace($this->namespace) - ->group(base_path('routes/web.php')); + ->namespace($this->namespace) + ->group(base_path('routes/web.php')); } /** @@ -73,8 +73,8 @@ protected function mapWebRoutes() protected function mapApiRoutes() { Route::prefix('api') - ->middleware('api') - ->namespace($this->namespace) - ->group(base_path('routes/api.php')); + ->middleware('api') + ->namespace($this->namespace) + ->group(base_path('routes/api.php')); } } diff --git a/example/app/User.php b/example/app/User.php index d0c0276..e79dab7 100644 --- a/example/app/User.php +++ b/example/app/User.php @@ -2,14 +2,38 @@ namespace App; -class User +use Illuminate\Contracts\Auth\MustVerifyEmail; +use Illuminate\Foundation\Auth\User as Authenticatable; +use Illuminate\Notifications\Notifiable; + +class User extends Authenticatable { - var $name; - var $email; - - function __construct($name, $email) - { - $this->name = $name; - $this->email = $email; - } + use Notifiable; + + /** + * The attributes that are mass assignable. + * + * @var array + */ + protected $fillable = [ + 'name', 'email', 'password', + ]; + + /** + * The attributes that should be hidden for arrays. + * + * @var array + */ + protected $hidden = [ + 'password', 'remember_token', + ]; + + /** + * The attributes that should be cast to native types. + * + * @var array + */ + protected $casts = [ + 'email_verified_at' => 'datetime', + ]; } diff --git a/example/app/UserAuth.php b/example/app/UserAuth.php deleted file mode 100644 index 1a26374..0000000 --- a/example/app/UserAuth.php +++ /dev/null @@ -1,39 +0,0 @@ - 'datetime', - ]; -} diff --git a/example/composer.json b/example/composer.json index 0ed2dc5..4e81d21 100644 --- a/example/composer.json +++ b/example/composer.json @@ -8,17 +8,19 @@ ], "license": "MIT", "require": { - "php": "^7.2", - "fideloper/proxy": "^4.0", - "laravel/framework": "^6.2", + "php": "^7.2.5", + "fideloper/proxy": "^4.2", + "fruitcake/laravel-cors": "^1.0", + "guzzlehttp/guzzle": "^6.3", + "laravel/framework": "^7.0", "laravel/tinker": "^2.0" }, "require-dev": { - "facade/ignition": "^1.4", - "fzaninotto/faker": "^1.4", - "mockery/mockery": "^1.0", - "nunomaduro/collision": "^3.0", - "phpunit/phpunit": "^8.0" + "facade/ignition": "^2.0", + "fzaninotto/faker": "^1.9.1", + "mockery/mockery": "^1.3.1", + "nunomaduro/collision": "^4.1", + "phpunit/phpunit": "^8.5" }, "config": { "optimize-autoloader": true, diff --git a/example/composer.lock b/example/composer.lock index 2ac8e46..cc9dbf6 100644 --- a/example/composer.lock +++ b/example/composer.lock @@ -4,8 +4,112 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3bb4dacacf43532a01bf1d3d6dd3bbe1", + "content-hash": "6558f74828bca9ebecac73d90cea4b1a", "packages": [ + { + "name": "asm89/stack-cors", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/asm89/stack-cors.git", + "reference": "b9c31def6a83f84b4d4a40d35996d375755f0e08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/asm89/stack-cors/zipball/b9c31def6a83f84b4d4a40d35996d375755f0e08", + "reference": "b9c31def6a83f84b4d4a40d35996d375755f0e08", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/http-foundation": "~2.7|~3.0|~4.0|~5.0", + "symfony/http-kernel": "~2.7|~3.0|~4.0|~5.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.0 || ^4.8.10", + "squizlabs/php_codesniffer": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Asm89\\Stack\\": "src/Asm89/Stack/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alexander", + "email": "iam.asm89@gmail.com" + } + ], + "description": "Cross-origin resource sharing library and stack middleware", + "homepage": "https://github.com/asm89/stack-cors", + "keywords": [ + "cors", + "stack" + ], + "time": "2019-12-24T22:41:47+00:00" + }, + { + "name": "brick/math", + "version": "0.8.15", + "source": { + "type": "git", + "url": "https://github.com/brick/math.git", + "reference": "9b08d412b9da9455b210459ff71414de7e6241cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/math/zipball/9b08d412b9da9455b210459ff71414de7e6241cd", + "reference": "9b08d412b9da9455b210459ff71414de7e6241cd", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1|^8.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^7.5.15|^8.5", + "vimeo/psalm": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "brick", + "math" + ], + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/brick/math", + "type": "tidelift" + } + ], + "time": "2020-04-15T15:59:35+00:00" + }, { "name": "dnoegel/php-xdg-base-dir", "version": "v0.1.1", @@ -41,33 +145,37 @@ }, { "name": "doctrine/inflector", - "version": "1.3.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1" + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7aec1", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -96,32 +204,52 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org/", + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", "keywords": [ "inflection", - "pluralize", - "singularize", - "string" + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } ], - "time": "2019-10-30T19:59:35+00:00" + "time": "2020-05-29T15:13:26+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -166,7 +294,21 @@ "parser", "php" ], - "time": "2019-10-30T14:39:59+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" }, { "name": "dragonmantank/cron-expression", @@ -224,27 +366,27 @@ }, { "name": "egulias/email-validator", - "version": "2.1.12", + "version": "2.1.18", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "a6255605af39f2db7f5cb62e672bd8a7bad8d208" + "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/a6255605af39f2db7f5cb62e672bd8a7bad8d208", - "reference": "a6255605af39f2db7f5cb62e672bd8a7bad8d208", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/cfa3d44471c7f5bfb684ac2b0da7114283d78441", + "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441", "shasum": "" }, "require": { "doctrine/lexer": "^1.0.1", - "php": ">= 5.5" + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.10" }, "require-dev": { - "dominicsayers/isemail": "dev-master", - "phpunit/phpunit": "^4.8.35||^5.7||^6.0", - "satooshi/php-coveralls": "^1.0.1", - "symfony/phpunit-bridge": "^4.4@dev" + "dominicsayers/isemail": "^3.0.7", + "phpunit/phpunit": "^4.8.36|^7.5.15", + "satooshi/php-coveralls": "^1.0.1" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -257,7 +399,7 @@ }, "autoload": { "psr-4": { - "Egulias\\EmailValidator\\": "EmailValidator" + "Egulias\\EmailValidator\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -278,33 +420,42 @@ "validation", "validator" ], - "time": "2019-12-20T12:49:39+00:00" + "time": "2020-06-16T20:11:17+00:00" }, { - "name": "erusev/parsedown", - "version": "1.7.3", + "name": "fideloper/proxy", + "version": "4.3.0", "source": { "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7" + "url": "https://github.com/fideloper/TrustedProxy.git", + "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7", - "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a", + "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a", "shasum": "" }, "require": { - "ext-mbstring": "*", - "php": ">=5.3.0" + "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0", + "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35" + "illuminate/http": "^5.0|^6.0|^7.0|^8.0", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.0" }, "type": "library", + "extra": { + "laravel": { + "providers": [ + "Fideloper\\Proxy\\TrustedProxyServiceProvider" + ] + } + }, "autoload": { - "psr-0": { - "Parsedown": "" + "psr-4": { + "Fideloper\\Proxy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -313,53 +464,61 @@ ], "authors": [ { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com/" + "name": "Chris Fidao", + "email": "fideloper@gmail.com" } ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org/", + "description": "Set trusted proxies for Laravel", "keywords": [ - "markdown", - "parser" + "load balancing", + "proxy", + "trusted proxy" ], - "time": "2019-03-17T18:48:37+00:00" + "time": "2020-02-22T01:51:47+00:00" }, { - "name": "fideloper/proxy", - "version": "4.2.2", + "name": "fruitcake/laravel-cors", + "version": "v1.0.6", "source": { "type": "git", - "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "790194d5d3da89a713478875d2e2d05855a90a81" + "url": "https://github.com/fruitcake/laravel-cors.git", + "reference": "1d127dbec313e2e227d65e0c483765d8d7559bf6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/790194d5d3da89a713478875d2e2d05855a90a81", - "reference": "790194d5d3da89a713478875d2e2d05855a90a81", + "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/1d127dbec313e2e227d65e0c483765d8d7559bf6", + "reference": "1d127dbec313e2e227d65e0c483765d8d7559bf6", "shasum": "" }, "require": { - "illuminate/contracts": "^5.0|^6.0|^7.0", - "php": ">=5.4.0" + "asm89/stack-cors": "^1.3", + "illuminate/contracts": "^5.5|^6.0|^7.0|^8.0", + "illuminate/support": "^5.5|^6.0|^7.0|^8.0", + "php": ">=7", + "symfony/http-foundation": "^3.3|^4.0|^5.0", + "symfony/http-kernel": "^3.3|^4.0|^5.0" }, "require-dev": { - "illuminate/http": "^5.0|^6.0|^7.0", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.0" + "laravel/framework": "^5.5|^6.0|^7.0|^8.0", + "orchestra/testbench": "^3.5|^4.0|^5.0|^6.0", + "phpro/grumphp": "^0.16|^0.17", + "phpunit/phpunit": "^6.0|^7.0|^8.0", + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, "laravel": { "providers": [ - "Fideloper\\Proxy\\TrustedProxyServiceProvider" + "Fruitcake\\Cors\\CorsServiceProvider" ] } }, "autoload": { "psr-4": { - "Fideloper\\Proxy\\": "src/" + "Fruitcake\\Cors\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -368,151 +527,269 @@ ], "authors": [ { - "name": "Chris Fidao", - "email": "fideloper@gmail.com" + "name": "Fruitcake", + "homepage": "https://fruitcake.nl/" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" } ], - "description": "Set trusted proxies for Laravel", + "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application", "keywords": [ - "load balancing", - "proxy", - "trusted proxy" + "api", + "cors", + "crossdomain", + "laravel" ], - "time": "2019-12-20T13:11:11+00:00" + "funding": [ + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2020-04-28T08:47:37+00:00" }, { - "name": "jakub-onderka/php-console-color", - "version": "v0.2", + "name": "guzzlehttp/guzzle", + "version": "6.5.5", "source": { "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" + "url": "https://github.com/guzzle/guzzle.git", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", "shasum": "" }, "require": { - "php": ">=5.4.0" + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17.0" }, "require-dev": { - "jakub-onderka/php-code-style": "1.0", - "jakub-onderka/php-parallel-lint": "1.0", - "jakub-onderka/php-var-dump-check": "0.*", - "phpunit/phpunit": "~4.3", - "squizlabs/php_codesniffer": "1.*" + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5-dev" + } + }, "autoload": { "psr-4": { - "JakubOnderka\\PhpConsoleColor\\": "src/" - } + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-2-Clause" + "MIT" ], "authors": [ { - "name": "Jakub Onderka", - "email": "jakub.onderka@gmail.com" + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" } ], - "time": "2018-09-29T17:23:10+00:00" + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2020-06-16T21:01:06+00:00" }, { - "name": "jakub-onderka/php-console-highlighter", - "version": "v0.4", + "name": "guzzlehttp/promises", + "version": "v1.3.1", "source": { "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "jakub-onderka/php-console-color": "~0.2", - "php": ">=5.4.0" + "php": ">=5.5.0" }, "require-dev": { - "jakub-onderka/php-code-style": "~1.0", - "jakub-onderka/php-parallel-lint": "~1.0", - "jakub-onderka/php-var-dump-check": "~0.1", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" + "phpunit/phpunit": "^4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, "autoload": { "psr-4": { - "JakubOnderka\\PhpConsoleHighlighter\\": "src/" + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" } }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "Jakub Onderka", - "email": "acci@acci.cz", - "homepage": "http://www.acci.cz/" + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } ], - "description": "Highlight PHP code in terminal", - "time": "2018-09-29T18:48:56+00:00" + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2019-07-01T23:21:34+00:00" }, { "name": "laravel/framework", - "version": "v6.9.0", + "version": "v7.16.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "60610be97ca389fa4b959d4d13fb3690970d9fb7" + "reference": "dc9cd8338d222dec2d9962553639e08c4585fa5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/60610be97ca389fa4b959d4d13fb3690970d9fb7", - "reference": "60610be97ca389fa4b959d4d13fb3690970d9fb7", + "url": "https://api.github.com/repos/laravel/framework/zipball/dc9cd8338d222dec2d9962553639e08c4585fa5b", + "reference": "dc9cd8338d222dec2d9962553639e08c4585fa5b", "shasum": "" }, "require": { - "doctrine/inflector": "^1.1", + "doctrine/inflector": "^1.4|^2.0", "dragonmantank/cron-expression": "^2.0", "egulias/email-validator": "^2.1.10", - "erusev/parsedown": "^1.7", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "league/flysystem": "^1.0.8", - "monolog/monolog": "^1.12|^2.0", - "nesbot/carbon": "^2.0", + "league/commonmark": "^1.3", + "league/flysystem": "^1.0.34", + "monolog/monolog": "^2.0", + "nesbot/carbon": "^2.17", "opis/closure": "^3.1", - "php": "^7.2", + "php": "^7.2.5", "psr/container": "^1.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "^3.7", + "ramsey/uuid": "^3.7|^4.0", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^4.3.4", - "symfony/debug": "^4.3.4", - "symfony/finder": "^4.3.4", - "symfony/http-foundation": "^4.3.4", - "symfony/http-kernel": "^4.3.4", - "symfony/process": "^4.3.4", - "symfony/routing": "^4.3.4", - "symfony/var-dumper": "^4.3.4", - "tijsverkoyen/css-to-inline-styles": "^2.2.1", - "vlucas/phpdotenv": "^3.3" + "symfony/console": "^5.0", + "symfony/error-handler": "^5.0", + "symfony/finder": "^5.0", + "symfony/http-foundation": "^5.0", + "symfony/http-kernel": "^5.0", + "symfony/mime": "^5.0", + "symfony/polyfill-php73": "^1.17", + "symfony/process": "^5.0", + "symfony/routing": "^5.0", + "symfony/var-dumper": "^5.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.2", + "vlucas/phpdotenv": "^4.0", + "voku/portable-ascii": "^1.4.8" }, "conflict": { "tightenco/collect": "<5.5.33" }, + "provide": { + "psr/container-implementation": "1.0" + }, "replace": { "illuminate/auth": "self.version", "illuminate/broadcasting": "self.version", @@ -539,6 +816,7 @@ "illuminate/routing": "self.version", "illuminate/session": "self.version", "illuminate/support": "self.version", + "illuminate/testing": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", "illuminate/view": "self.version" @@ -547,44 +825,48 @@ "aws/aws-sdk-php": "^3.0", "doctrine/dbal": "^2.6", "filp/whoops": "^2.4", - "guzzlehttp/guzzle": "^6.3", + "guzzlehttp/guzzle": "^6.3.1|^7.0", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.2.3", + "mockery/mockery": "^1.3.1", "moontoast/math": "^1.1", - "orchestra/testbench-core": "^4.0", + "orchestra/testbench-core": "^5.0", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.3", + "phpunit/phpunit": "^8.4|^9.0", "predis/predis": "^1.1.1", - "symfony/cache": "^4.3", - "true/punycode": "^2.1" + "symfony/cache": "^5.0" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", + "ext-ftp": "Required to use the Flysystem FTP driver.", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-memcached": "Required to use the memcache cache driver.", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", - "ext-redis": "Required to use the Redis cache and queue drivers.", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "filp/whoops": "Required for friendly error pages in development (^2.4).", - "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).", - "guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.0).", - "laravel/tinker": "Required to use the tinker console command (^1.0).", + "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", + "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", + "mockery/mockery": "Required to use mocking (^1.3.1).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", + "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", + "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.0).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^4.3.4).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.2).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.0).", + "symfony/filesystem": "Required to create relative storage directory symbolic links (^5.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { @@ -612,35 +894,36 @@ "framework", "laravel" ], - "time": "2019-12-19T18:16:22+00:00" + "time": "2020-06-16T14:31:25+00:00" }, { "name": "laravel/tinker", - "version": "v2.0.0", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "6c2f1a1873180f3ecece0ba34ff9146847bf8dec" + "reference": "cde90a7335a2130a4488beb68f4b2141869241db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/6c2f1a1873180f3ecece0ba34ff9146847bf8dec", - "reference": "6c2f1a1873180f3ecece0ba34ff9146847bf8dec", + "url": "https://api.github.com/repos/laravel/tinker/zipball/cde90a7335a2130a4488beb68f4b2141869241db", + "reference": "cde90a7335a2130a4488beb68f4b2141869241db", "shasum": "" }, "require": { - "illuminate/console": "^6.0|^7.0", - "illuminate/contracts": "^6.0|^7.0", - "illuminate/support": "^6.0|^7.0", + "illuminate/console": "^6.0|^7.0|^8.0", + "illuminate/contracts": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0", "php": "^7.2", - "psy/psysh": "^0.9", - "symfony/var-dumper": "^4.0|^5.0" + "psy/psysh": "^0.10.3", + "symfony/var-dumper": "^4.3|^5.0" }, "require-dev": { - "phpunit/phpunit": "^8.0" + "mockery/mockery": "^1.3.1", + "phpunit/phpunit": "^8.4|^9.0" }, "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0)." }, "type": "library", "extra": { @@ -675,77 +958,177 @@ "laravel", "psysh" ], - "time": "2019-11-26T17:57:28+00:00" + "time": "2020-04-07T15:01:31+00:00" }, { - "name": "league/flysystem", - "version": "1.0.61", + "name": "league/commonmark", + "version": "1.4.3", "source": { "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "4fb13c01784a6c9f165a351e996871488ca2d8c9" + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4fb13c01784a6c9f165a351e996871488ca2d8c9", - "reference": "4fb13c01784a6c9f165a351e996871488ca2d8c9", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/412639f7cfbc0b31ad2455b2fe965095f66ae505", + "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "php": ">=5.5.9" + "ext-mbstring": "*", + "php": "^7.1" }, "conflict": { - "league/flysystem-sftp": "<1.0.6" + "scrutinizer/ocular": "1.7.*" }, "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" - }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + "cebe/markdown": "~1.0", + "commonmark/commonmark.js": "0.29.1", + "erusev/parsedown": "~1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "~1.4", + "mikehaertl/php-shellcommand": "^1.4", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5", + "scrutinizer/ocular": "^1.5", + "symfony/finder": "^4.2" }, + "bin": [ + "bin/commonmark" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.4-dev" } }, "autoload": { "psr-4": { - "League\\Flysystem\\": "src/" + "League\\CommonMark\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frenky.net" + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com/", + "role": "Lead Developer" } ], - "description": "Filesystem abstraction: Many filesystems, one API.", + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com/", "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "funding": [ + { + "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", + "type": "custom" + }, + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://www.patreon.com/colinodell", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", + "type": "tidelift" + } + ], + "time": "2020-05-04T22:15:21+00:00" + }, + { + "name": "league/flysystem", + "version": "1.0.69", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "7106f78428a344bc4f643c233a94e48795f10967" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967", + "reference": "7106f78428a344bc4f643c233a94e48795f10967", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7.26" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", "copy.com", "dropbox", "file systems", @@ -759,24 +1142,30 @@ "sftp", "storage" ], - "time": "2019-12-08T21:46:50+00:00" + "funding": [ + { + "url": "https://offset.earth/frankdejonge", + "type": "other" + } + ], + "time": "2020-05-18T15:13:39+00:00" }, { "name": "monolog/monolog", - "version": "2.0.2", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8" + "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c861fcba2ca29404dc9e617eedd9eff4616986b8", - "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/38914429aac460e8e4616c8cb486ecb40ec90bb1", + "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1", "shasum": "" }, "require": { - "php": "^7.2", + "php": ">=7.2", "psr/log": "^1.0.1" }, "provide": { @@ -787,11 +1176,11 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^6.0", "graylog2/gelf-php": "^1.4.2", - "jakub-onderka/php-parallel-lint": "^0.9", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", + "php-parallel-lint/php-parallel-lint": "^1.0", "phpspec/prophecy": "^1.6.1", - "phpunit/phpunit": "^8.3", + "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", "ruflin/elastica": ">=0.90 <3.0", @@ -840,31 +1229,43 @@ "logging", "psr-3" ], - "time": "2019-12-20T14:22:59+00:00" + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2020-05-22T08:12:19+00:00" }, { "name": "nesbot/carbon", - "version": "2.28.0", + "version": "2.35.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "e2bcbcd43e67ee6101d321d5de916251d2870ca8" + "reference": "4b9bd835261ef23d36397a46a76b496a458305e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e2bcbcd43e67ee6101d321d5de916251d2870ca8", - "reference": "e2bcbcd43e67ee6101d321d5de916251d2870ca8", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4b9bd835261ef23d36397a46a76b496a458305e5", + "reference": "4b9bd835261ef23d36397a46a76b496a458305e5", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", "symfony/translation": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { + "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", "kylekatarnls/multi-tester": "^1.1", - "phpmd/phpmd": "dev-php-7.1-compatibility", + "phpmd/phpmd": "^2.8", "phpstan/phpstan": "^0.11", "phpunit/phpunit": "^7.5 || ^8.0", "squizlabs/php_codesniffer": "^3.4" @@ -875,7 +1276,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "2.x-dev", + "dev-3.x": "3.x-dev" }, "laravel": { "providers": [ @@ -910,20 +1312,30 @@ "datetime", "time" ], - "time": "2019-12-16T16:30:25+00:00" + "funding": [ + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2020-05-24T18:27:52+00:00" }, { "name": "nikic/php-parser", - "version": "v4.3.0", + "version": "v4.5.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc" + "reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc", - "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/53c2753d756f5adb586dca79c2ec0e2654dd9463", + "reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463", "shasum": "" }, "require": { @@ -962,20 +1374,20 @@ "parser", "php" ], - "time": "2019-11-08T13:50:10+00:00" + "time": "2020-06-03T07:24:19+00:00" }, { "name": "opis/closure", - "version": "3.5.1", + "version": "3.5.5", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969" + "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969", + "url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c", + "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c", "shasum": "" }, "require": { @@ -1023,69 +1435,24 @@ "serialization", "serialize" ], - "time": "2019-11-29T22:36:02+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com/" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-02T15:55:56+00:00" + "time": "2020-06-17T14:59:55+00:00" }, { "name": "phpoption/phpoption", - "version": "1.7.2", + "version": "1.7.4", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "77f7c4d2e65413aff5b5a8cc8b3caf7a28d81959" + "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/77f7c4d2e65413aff5b5a8cc8b3caf7a28d81959", - "reference": "77f7c4d2e65413aff5b5a8cc8b3caf7a28d81959", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", + "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0" + "php": "^5.5.9 || ^7.0 || ^8.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.3", @@ -1123,7 +1490,17 @@ "php", "type" ], - "time": "2019-12-15T19:35:24+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2020-06-07T10:40:07+00:00" }, { "name": "psr/container", @@ -1174,18 +1551,114 @@ ], "time": "2017-02-14T16:28:37+00:00" }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://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" + ], + "time": "2016-08-06T14:39:51+00:00" + }, { "name": "psr/log", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -1219,7 +1692,7 @@ "psr", "psr-3" ], - "time": "2019-11-01T11:05:21+00:00" + "time": "2020-03-23T09:12:05+00:00" }, { "name": "psr/simple-cache", @@ -1271,32 +1744,30 @@ }, { "name": "psy/psysh", - "version": "v0.9.12", + "version": "v0.10.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4" + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/90da7f37568aee36b116a030c5f99c915267edd4", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a8aec1b2981ab66882a01cce36a49b6317dc3560", + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560", "shasum": "" }, "require": { "dnoegel/php-xdg-base-dir": "0.1.*", "ext-json": "*", "ext-tokenizer": "*", - "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", - "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", - "php": ">=5.4.0", - "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0|~5.0", - "symfony/var-dumper": "~2.7|~3.0|~4.0|~5.0" + "nikic/php-parser": "~4.0|~3.0|~2.0|~1.3", + "php": "^8.0 || ^7.0 || ^5.5.9", + "symfony/console": "~5.0|~4.0|~3.0|^2.4.2|~2.3.10", + "symfony/var-dumper": "~5.0|~4.0|~3.0|~2.7" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "~2.15|~3.16", - "phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0" + "hoa/console": "3.17.*" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", @@ -1311,7 +1782,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "0.9.x-dev" + "dev-master": "0.10.x-dev" } }, "autoload": { @@ -1341,65 +1812,33 @@ "interactive", "shell" ], - "time": "2019-12-06T14:19:43+00:00" + "time": "2020-05-03T19:32:03+00:00" }, { - "name": "ramsey/uuid", - "version": "3.9.2", + "name": "ralouphie/getallheaders", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "7779489a47d443f845271badbdcedfe4df8e06fb" + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/7779489a47d443f845271badbdcedfe4df8e06fb", - "reference": "7779489a47d443f845271badbdcedfe4df8e06fb", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", "shasum": "" }, "require": { - "ext-json": "*", - "paragonie/random_compat": "^1 | ^2 | 9.99.99", - "php": "^5.4 | ^7 | ^8", - "symfony/polyfill-ctype": "^1.8" - }, - "replace": { - "rhumsaa/uuid": "self.version" + "php": ">=5.6" }, "require-dev": { - "codeception/aspect-mock": "^1 | ^2", - "doctrine/annotations": "^1.2", - "goaop/framework": "1.0.0-alpha.2 | ^1 | ^2.1", - "jakub-onderka/php-parallel-lint": "^1", - "mockery/mockery": "^0.9.11 | ^1", - "moontoast/math": "^1.1", - "paragonie/random-lib": "^2", - "php-mock/php-mock-phpunit": "^0.3 | ^1.1", - "phpunit/phpunit": "^4.8 | ^5.4 | ^6.5", - "squizlabs/php_codesniffer": "^3.5" - }, - "suggest": { - "ext-ctype": "Provides support for PHP Ctype functions", - "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", - "ext-openssl": "Provides the OpenSSL extension for use with the OpenSslGenerator", - "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", - "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", - "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", - "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, "autoload": { - "psr-4": { - "Ramsey\\Uuid\\": "src/" - }, "files": [ - "src/functions.php" + "src/getallheaders.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1408,53 +1847,186 @@ ], "authors": [ { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com/" - }, - { - "name": "Marijn Huizendveld", - "email": "marijn.huizendveld@gmail.com" - }, - { - "name": "Thibaud Fabre", - "email": "thibaud@aztech.io" + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" } ], - "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", - "homepage": "https://github.com/ramsey/uuid", - "keywords": [ - "guid", - "identifier", - "uuid" - ], - "time": "2019-12-17T08:18:51+00:00" + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" }, { - "name": "swiftmailer/swiftmailer", - "version": "v6.2.3", + "name": "ramsey/collection", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9" + "url": "https://github.com/ramsey/collection.git", + "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", + "url": "https://api.github.com/repos/ramsey/collection/zipball/925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca", + "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca", "shasum": "" }, "require": { - "egulias/email-validator": "~2.0", - "php": ">=7.0.0", - "symfony/polyfill-iconv": "^1.0", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" + "php": "^7.2" }, "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "^3.4.19|^4.1.8" - }, + "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", + "fzaninotto/faker": "^1.5", + "jakub-onderka/php-parallel-lint": "^1", + "jangregor/phpstan-prophecy": "^0.6", + "mockery/mockery": "^1.3", + "phpstan/extension-installer": "^1", + "phpstan/phpdoc-parser": "0.4.1", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5", + "slevomat/coding-standard": "^6.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com/" + } + ], + "description": "A PHP 7.2+ library for representing and manipulating collections.", + "homepage": "https://github.com/ramsey/collection", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "time": "2020-01-05T00:22:59+00:00" + }, + { + "name": "ramsey/uuid", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d", + "reference": "ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d", + "shasum": "" + }, + "require": { + "brick/math": "^0.8", + "ext-json": "*", + "php": "^7.2 || ^8", + "ramsey/collection": "^1.0", + "symfony/polyfill-ctype": "^1.8" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "codeception/aspect-mock": "^3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2", + "doctrine/annotations": "^1.8", + "goaop/framework": "^2", + "mockery/mockery": "^1.3", + "moontoast/math": "^1.1", + "paragonie/random-lib": "^2", + "php-mock/php-mock-mockery": "^1.3", + "php-mock/php-mock-phpunit": "^2.5", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpstan/extension-installer": "^1.0", + "phpstan/phpdoc-parser": "0.4.3", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5", + "psy/psysh": "^0.10.0", + "slevomat/coding-standard": "^6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "3.9.4" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-ctype": "Enables faster processing of character classification using ctype functions.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Uuid\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "homepage": "https://github.com/ramsey/uuid", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + } + ], + "time": "2020-03-29T20:13:32+00:00" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v6.2.3", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", + "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", + "shasum": "" + }, + "require": { + "egulias/email-validator": "~2.0", + "php": ">=7.0.0", + "symfony/polyfill-iconv": "^1.0", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "^3.4.19|^4.1.8" + }, "suggest": { "ext-intl": "Needed to support internationalized email addresses", "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" @@ -1494,41 +2066,44 @@ }, { "name": "symfony/console", - "version": "v4.4.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0" + "reference": "34ac555a3627e324b660e318daa07572e1140123" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/82437719dab1e6bdd28726af14cb345c2ec816d0", - "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0", + "url": "https://api.github.com/repos/symfony/console/zipball/34ac555a3627e324b660e318daa07572e1140123", + "reference": "34ac555a3627e324b660e318daa07572e1140123", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1|^2" + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" }, "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", "symfony/lock": "<4.4", - "symfony/process": "<3.3" + "symfony/process": "<4.4" }, "provide": { "psr/log-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^4.3", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", "symfony/lock": "^4.4|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/var-dumper": "^4.3|^5.0" + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" }, "suggest": { "psr/log": "For using the console logger", @@ -1539,7 +2114,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1566,29 +2141,43 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com/", - "time": "2019-12-17T10:32:23+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-15T12:59:21+00:00" }, { "name": "symfony/css-selector", - "version": "v5.0.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "19d29e7098b7b2c3313cb03902ca30f100dcb837" + "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/19d29e7098b7b2c3313cb03902ca30f100dcb837", - "reference": "19d29e7098b7b2c3313cb03902ca30f100dcb837", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/e544e24472d4c97b2d11ade7caacd446727c6bf9", + "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1619,44 +2208,48 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com/", - "time": "2019-11-18T17:27:11+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-20T17:43:50+00:00" }, { - "name": "symfony/debug", - "version": "v4.4.2", + "name": "symfony/deprecation-contracts", + "version": "v2.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "5c4c1db977dc70bb3250e1308d3e8c6341aa38f5" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/5c4c1db977dc70bb3250e1308d3e8c6341aa38f5", - "reference": "5c4c1db977dc70bb3250e1308d3e8c6341aa38f5", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", + "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": "<3.4" - }, - "require-dev": { - "symfony/http-kernel": "^3.4|^4.0|^5.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "2.1-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1665,46 +2258,61 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Debug Component", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com/", - "time": "2019-12-16T14:46:54+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-27T08:34:37+00:00" }, { "name": "symfony/error-handler", - "version": "v4.4.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "6d7d7712a6ff5215ec26215672293b154f1db8c1" + "reference": "7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/6d7d7712a6ff5215ec26215672293b154f1db8c1", - "reference": "6d7d7712a6ff5215ec26215672293b154f1db8c1", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896", + "reference": "7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/log": "~1.0", - "symfony/debug": "^4.4", + "php": ">=7.2.5", + "psr/log": "^1.0", + "symfony/polyfill-php80": "^1.15", "symfony/var-dumper": "^4.4|^5.0" }, "require-dev": { + "symfony/deprecation-contracts": "^2.1", "symfony/http-kernel": "^4.4|^5.0", "symfony/serializer": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1731,41 +2339,57 @@ ], "description": "Symfony ErrorHandler Component", "homepage": "https://symfony.com/", - "time": "2019-12-16T14:46:54+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b3c3068a72623287550fe20b84a2b01dcba2686f" + "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b3c3068a72623287550fe20b84a2b01dcba2686f", - "reference": "b3c3068a72623287550fe20b84a2b01dcba2686f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/cc0d059e2e997e79ca34125a52f3e33de4424ac7", + "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/event-dispatcher-contracts": "^1.1" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/event-dispatcher-contracts": "^2", + "symfony/polyfill-php80": "^1.15" }, "conflict": { - "symfony/dependency-injection": "<3.4" + "symfony/dependency-injection": "<4.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "1.1" + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/http-foundation": "^3.4|^4.0|^5.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^3.4|^4.0|^5.0" + "symfony/stopwatch": "^4.4|^5.0" }, "suggest": { "symfony/dependency-injection": "", @@ -1774,7 +2398,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1801,33 +2425,47 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com/", - "time": "2019-11-28T13:33:56+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.7", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18" + "reference": "405952c4e90941a17e52ef7489a2bd94870bb290" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18", - "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/405952c4e90941a17e52ef7489a2bd94870bb290", + "reference": "405952c4e90941a17e52ef7489a2bd94870bb290", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5", + "psr/event-dispatcher": "^1" }, "suggest": { - "psr/event-dispatcher": "", "symfony/event-dispatcher-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -1859,29 +2497,43 @@ "interoperability", "standards" ], - "time": "2019-09-17T09:54:03+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/finder", - "version": "v4.4.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ce8743441da64c41e2a667b8eb66070444ed911e" + "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ce8743441da64c41e2a667b8eb66070444ed911e", - "reference": "ce8743441da64c41e2a667b8eb66070444ed911e", + "url": "https://api.github.com/repos/symfony/finder/zipball/4298870062bfc667cb78d2b379be4bf5dec5f187", + "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1908,35 +2560,55 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com/", - "time": "2019-11-17T21:56:56+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62" + "reference": "f93055171b847915225bd5b0a5792888419d8d75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/fcae1cff5b57b2a9c3aabefeb1527678705ddb62", - "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f93055171b847915225bd5b0a5792888419d8d75", + "reference": "f93055171b847915225bd5b0a5792888419d8d75", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/mime": "^4.3|^5.0", - "symfony/polyfill-mbstring": "~1.1" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php80": "^1.15" }, "require-dev": { "predis/predis": "~1.0", - "symfony/expression-language": "^3.4|^4.0|^5.0" + "symfony/cache": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0" + }, + "suggest": { + "symfony/mime": "To use the file extension guesser" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1963,59 +2635,82 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com/", - "time": "2019-12-19T15:57:49+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-15T06:52:54+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "fe310d2e95cd4c356836c8ecb0895a46d97fede2" + "reference": "a18c27ace1ef344ffcb129a5b089bad7643b387a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/fe310d2e95cd4c356836c8ecb0895a46d97fede2", - "reference": "fe310d2e95cd4c356836c8ecb0895a46d97fede2", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a18c27ace1ef344ffcb129a5b089bad7643b387a", + "reference": "a18c27ace1ef344ffcb129a5b089bad7643b387a", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.2.5", "psr/log": "~1.0", - "symfony/error-handler": "^4.4", - "symfony/event-dispatcher": "^4.4", + "symfony/deprecation-contracts": "^2.1", + "symfony/error-handler": "^4.4|^5.0", + "symfony/event-dispatcher": "^5.0", "symfony/http-foundation": "^4.4|^5.0", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9" + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.15" }, "conflict": { - "symfony/browser-kit": "<4.3", - "symfony/config": "<3.4", - "symfony/console": ">=5", - "symfony/dependency-injection": "<4.3", - "symfony/translation": "<4.2", - "twig/twig": "<1.34|<2.4,>=2" + "symfony/browser-kit": "<4.4", + "symfony/cache": "<5.0", + "symfony/config": "<5.0", + "symfony/console": "<4.4", + "symfony/dependency-injection": "<4.4", + "symfony/doctrine-bridge": "<5.0", + "symfony/form": "<5.0", + "symfony/http-client": "<5.0", + "symfony/mailer": "<5.0", + "symfony/messenger": "<5.0", + "symfony/translation": "<5.0", + "symfony/twig-bridge": "<5.0", + "symfony/validator": "<5.0", + "twig/twig": "<2.4" }, "provide": { "psr/log-implementation": "1.0" }, "require-dev": { "psr/cache": "~1.0", - "symfony/browser-kit": "^4.3|^5.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/console": "^3.4|^4.0", - "symfony/css-selector": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^4.3|^5.0", - "symfony/dom-crawler": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/finder": "^3.4|^4.0|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/routing": "^3.4|^4.0|^5.0", - "symfony/stopwatch": "^3.4|^4.0|^5.0", - "symfony/templating": "^3.4|^4.0|^5.0", - "symfony/translation": "^4.2|^5.0", + "symfony/browser-kit": "^4.4|^5.0", + "symfony/config": "^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/css-selector": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/routing": "^4.4|^5.0", + "symfony/stopwatch": "^4.4|^5.0", + "symfony/translation": "^4.4|^5.0", "symfony/translation-contracts": "^1.1|^2", - "twig/twig": "^1.34|^2.4|^3.0" + "twig/twig": "^2.4|^3.0" }, "suggest": { "symfony/browser-kit": "", @@ -2026,7 +2721,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2053,26 +2748,41 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com/", - "time": "2019-12-19T16:23:40+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-15T13:51:38+00:00" }, { "name": "symfony/mime", - "version": "v5.0.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "0e6a4ced216e49d457eddcefb61132173a876d79" + "reference": "c0c418f05e727606e85b482a8591519c4712cf45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/0e6a4ced216e49d457eddcefb61132173a876d79", - "reference": "0e6a4ced216e49d457eddcefb61132173a876d79", + "url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45", + "reference": "c0c418f05e727606e85b482a8591519c4712cf45", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/mailer": "<4.4" @@ -2084,7 +2794,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2115,20 +2825,34 @@ "mime", "mime-type" ], - "time": "2019-11-30T14:12:50+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-09T15:07:35+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", "shasum": "" }, "require": { @@ -2140,7 +2864,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2173,20 +2897,34 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-12T16:14:59+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.13.1", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "a019efccc03f1a335af6b4f20c30f5ea8060be36" + "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/a019efccc03f1a335af6b4f20c30f5ea8060be36", - "reference": "a019efccc03f1a335af6b4f20c30f5ea8060be36", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c4de7601eefbf25f9d47190abe07f79fe0a27424", + "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424", "shasum": "" }, "require": { @@ -2198,7 +2936,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2232,26 +2970,114 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-12T16:47:27+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.17.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "e094b0770f7833fdf257e6ba4775be4e258230b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e094b0770f7833fdf257e6ba4775be4e258230b2", + "reference": "e094b0770f7833fdf257e6ba4775be4e258230b2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com/", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.1", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46" + "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a", + "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.9" + "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -2259,7 +3085,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2294,37 +3120,198 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-12T16:47:27+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.17.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "1357b1d168eb7f68ad6a134838e46b0b159444a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/1357b1d168eb7f68ad6a134838e46b0b159444a9", + "reference": "1357b1d168eb7f68ad6a134838e46b0b159444a9", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com/", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-12T16:14:59+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.17.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "fa79b11539418b02fc5e1897267673ba2c19419c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c", + "reference": "fa79b11539418b02fc5e1897267673ba2c19419c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com/", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-12T16:47:27+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.17.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "f048e612a3905f34931127360bdd2def19a5e582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", + "reference": "f048e612a3905f34931127360bdd2def19a5e582", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "suggest": { - "ext-mbstring": "For best performance" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Php72\\": "" }, "files": [ "bootstrap.php" @@ -2344,29 +3331,42 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", "homepage": "https://symfony.com/", "keywords": [ "compatibility", - "mbstring", "polyfill", "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-12T16:47:27+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "name": "symfony/polyfill-php73", + "version": "v1.17.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc", + "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc", "shasum": "" }, "require": { @@ -2375,15 +3375,18 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" + "Symfony\\Polyfill\\Php73\\": "" }, "files": [ "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2400,7 +3403,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", "homepage": "https://symfony.com/", "keywords": [ "compatibility", @@ -2408,34 +3411,48 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-12T16:47:27+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "name": "symfony/polyfill-php80", + "version": "v1.17.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd", + "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Polyfill\\Php80\\": "" }, "files": [ "bootstrap.php" @@ -2449,6 +3466,10 @@ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -2458,7 +3479,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com/", "keywords": [ "compatibility", @@ -2466,29 +3487,44 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/process", - "version": "v4.4.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b" + "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/b84501ad50adb72a94fb460a5b5c91f693e99c9b", - "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b", + "url": "https://api.github.com/repos/symfony/process/zipball/7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1", + "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2515,38 +3551,54 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com/", - "time": "2019-12-06T10:06:46+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/routing", - "version": "v4.4.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "628bcafae1b2043969378dcfbf9c196539a38722" + "reference": "bbd0ba121d623f66d165a55a108008968911f3eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/628bcafae1b2043969378dcfbf9c196539a38722", - "reference": "628bcafae1b2043969378dcfbf9c196539a38722", + "url": "https://api.github.com/repos/symfony/routing/zipball/bbd0ba121d623f66d165a55a108008968911f3eb", + "reference": "bbd0ba121d623f66d165a55a108008968911f3eb", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15" }, "conflict": { - "symfony/config": "<4.2", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" + "symfony/config": "<5.0", + "symfony/dependency-injection": "<4.4", + "symfony/yaml": "<4.4" }, "require-dev": { "doctrine/annotations": "~1.2", "psr/log": "~1.0", - "symfony/config": "^4.2|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/http-foundation": "^3.4|^4.0|^5.0", - "symfony/yaml": "^3.4|^4.0|^5.0" + "symfony/config": "^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -2558,7 +3610,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2591,24 +3643,38 @@ "uri", "url" ], - "time": "2019-12-12T12:53:52+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-10T11:49:58+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.0.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" + "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/66a8f0957a3ca54e4f724e49028ab19d75a8918b", + "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -2617,7 +3683,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -2649,46 +3715,147 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-20T17:43:50+00:00" + }, + { + "name": "symfony/string", + "version": "v5.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "ac70459db781108db7c6d8981dd31ce0e29e3298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/ac70459db781108db7c6d8981dd31ce0e29e3298", + "reference": "ac70459db781108db7c6d8981dd31ce0e29e3298", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony String component", + "homepage": "https://symfony.com/", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-11T12:16:36+00:00" }, { "name": "symfony/translation", - "version": "v4.4.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "f7669f48a9633bf8139bc026c755e894b7206677" + "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/f7669f48a9633bf8139bc026c755e894b7206677", - "reference": "f7669f48a9633bf8139bc026c755e894b7206677", + "url": "https://api.github.com/repos/symfony/translation/zipball/d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", + "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^1.1.6|^2" + "symfony/polyfill-php80": "^1.15", + "symfony/translation-contracts": "^2" }, "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4", - "symfony/http-kernel": "<4.4", - "symfony/yaml": "<3.4" + "symfony/config": "<4.4", + "symfony/dependency-injection": "<5.0", + "symfony/http-kernel": "<5.0", + "symfony/twig-bundle": "<5.0", + "symfony/yaml": "<4.4" }, "provide": { - "symfony/translation-implementation": "1.0" + "symfony/translation-implementation": "2.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/finder": "~2.8|~3.0|~4.0|^5.0", - "symfony/http-kernel": "^4.4", - "symfony/intl": "^3.4|^4.0|^5.0", + "symfony/config": "^4.4|^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/dependency-injection": "^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/http-kernel": "^5.0", + "symfony/intl": "^4.4|^5.0", "symfony/service-contracts": "^1.1.2|^2", - "symfony/yaml": "^3.4|^4.0|^5.0" + "symfony/yaml": "^4.4|^5.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", @@ -2698,7 +3865,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2725,24 +3892,38 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com/", - "time": "2019-12-12T12:53:52+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.0.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed" + "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/8cc682ac458d75557203b2f2f14b0b92e1c744ed", - "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/e5ca07c8f817f865f618aa072c2fe8e0e637340e", + "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5" }, "suggest": { "symfony/translation-implementation": "" @@ -2750,7 +3931,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -2782,36 +3963,50 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.4.2", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "be330f919bdb395d1e0c3f2bfb8948512d6bdd99" + "reference": "46a942903059b0b05e601f00eb64179e05578c0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/be330f919bdb395d1e0c3f2bfb8948512d6bdd99", - "reference": "be330f919bdb395d1e0c3f2bfb8948512d6bdd99", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/46a942903059b0b05e601f00eb64179e05578c0f", + "reference": "46a942903059b0b05e601f00eb64179e05578c0f", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5" + "symfony/polyfill-php80": "^1.15" }, "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<4.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^3.4|^4.0|^5.0", + "symfony/console": "^4.4|^5.0", "symfony/process": "^4.4|^5.0", - "twig/twig": "^1.34|^2.4|^3.0" + "twig/twig": "^2.4|^3.0" }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", @@ -2824,7 +4019,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2858,7 +4053,21 @@ "debug", "dump" ], - "time": "2019-12-18T13:41:29+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-30T20:35:19+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -2911,30 +4120,37 @@ }, { "name": "vlucas/phpdotenv", - "version": "v3.6.0", + "version": "v4.1.7", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1bdf24f065975594f6a117f0f1f6cabf1333b156" + "reference": "db63b2ea280fdcf13c4ca392121b0b2450b51193" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1bdf24f065975594f6a117f0f1f6cabf1333b156", - "reference": "1bdf24f065975594f6a117f0f1f6cabf1333b156", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/db63b2ea280fdcf13c4ca392121b0b2450b51193", + "reference": "db63b2ea280fdcf13c4ca392121b0b2450b51193", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0", - "phpoption/phpoption": "^1.5", - "symfony/polyfill-ctype": "^1.9" + "php": "^5.5.9 || ^7.0 || ^8.0", + "phpoption/phpoption": "^1.7.3", + "symfony/polyfill-ctype": "^1.16" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-filter": "*", + "ext-pcre": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator.", + "ext-pcre": "Required to use most of the library." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.6-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2964,26 +4180,102 @@ "env", "environment" ], - "time": "2019-09-10T21:37:39+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2020-06-07T18:25:35+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "618631dc601d8eb6ea0a9fbf654ec82f066c4e97" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/618631dc601d8eb6ea0a9fbf654ec82f066c4e97", + "reference": "618631dc601d8eb6ea0a9fbf654ec82f066c4e97", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "http://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "time": "2020-06-15T23:49:30+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -3022,27 +4314,41 @@ "constructor", "instantiate" ], - "time": "2019-10-21T16:45:58+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-05-29T17:27:14+00:00" }, { "name": "facade/flare-client-php", - "version": "1.3.1", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/facade/flare-client-php.git", - "reference": "24444ea0e1556f0a4b5fc8e61802caf72ae9a408" + "reference": "db1e03426e7f9472c9ecd1092aff00f56aa6c004" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/24444ea0e1556f0a4b5fc8e61802caf72ae9a408", - "reference": "24444ea0e1556f0a4b5fc8e61802caf72ae9a408", + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/db1e03426e7f9472c9ecd1092aff00f56aa6c004", + "reference": "db1e03426e7f9472c9ecd1092aff00f56aa6c004", "shasum": "" }, "require": { "facade/ignition-contracts": "~1.0", - "illuminate/pipeline": "~5.5|~5.6|~5.7|~5.8|^6.0", + "illuminate/pipeline": "^5.5|^6.0|^7.0", "php": "^7.1", - "symfony/http-foundation": "~3.3|~4.1", + "symfony/http-foundation": "^3.3|^4.1|^5.0", "symfony/var-dumper": "^3.4|^4.0|^5.0" }, "require-dev": { @@ -3076,47 +4382,53 @@ "flare", "reporting" ], - "time": "2019-12-15T18:28:38+00:00" + "funding": [ + { + "url": "https://www.patreon.com/spatie", + "type": "patreon" + } + ], + "time": "2020-03-02T15:52:04+00:00" }, { "name": "facade/ignition", - "version": "1.13.0", + "version": "2.0.7", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "1d2103aefecc9c4e6975bcc77fc5eceb330adb33" + "reference": "e6bedc1e74507d584fbcb041ebe0f7f215109cf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/1d2103aefecc9c4e6975bcc77fc5eceb330adb33", - "reference": "1d2103aefecc9c4e6975bcc77fc5eceb330adb33", + "url": "https://api.github.com/repos/facade/ignition/zipball/e6bedc1e74507d584fbcb041ebe0f7f215109cf2", + "reference": "e6bedc1e74507d584fbcb041ebe0f7f215109cf2", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "facade/flare-client-php": "^1.3", + "facade/flare-client-php": "^1.0", "facade/ignition-contracts": "^1.0", "filp/whoops": "^2.4", - "illuminate/support": "~5.5.0 || ~5.6.0 || ~5.7.0 || ~5.8.0 || ^6.0", - "monolog/monolog": "^1.12 || ^2.0", - "php": "^7.1", + "illuminate/support": "^7.0|^8.0", + "monolog/monolog": "^2.0", + "php": "^7.2.5", "scrivo/highlight.php": "^9.15", - "symfony/console": "^3.4 || ^4.0", - "symfony/var-dumper": "^3.4 || ^4.0" + "symfony/console": "^5.0", + "symfony/var-dumper": "^5.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.14", - "mockery/mockery": "^1.2", - "orchestra/testbench": "^3.5 || ^3.6 || ^3.7 || ^3.8 || ^4.0" + "mockery/mockery": "^1.3", + "orchestra/testbench": "5.0" }, "suggest": { - "laravel/telescope": "^2.0" + "laravel/telescope": "^3.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.x-dev" }, "laravel": { "providers": [ @@ -3147,7 +4459,7 @@ "laravel", "page" ], - "time": "2019-11-27T11:17:18+00:00" + "time": "2020-06-08T09:14:08+00:00" }, { "name": "facade/ignition-contracts", @@ -3195,16 +4507,16 @@ }, { "name": "filp/whoops", - "version": "2.5.1", + "version": "2.7.3", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "ee9699e79d8fcdd15c107e035d7b965e4fa854ac" + "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/ee9699e79d8fcdd15c107e035d7b965e4fa854ac", - "reference": "ee9699e79d8fcdd15c107e035d7b965e4fa854ac", + "url": "https://api.github.com/repos/filp/whoops/zipball/5d5fe9bb3d656b514d455645b3addc5f7ba7714d", + "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d", "shasum": "" }, "require": { @@ -3213,8 +4525,8 @@ }, "require-dev": { "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.35 || ^5.7", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" }, "suggest": { "symfony/var-dumper": "Pretty print complex values better with var-dumper available", @@ -3223,7 +4535,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -3252,7 +4564,7 @@ "throwable", "whoops" ], - "time": "2019-12-21T10:00:00+00:00" + "time": "2020-06-14T09:00:00+00:00" }, { "name": "fzaninotto/faker", @@ -3354,31 +4666,33 @@ }, { "name": "mockery/mockery", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "5571962a4f733fbb57bede39778f71647fae8e66" + "reference": "6c6a7c533469873deacf998237e7649fc6b36223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/5571962a4f733fbb57bede39778f71647fae8e66", - "reference": "5571962a4f733fbb57bede39778f71647fae8e66", + "url": "https://api.github.com/repos/mockery/mockery/zipball/6c6a7c533469873deacf998237e7649fc6b36223", + "reference": "6c6a7c533469873deacf998237e7649fc6b36223", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "~2.0", "lib-pcre": ">=7.0", - "php": ">=5.6.0", - "sebastian/comparator": "^1.2.4|^3.0" + "php": "^7.3.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" + "phpunit/phpunit": "^8.0.0 || ^9.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { @@ -3416,20 +4730,20 @@ "test double", "testing" ], - "time": "2019-11-24T07:54:50+00:00" + "time": "2020-05-19T14:25:16+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.4", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7" + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/579bb7356d91f9456ccd505f24ca8b667966a0a7", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", "shasum": "" }, "require": { @@ -3464,33 +4778,39 @@ "object", "object graph" ], - "time": "2019-12-15T19:12:40+00:00" + "time": "2020-01-17T21:11:47+00:00" }, { "name": "nunomaduro/collision", - "version": "v3.0.1", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "af42d339fe2742295a54f6fdd42aaa6f8c4aca68" + "reference": "d50490417eded97be300a92cd7df7badc37a9018" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/af42d339fe2742295a54f6fdd42aaa6f8c4aca68", - "reference": "af42d339fe2742295a54f6fdd42aaa6f8c4aca68", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/d50490417eded97be300a92cd7df7badc37a9018", + "reference": "d50490417eded97be300a92cd7df7badc37a9018", "shasum": "" }, "require": { - "filp/whoops": "^2.1.4", - "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", - "php": "^7.1", - "symfony/console": "~2.8|~3.3|~4.0" + "facade/ignition-contracts": "^1.0", + "filp/whoops": "^2.4", + "php": "^7.2.5", + "symfony/console": "^5.0" }, "require-dev": { - "laravel/framework": "5.8.*", - "nunomaduro/larastan": "^0.3.0", - "phpstan/phpstan": "^0.11", - "phpunit/phpunit": "~8.0" + "facade/ignition": "^2.0", + "fideloper/proxy": "^4.2", + "friendsofphp/php-cs-fixer": "^2.16", + "fruitcake/laravel-cors": "^1.0", + "laravel/framework": "^7.0", + "laravel/tinker": "^2.0", + "nunomaduro/larastan": "^0.5", + "orchestra/testbench": "^5.0", + "phpstan/phpstan": "^0.12.3", + "phpunit/phpunit": "^8.5.1 || ^9.0" }, "type": "library", "extra": { @@ -3528,7 +4848,21 @@ "php", "symfony" ], - "time": "2019-03-07T21:35:13+00:00" + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2020-04-04T19:56:08+00:00" }, { "name": "phar-io/manifest", @@ -3634,24 +4968,21 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", "shasum": "" }, "require": { "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "~6" - }, "type": "library", "extra": { "branch-alias": { @@ -3682,44 +5013,42 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "time": "2020-04-27T09:25:28+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.3", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "2ecaa9fef01634c83bfa8dc1fe35fb5cef223a62" + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/2ecaa9fef01634c83bfa8dc1fe35fb5cef223a62", - "reference": "2ecaa9fef01634c83bfa8dc1fe35fb5cef223a62", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3730,33 +5059,36 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-12-20T13:40:23+00:00" + "time": "2020-02-22T12:28:44+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.2", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "^7.2", + "mockery/mockery": "~1" }, "type": "library", "extra": { @@ -3780,28 +5112,28 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "time": "2020-02-18T18:59:58+00:00" }, { "name": "phpspec/prophecy", - "version": "1.10.1", + "version": "v1.10.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc" + "reference": "451c3cd1418cf640de218914901e51b064abb093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { "phpspec/phpspec": "^2.5 || ^3.2", @@ -3843,7 +5175,7 @@ "spy", "stub" ], - "time": "2019-12-22T21:05:45+00:00" + "time": "2020-03-05T15:02:03+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4099,16 +5431,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.0", + "version": "8.5.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab" + "reference": "3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3ee1c1fd6fc264480c25b6fb8285edefe1702dab", - "reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348", + "reference": "3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348", "shasum": "" }, "require": { @@ -4178,20 +5510,30 @@ "testing", "xunit" ], - "time": "2019-12-06T05:41:38+00:00" + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T10:45:47+00:00" }, { "name": "scrivo/highlight.php", - "version": "v9.17.1.0", + "version": "v9.18.1.1", "source": { "type": "git", "url": "https://github.com/scrivo/highlight.php.git", - "reference": "5451a9ad6d638559cf2a092880f935c39776134e" + "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/5451a9ad6d638559cf2a092880f935c39776134e", - "reference": "5451a9ad6d638559cf2a092880f935c39776134e", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/52fc21c99fd888e33aed4879e55a3646f8d40558", + "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558", "shasum": "" }, "require": { @@ -4201,8 +5543,9 @@ }, "require-dev": { "phpunit/phpunit": "^4.8|^5.7", - "symfony/finder": "^3.4", - "symfony/var-dumper": "^3.4" + "sabberworm/php-css-parser": "^8.3", + "symfony/finder": "^2.8|^3.4", + "symfony/var-dumper": "^2.8|^3.4" }, "suggest": { "ext-dom": "Needed to make use of the features in the utilities namespace" @@ -4246,7 +5589,13 @@ "highlight.php", "syntax" ], - "time": "2019-12-13T21:54:06+00:00" + "funding": [ + { + "url": "https://github.com/allejo", + "type": "github" + } + ], + "time": "2020-03-02T05:59:21+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4905,16 +6254,16 @@ }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "reference": "9dc4f203e36f2b486149058bade43c851dd97451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozart/assert/zipball/9dc4f203e36f2b486149058bade43c851dd97451", + "reference": "9dc4f203e36f2b486149058bade43c851dd97451", "shasum": "" }, "require": { @@ -4922,7 +6271,8 @@ "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "vimeo/psalm": "<3.6.0" + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" @@ -4949,7 +6299,7 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "time": "2020-06-16T10:16:42+00:00" } ], "aliases": [], @@ -4958,7 +6308,8 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.2" + "php": "^7.2.5" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/example/config/app.php b/example/config/app.php index c9960cd..8409e00 100644 --- a/example/config/app.php +++ b/example/config/app.php @@ -39,7 +39,7 @@ | */ - 'debug' => env('APP_DEBUG', false), + 'debug' => (bool) env('APP_DEBUG', false), /* |-------------------------------------------------------------------------- @@ -207,6 +207,7 @@ 'File' => Illuminate\Support\Facades\File::class, 'Gate' => Illuminate\Support\Facades\Gate::class, 'Hash' => Illuminate\Support\Facades\Hash::class, + 'Http' => Illuminate\Support\Facades\Http::class, 'Lang' => Illuminate\Support\Facades\Lang::class, 'Log' => Illuminate\Support\Facades\Log::class, 'Mail' => Illuminate\Support\Facades\Mail::class, diff --git a/example/config/cache.php b/example/config/cache.php index 46751e6..4f41fdf 100644 --- a/example/config/cache.php +++ b/example/config/cache.php @@ -39,6 +39,7 @@ 'array' => [ 'driver' => 'array', + 'serialize' => false, ], 'database' => [ diff --git a/example/config/cors.php b/example/config/cors.php new file mode 100644 index 0000000..558369d --- /dev/null +++ b/example/config/cors.php @@ -0,0 +1,34 @@ + ['api/*'], + + 'allowed_methods' => ['*'], + + 'allowed_origins' => ['*'], + + 'allowed_origins_patterns' => [], + + 'allowed_headers' => ['*'], + + 'exposed_headers' => [], + + 'max_age' => 0, + + 'supports_credentials' => false, + +]; diff --git a/example/config/database.php b/example/config/database.php index 199382d..b42d9b3 100644 --- a/example/config/database.php +++ b/example/config/database.php @@ -130,16 +130,16 @@ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), - 'port' => env('REDIS_PORT', 6379), - 'database' => env('REDIS_DB', 0), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_DB', '0'), ], 'cache' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), - 'port' => env('REDIS_PORT', 6379), - 'database' => env('REDIS_CACHE_DB', 1), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_CACHE_DB', '1'), ], ], diff --git a/example/config/filesystems.php b/example/config/filesystems.php index ec6a7ce..94c8112 100644 --- a/example/config/filesystems.php +++ b/example/config/filesystems.php @@ -62,8 +62,24 @@ 'region' => env('AWS_DEFAULT_REGION'), 'bucket' => env('AWS_BUCKET'), 'url' => env('AWS_URL'), + 'endpoint' => env('AWS_ENDPOINT'), ], ], + /* + |-------------------------------------------------------------------------- + | Symbolic Links + |-------------------------------------------------------------------------- + | + | Here you may configure the symbolic links that will be created when the + | `storage:link` Artisan command is executed. The array keys should be + | the locations of the links and the values should be their targets. + | + */ + + 'links' => [ + public_path('storage') => storage_path('app/public'), + ], + ]; diff --git a/example/config/logging.php b/example/config/logging.php index ad0aba7..088c204 100644 --- a/example/config/logging.php +++ b/example/config/logging.php @@ -95,6 +95,10 @@ 'driver' => 'monolog', 'handler' => NullHandler::class, ], + + 'emergency' => [ + 'path' => storage_path('logs/laravel.log'), + ], ], ]; diff --git a/example/config/mail.php b/example/config/mail.php index 3c65eb3..54299aa 100644 --- a/example/config/mail.php +++ b/example/config/mail.php @@ -4,45 +4,73 @@ /* |-------------------------------------------------------------------------- - | Mail Driver + | Default Mailer |-------------------------------------------------------------------------- | - | Laravel supports both SMTP and PHP's "mail" function as drivers for the - | sending of e-mail. You may specify which one you're using throughout - | your application here. By default, Laravel is setup for SMTP mail. - | - | Supported: "smtp", "sendmail", "mailgun", "ses", - | "postmark", "log", "array" + | This option controls the default mailer that is used to send any email + | messages sent by your application. Alternative mailers may be setup + | and used as needed; however, this mailer will be used by default. | */ - 'driver' => env('MAIL_DRIVER', 'smtp'), + 'default' => env('MAIL_MAILER', 'smtp'), /* |-------------------------------------------------------------------------- - | SMTP Host Address + | Mailer Configurations |-------------------------------------------------------------------------- | - | Here you may provide the host address of the SMTP server used by your - | applications. A default option is provided that is compatible with - | the Mailgun mail service which will provide reliable deliveries. + | Here you may configure all of the mailers used by your application plus + | their respective settings. Several examples have been configured for + | you and you are free to add your own as your application requires. | - */ - - 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), - - /* - |-------------------------------------------------------------------------- - | SMTP Host Port - |-------------------------------------------------------------------------- + | Laravel supports a variety of mail "transport" drivers to be used while + | sending an e-mail. You will specify which one you are using for your + | mailers below. You are free to add additional mailers as required. | - | This is the SMTP port used by your application to deliver e-mails to - | users of the application. Like the host we have set this value to - | stay compatible with the Mailgun e-mail application by default. + | Supported: "smtp", "sendmail", "mailgun", "ses", + | "postmark", "log", "array" | */ - 'port' => env('MAIL_PORT', 587), + 'mailers' => [ + 'smtp' => [ + 'transport' => 'smtp', + 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), + 'port' => env('MAIL_PORT', 587), + 'encryption' => env('MAIL_ENCRYPTION', 'tls'), + 'username' => env('MAIL_USERNAME'), + 'password' => env('MAIL_PASSWORD'), + 'timeout' => null, + 'auth_mode' => null, + ], + + 'ses' => [ + 'transport' => 'ses', + ], + + 'mailgun' => [ + 'transport' => 'mailgun', + ], + + 'postmark' => [ + 'transport' => 'postmark', + ], + + 'sendmail' => [ + 'transport' => 'sendmail', + 'path' => '/usr/sbin/sendmail -bs', + ], + + 'log' => [ + 'transport' => 'log', + 'channel' => env('MAIL_LOG_CHANNEL'), + ], + + 'array' => [ + 'transport' => 'array', + ], + ], /* |-------------------------------------------------------------------------- @@ -60,47 +88,6 @@ 'name' => env('MAIL_FROM_NAME', 'Example'), ], - /* - |-------------------------------------------------------------------------- - | E-Mail Encryption Protocol - |-------------------------------------------------------------------------- - | - | Here you may specify the encryption protocol that should be used when - | the application send e-mail messages. A sensible default using the - | transport layer security protocol should provide great security. - | - */ - - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), - - /* - |-------------------------------------------------------------------------- - | SMTP Server Username - |-------------------------------------------------------------------------- - | - | If your SMTP server requires a username for authentication, you should - | set it here. This will get used to authenticate with your server on - | connection. You may also set the "password" value below this one. - | - */ - - 'username' => env('MAIL_USERNAME'), - - 'password' => env('MAIL_PASSWORD'), - - /* - |-------------------------------------------------------------------------- - | Sendmail System Path - |-------------------------------------------------------------------------- - | - | When using the "sendmail" driver to send e-mails, we will need to know - | the path to where Sendmail lives on this server. A default path has - | been provided here, which will work well on most of your systems. - | - */ - - 'sendmail' => '/usr/sbin/sendmail -bs', - /* |-------------------------------------------------------------------------- | Markdown Mail Settings @@ -120,17 +107,4 @@ ], ], - /* - |-------------------------------------------------------------------------- - | Log Channel - |-------------------------------------------------------------------------- - | - | If you are using the "log" driver, you may specify the logging channel - | if you prefer to keep mail messages separate from other log entries - | for simpler reading. Otherwise, the default channel will be used. - | - */ - - 'log_channel' => env('MAIL_LOG_CHANNEL'), - ]; diff --git a/example/config/queue.php b/example/config/queue.php index 3a30d6c..00b76d6 100644 --- a/example/config/queue.php +++ b/example/config/queue.php @@ -55,6 +55,7 @@ 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 'queue' => env('SQS_QUEUE', 'your-queue-name'), + 'suffix' => env('SQS_SUFFIX'), 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], diff --git a/example/config/session.php b/example/config/session.php index 97caf9a..4e0f66c 100644 --- a/example/config/session.php +++ b/example/config/session.php @@ -18,7 +18,7 @@ | */ - 'driver' => env('SESSION_DRIVER', 'cookie'), + 'driver' => env('SESSION_DRIVER', 'file'), /* |-------------------------------------------------------------------------- @@ -92,10 +92,12 @@ | Session Cache Store |-------------------------------------------------------------------------- | - | When using the "apc", "memcached", or "dynamodb" session drivers you may + | While using one of the framework's cache driven session backends you may | list a cache store that should be used for these sessions. This value | must match with one of the application's configured cache "stores". | + | Affects: "apc", "dynamodb", "memcached", "redis" + | */ 'store' => env('SESSION_STORE', null), @@ -166,7 +168,7 @@ | */ - 'secure' => env('SESSION_SECURE_COOKIE', false), + 'secure' => env('SESSION_SECURE_COOKIE'), /* |-------------------------------------------------------------------------- @@ -188,12 +190,12 @@ | | This option determines how your cookies behave when cross-site requests | take place, and can be used to mitigate CSRF attacks. By default, we - | do not enable this as other CSRF protection services are in place. + | will set this value to "lax" since this is a secure default value. | - | Supported: "lax", "strict", "none" + | Supported: "lax", "strict", "none", null | */ - 'same_site' => null, + 'same_site' => 'lax', ]; diff --git a/example/database/factories/UserFactory.php b/example/database/factories/UserFactory.php index 084535f..741edea 100644 --- a/example/database/factories/UserFactory.php +++ b/example/database/factories/UserFactory.php @@ -1,6 +1,7 @@ bigIncrements('id'); + $table->id(); $table->string('name'); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); diff --git a/example/database/migrations/2014_10_12_100000_create_password_resets_table.php b/example/database/migrations/2014_10_12_100000_create_password_resets_table.php deleted file mode 100644 index 0ee0a36..0000000 --- a/example/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ /dev/null @@ -1,32 +0,0 @@ -string('email')->index(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('password_resets'); - } -} diff --git a/example/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/example/database/migrations/2019_08_19_000000_create_failed_jobs_table.php index 389bdf7..9bddee3 100644 --- a/example/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ b/example/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -14,7 +14,7 @@ class CreateFailedJobsTable extends Migration public function up() { Schema::create('failed_jobs', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id(); $table->text('connection'); $table->text('queue'); $table->longText('payload'); diff --git a/example/database/seeds/DatabaseSeeder.php b/example/database/seeds/DatabaseSeeder.php index 91cb6d1..237dfc5 100644 --- a/example/database/seeds/DatabaseSeeder.php +++ b/example/database/seeds/DatabaseSeeder.php @@ -11,6 +11,6 @@ class DatabaseSeeder extends Seeder */ public function run() { - // $this->call(UsersTableSeeder::class); + // $this->call(UserSeeder::class); } } diff --git a/example/package.json b/example/package.json index 9fcb8ee..2c35181 100644 --- a/example/package.json +++ b/example/package.json @@ -5,17 +5,17 @@ "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "npm run development -- --watch", "watch-poll": "npm run watch -- --watch-poll", - "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", + "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js", "prod": "npm run production", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.19", - "cross-env": "^5.1", - "laravel-mix": "^4.0.7", + "cross-env": "^7.0", + "laravel-mix": "^5.0.1", "lodash": "^4.17.13", - "resolve-url-loader": "^2.3.1", + "resolve-url-loader": "^3.1.0", "sass": "^1.15.2", - "sass-loader": "^7.1.0" + "sass-loader": "^8.0.0" } } diff --git a/example/phpunit.xml b/example/phpunit.xml index 7b127c3..964ff0c 100644 --- a/example/phpunit.xml +++ b/example/phpunit.xml @@ -1,20 +1,13 @@ +> ./tests/Unit - ./tests/Feature @@ -30,8 +23,9 @@ - + + diff --git a/example/public/.htaccess b/example/public/.htaccess index b75525b..3aec5e2 100644 --- a/example/public/.htaccess +++ b/example/public/.htaccess @@ -14,7 +14,7 @@ RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] - # Handle Front Controller... + # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] diff --git a/example/public/favicon.ico b/example/public/favicon.ico index dbb20ed8a0f77039ee5bfdce8fdcc2daf964f0d4..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 GIT binary patch literal 0 HcmV?d00001 literal 15086 zcmeI232;^A6@VWuEXpbhEx6X5UWM4(Sm4QhzLrl z$CD%CEvWopkoQ^?}for6-TeNw4ZadC3qJ(YSNU3aAAXKa;9&B0(-Y^ai&3hLv( zf%T%b|Mwpr^(!78Rlp}O4~kklMqBtJ?=Ivz1(riCM2UO@d6MOA5qDF4lGoPcHx3?! zHLwJ1|J7joKMU#~hXb|W)R?VNf57fhJ8~IHP77fbybI@`>jsB#Z2l8C?uwiS?|^oT zV7HRtb?sUskB#v`{N8X8d<9 zICvGlf&1V9^jl`e=e$w=mTQOoesC{X|1~&XznS%0`?zFyv=wnm;Sb-#!Fo z=nL-KmgaAM`X|n4cmRy+*qUTMh31caU$_mvhSy;-^*a|@U%LT&)U~7DDXm>19BaR2>wt3u+ZkIxGz}9wmU6@Cm7O!p88wl6KXJ8vD=i)29wic3yHq`5FU06%~ z35C?d)-|C93bGGAv3DL$hxfpH)Gy%&urN7Se;#>kAL^vJ^8ixJ`;Tnvenj4{AJ~DmfmxTF@&-OkRH<sfLcQx?14QsDH0uYOP0Bwb z{&;*jC*41+hPz>3uA{m2ehcjOhC9Hv{}k3krl0-t`N6KW^7r}6emo5>g1>{~;Tq^4 zt}|1jFNUk(U+@WBOr9qr^>aF02;MjJ68tnV@U*392_4|9Asj(-KNw||4Ph`*gN zkv%v+1KtM9Z-wDWS=Rc4zL6hvu^;U@Zj=0zTwL!DfsdGlo`$vXBpl53wAbE0 zjG>-U8?5U*X5lE!YH^EB}l#{Y(Y#qn}}W zFtW|_5Alf=o;8jQx`wi;{DUoij)K+L{^(oI-#NY-@~+hd=I?s$J?{VcC!I=LgtpE5 z97mf4oBzr7=lV*(wbXt3Zy@J0H2TeI{E$yiI2(K)?0)bm@L9+AP>r6U(QOv_Gv+#y z%i*vTT-P6i@1yU8bWim#sP`EXe;4bI`8q!Sk#HHZ$#+$h?*x~Cd#X>t`*uO=KiAkB+X`@B>vKxZcU;(owWX=` z$Gw632JgZ50N*s4f4AxqhyU>H`*OWC%R`A%;+xF1xy*Rn4gy<;pe z|9;ec5Y~ZX{!r?52=~>dB)0A0V0aF!@7x#!S^48{D|BPPIL@6)@ELnM9sJH%D zzY`?w(`@@EcJ5(Lfwy2a{1*1Y{}#FOR}Ukw`8C*%?ww9U7w?@oHh(?+*FoCoiL&l|pD9|-2J|GeWTGe7M5!q4H;gjx9Ln`y)OE|gsk&Xs?{mFW6q z+MqLkbWL5wp}M}59RZ4 z808&8fo-5zizJOO8uTlzUGmwnJ- z*Bkqb;3M$9-R%2&Y)ard@Y(cZ_$lOETSJ^eB)Pawc2pK(A8ZEf9)ClzFBZZoa4z_5 zx@WLaqH`UZ2Je7&i(pvEh?d36^x2xnH6!sx>@};CWZ{kUh~teZP{f4IHs-*nGM9v)@+kaDbeJsC>K0;P-y{nKN>g7|@x$eqT>VevG z>x$R`%&O}a%`Nk~E20m{Pw926pjB+ARkh`@teuYFJnE3hihAkqw2EOYq<^QyZ@D)1 zk9p(#p8&6bb7rEtjrCV(J@>K18U{CmYmBj9OO9PrcO#D$t;vPP#&>U+2`@th^oO6r zl~4?G!Lo~ClkYJhFRmx-v7g27-Qc&F_8XWt}A@6UN zjHNGZ#)7^tXd=Gz>dJiOi66&=7|7e#l(}wA2FHfu#otA^ zR&GrD&!S#DE|I;!HNkOUPC5G{qfZ?hju-c+_Teu=Swl%#zWz_gw+`1~UpucK1^4LA z>%8A&v3Fh3cO85PIqeghM&loSR{W4RddG!1*dI?p*6+eN?+8c2lW-3_06zcavoGlS zGvYfgW^;X=kSD?taE|!AyD!`h&%;!0;0lg?KhV%V{`N`P#>7vrSJdALeg{uu1Vl9Q<4ZbHjO%4dVxWV!x;r97IjL!qf9J{`TebWUTdp|V?ZHDRtnJ@khl(`Ro5uA(tL(Cx26~on_%_ZPk zV87T7uFu|IZiLKnGKh1>j%DVP&NuiCvVZ+=ZuY?D7BI#%=$`cVnThUJWS!oS?S=+6&X5`4yn%74|>3>WUUuMN!q_D5@!oqFTcGp2C4q4C(h2d7pwXO8#h{ zKHxg**jDxpWlc%!y1+!RZ^yxfiS%53mt6JH+b{crYk+p088e-bXTvt0gZ*Z?b2Yv8 z>W_2noC`Z8=Z?4C!S!Z1g!RC^t9B=6&PC2Iht5e|=gSG;noi3VF|=~r20nnu{W1|ML7z&fY>(JMwPy#2x zwJ 'Your password has been reset!', - 'sent' => 'We have e-mailed your password reset link!', + 'sent' => 'We have emailed your password reset link!', 'throttled' => 'Please wait before retrying.', 'token' => 'This password reset token is invalid.', - 'user' => "We can't find a user with that e-mail address.", + 'user' => "We can't find a user with that email address.", ]; diff --git a/example/resources/lang/en/validation.php b/example/resources/lang/en/validation.php index ce1d80d..a65914f 100644 --- a/example/resources/lang/en/validation.php +++ b/example/resources/lang/en/validation.php @@ -40,7 +40,7 @@ 'dimensions' => 'The :attribute has invalid image dimensions.', 'distinct' => 'The :attribute field has a duplicate value.', 'email' => 'The :attribute must be a valid email address.', - 'ends_with' => 'The :attribute must end with one of the following: :values', + 'ends_with' => 'The :attribute must end with one of the following: :values.', 'exists' => 'The selected :attribute is invalid.', 'file' => 'The :attribute must be a file.', 'filled' => 'The :attribute field must have a value.', @@ -110,7 +110,7 @@ 'string' => 'The :attribute must be :size characters.', 'array' => 'The :attribute must contain :size items.', ], - 'starts_with' => 'The :attribute must start with one of the following: :values', + 'starts_with' => 'The :attribute must start with one of the following: :values.', 'string' => 'The :attribute must be a string.', 'timezone' => 'The :attribute must be a valid zone.', 'unique' => 'The :attribute has already been taken.', diff --git a/example/routes/api.php b/example/routes/api.php index e61e5bc..bcb8b18 100644 --- a/example/routes/api.php +++ b/example/routes/api.php @@ -1,6 +1,7 @@ get('/user', function (Request $request) { -// return $request->user(); -// }); - -Route::get('/user', 'UserController@list'); -Route::get('/user/{id}', 'UserController@user'); -Route::get('/user/view/{id}', 'UserController@view'); +Route::middleware('auth:api')->get('/user', function (Request $request) { + return $request->user(); +}); diff --git a/example/routes/channels.php b/example/routes/channels.php index f16a20b..963b0d2 100644 --- a/example/routes/channels.php +++ b/example/routes/channels.php @@ -1,5 +1,7 @@ { + const code = await uploadCodeToCos(this, appId, credentials, inputs, curRegion) + const scf = new Scf(credentials, curRegion) + const tempInputs = { + ...inputs, + code + } + const scfOutput = await scf.deploy(tempInputs) + outputs[curRegion] = { + functionName: scfOutput.FunctionName, + runtime: scfOutput.Runtime, + namespace: scfOutput.Namespace + } + + this.state[curRegion] = { + ...(this.state[curRegion] ? this.state[curRegion] : {}), + ...outputs[curRegion] + } + } + uploadCodeHandler.push(funcDeployer()) + } + await Promise.all(uploadCodeHandler) + this.save() + return outputs + } + + async deployApigateway(credentials, inputs, regionList) { + if (inputs.isDisabled) { + return {} + } + const apigw = new MultiApigw(credentials, regionList) + const oldState = this.state[regionList[0]] || {} + inputs.oldState = { + apiList: oldState.apiList || [], + customDomains: oldState.customDomains || [] + } + const apigwOutputs = await apigw.deploy(inputs) + const outputs = {} + Object.keys(apigwOutputs).forEach((curRegion) => { + const curOutput = apigwOutputs[curRegion] + outputs[curRegion] = { + serviceId: curOutput.serviceId, + subDomain: curOutput.subDomain, + environment: curOutput.environment, + url: `${getDefaultProtocol(inputs.protocols)}://${curOutput.subDomain}/${ + curOutput.environment + }/` + } + if (curOutput.customDomains) { + outputs[curRegion].customDomains = curOutput.customDomains + } + this.state[curRegion] = { + created: curOutput.created, + ...(this.state[curRegion] ? this.state[curRegion] : {}), + ...outputs[curRegion], + apiList: curOutput.apiList + } + }) + this.save() + return outputs + } + + async deployCns(credentials, inputs, regionList, apigwOutputs) { + const cns = new Cns(credentials) + const cnsRegion = {} + regionList.forEach((curRegion) => { + const curApigwOutput = apigwOutputs[curRegion] + cnsRegion[curRegion] = curApigwOutput.subDomain + }) + + const state = [] + const outputs = {} + const tempJson = {} + for (let i = 0; i < inputs.length; i++) { + const curCns = inputs[i] + for (let j = 0; j < curCns.records.length; j++) { + curCns.records[j].value = + cnsRegion[curCns.records[j].value.replace('temp_value_about_', '')] + } + const tencentCnsOutputs = await cns.deploy(curCns) + outputs[curCns.domain] = tencentCnsOutputs.DNS + ? tencentCnsOutputs.DNS + : 'The domain name has already been added.' + tencentCnsOutputs.domain = curCns.domain + state.push(tencentCnsOutputs) + } + + // 删除serverless创建的但是不在本次列表中 + try { + for (let i = 0; i < state.length; i++) { + tempJson[state[i].domain] = state[i].records + } + const recordHistory = this.state.cns || [] + for (let i = 0; i < recordHistory.length; i++) { + const delList = deleteRecord(tempJson[recordHistory[i].domain], recordHistory[i].records) + if (delList && delList.length > 0) { + await cns.remove({ deleteList: delList }) + } + } + } catch (e) {} + + this.state['cns'] = state + this.save() + return outputs + } + + async deploy(inputs) { + console.log(`Deploying ${CONFIGS.compFullname} App...`) + + const credentials = this.getCredentials() + + // 对Inputs内容进行标准化 + const { regionList, functionConf, apigatewayConf, cnsConf } = await prepareInputs( + this, + credentials, + inputs + ) + + // 部署函数 + API网关 + const outputs = {} + if (!functionConf.code.src) { + outputs.templateUrl = CONFIGS.templateUrl + } + + const deployTasks = [this.deployFunction(credentials, functionConf, regionList, outputs)] + // support apigatewayConf.isDisabled + if (apigatewayConf.isDisabled !== true) { + deployTasks.push(this.deployApigateway(credentials, apigatewayConf, regionList, outputs)) + } else { + this.state.apigwDisabled = true + } + const [functionOutputs, apigwOutputs = {}] = await Promise.all(deployTasks) + + // optimize outputs for one region + if (regionList.length === 1) { + const [oneRegion] = regionList + outputs.region = oneRegion + outputs['apigw'] = apigwOutputs[oneRegion] + outputs['scf'] = functionOutputs[oneRegion] + } else { + outputs['apigw'] = apigwOutputs + outputs['scf'] = functionOutputs + } + + // cns depends on apigw, so if disabled apigw, just ignore it. + if (cnsConf.length > 0 && apigatewayConf.isDisabled !== true) { + outputs['cns'] = await this.deployCns(credentials, cnsConf, regionList, apigwOutputs) + } + + this.state.region = regionList[0] + this.state.regionList = regionList + this.state.lambdaArn = functionConf.name + + return outputs + } + + async remove() { + console.log(`Removing ${CONFIGS.compFullname} App...`) + + const { state } = this + const { regionList = [] } = state + + const credentials = this.getCredentials() + + const removeHandlers = [] + for (let i = 0; i < regionList.length; i++) { + const curRegion = regionList[i] + const curState = state[curRegion] + const scf = new Scf(credentials, curRegion) + const apigw = new Apigw(credentials, curRegion) + const handler = async () => { + await scf.remove({ + functionName: curState.functionName, + namespace: curState.namespace + }) + // if disable apigw, no need to remove + if (state.apigwDisabled !== true) { + await apigw.remove({ + created: curState.created, + environment: curState.environment, + serviceId: curState.serviceId, + apiList: curState.apiList, + customDomains: curState.customDomains + }) + } + } + removeHandlers.push(handler()) + } + + await Promise.all(removeHandlers) + + if (this.state.cns) { + const cns = new Cns(credentials) + for (let i = 0; i < this.state.cns.length; i++) { + await cns.remove({ deleteList: this.state.cns[i].records }) + } + } + + this.state = {} + } +} + +module.exports = ServerlessComponent diff --git a/src/utils.js b/src/utils.js new file mode 100644 index 0000000..a758c85 --- /dev/null +++ b/src/utils.js @@ -0,0 +1,366 @@ +const path = require('path') +const fs = require('fs') +const { Domain, Cos } = require('tencent-component-toolkit') +const ensureObject = require('type/object/ensure') +const ensureIterable = require('type/iterable/ensure') +const ensureString = require('type/string/ensure') +const download = require('download') +const { TypeError } = require('tencent-component-toolkit/src/utils/error') +const CONFIGS = require('./config') + +/* + * Pauses execution for the provided miliseconds + * + * @param ${number} wait - number of miliseconds to wait + */ +const sleep = async (wait) => new Promise((resolve) => setTimeout(() => resolve(), wait)) + +/* + * Generates a random id + */ +const generateId = () => + Math.random() + .toString(36) + .substring(6) + +const getDirFiles = async (dirPath) => { + const targetPath = path.resolve(dirPath) + const files = fs.readdirSync(targetPath) + const temp = {} + files.forEach((file) => { + temp[file] = path.join(targetPath, file) + }) + return temp +} + +const getCodeZipPath = async (instance, inputs) => { + console.log(`Packaging ${CONFIGS.compNameFullname} application...`) + + // unzip source zip file + let zipPath + if (!inputs.code.src) { + // add default template + const downloadPath = `/tmp/${generateId()}` + const filename = 'template' + + console.log(`Installing Default ${CONFIGS.compNameFullname} App...`) + try { + await download(CONFIGS.templateUrl, downloadPath, { + filename: `${filename}.zip` + }) + } catch (e) { + throw new TypeError(`DOWNLOAD_TEMPLATE`, 'Download default template failed.') + } + zipPath = `${downloadPath}/${filename}.zip` + } else { + zipPath = inputs.code.src + } + + return zipPath +} + +/** + * Upload code to COS + * @param {Component} instance serverless component instance + * @param {string} appId app id + * @param {object} credentials credentials + * @param {object} inputs component inputs parameters + * @param {string} region region + */ +const uploadCodeToCos = async (instance, appId, credentials, inputs, region) => { + const bucketName = inputs.code.bucket || `sls-cloudfunction-${region}-code` + const objectName = inputs.code.object || `${inputs.name}-${Math.floor(Date.now() / 1000)}.zip` + // if set bucket and object not pack code + if (!inputs.code.bucket || !inputs.code.object) { + const zipPath = await getCodeZipPath(instance, inputs) + console.log(`Code zip path ${zipPath}`) + + // save the zip path to state for lambda to use it + instance.state.zipPath = zipPath + + const cos = new Cos(credentials, region) + + if (!inputs.code.bucket) { + // create default bucket + await cos.deploy({ + bucket: bucketName + '-' + appId, + force: true, + lifecycle: [ + { + status: 'Enabled', + id: 'deleteObject', + filter: '', + expiration: { days: '10' }, + abortIncompleteMultipartUpload: { daysAfterInitiation: '10' } + } + ] + }) + } + + // upload code to cos + if (!inputs.code.object) { + console.log(`Getting cos upload url for bucket ${bucketName}`) + const uploadUrl = await cos.getObjectUrl({ + bucket: bucketName + '-' + appId, + object: objectName, + method: 'PUT' + }) + const shimFiles = await getDirFiles(path.join(__dirname, '_shims')) + + console.log(`Uploading code to bucket ${bucketName}`) + await instance.uploadSourceZipToCOS(zipPath, uploadUrl, shimFiles, {}) + console.log(`Upload ${objectName} to bucket ${bucketName} success`) + } + } + + // save bucket state + instance.state.bucket = bucketName + instance.state.object = objectName + + return { + bucket: bucketName, + object: objectName + } +} + +const mergeJson = (sourceJson, targetJson) => { + for (const eveKey in sourceJson) { + if (targetJson.hasOwnProperty(eveKey)) { + if (['protocols', 'endpoints', 'customDomain'].indexOf(eveKey) != -1) { + for (let i = 0; i < sourceJson[eveKey].length; i++) { + const sourceEvents = JSON.stringify(sourceJson[eveKey][i]) + const targetEvents = JSON.stringify(targetJson[eveKey]) + if (targetEvents.indexOf(sourceEvents) == -1) { + targetJson[eveKey].push(sourceJson[eveKey][i]) + } + } + } else { + if (typeof sourceJson[eveKey] != 'string') { + mergeJson(sourceJson[eveKey], targetJson[eveKey]) + } else { + targetJson[eveKey] = sourceJson[eveKey] + } + } + } else { + targetJson[eveKey] = sourceJson[eveKey] + } + } + return targetJson +} + +const capitalString = (str) => { + if (str.length < 2) { + return str.toUpperCase() + } + + return `${str[0].toUpperCase()}${str.slice(1)}` +} + +const getDefaultProtocol = (protocols) => { + if (protocols.map((i) => i.toLowerCase()).includes('https')) { + return 'https' + } + return 'http' +} + +const deleteRecord = (newRecords, historyRcords) => { + const deleteList = [] + for (let i = 0; i < historyRcords.length; i++) { + let temp = false + for (let j = 0; j < newRecords.length; j++) { + if ( + newRecords[j].domain == historyRcords[i].domain && + newRecords[j].subDomain == historyRcords[i].subDomain && + newRecords[j].recordType == historyRcords[i].recordType && + newRecords[j].value == historyRcords[i].value && + newRecords[j].recordLine == historyRcords[i].recordLine + ) { + temp = true + break + } + } + if (!temp) { + deleteList.push(historyRcords[i]) + } + } + return deleteList +} + +const prepareInputs = async (instance, credentials, inputs = {}) => { + // 对function inputs进行标准化 + const tempFunctionConf = inputs.functionConf ? inputs.functionConf : {} + const fromClientRemark = `tencent-${CONFIGS.compName}` + const regionList = inputs.region + ? typeof inputs.region == 'string' + ? [inputs.region] + : inputs.region + : ['ap-guangzhou'] + + // chenck state function name + const stateFunctionName = + instance.state[regionList[0]] && instance.state[regionList[0]].functionName + // check state service id + const stateServiceId = instance.state[regionList[0]] && instance.state[regionList[0]].serviceId + + const functionConf = { + code: { + src: inputs.src, + bucket: inputs.srcOriginal && inputs.srcOriginal.bucket, + object: inputs.srcOriginal && inputs.srcOriginal.object + }, + name: + ensureString(inputs.functionName, { isOptional: true }) || + stateFunctionName || + `${CONFIGS.compName}_component_${generateId()}`, + region: regionList, + role: ensureString(tempFunctionConf.role ? tempFunctionConf.role : inputs.role, { + default: '' + }), + handler: ensureString(tempFunctionConf.handler ? tempFunctionConf.handler : inputs.handler, { + default: CONFIGS.handler + }), + runtime: ensureString(tempFunctionConf.runtime ? tempFunctionConf.runtime : inputs.runtime, { + default: CONFIGS.runtime + }), + namespace: ensureString( + tempFunctionConf.namespace ? tempFunctionConf.namespace : inputs.namespace, + { default: CONFIGS.namespace } + ), + description: ensureString( + tempFunctionConf.description ? tempFunctionConf.description : inputs.description, + { + default: CONFIGS.description + } + ), + fromClientRemark, + layers: ensureIterable(tempFunctionConf.layers ? tempFunctionConf.layers : inputs.layers, { + default: [] + }) + } + functionConf.tags = ensureObject(tempFunctionConf.tags ? tempFunctionConf.tags : inputs.tag, { + default: null + }) + + functionConf.include = ensureIterable( + tempFunctionConf.include ? tempFunctionConf.include : inputs.include, + { default: [], ensureItem: ensureString } + ) + functionConf.exclude = ensureIterable( + tempFunctionConf.exclude ? tempFunctionConf.exclude : inputs.exclude, + { default: [], ensureItem: ensureString } + ) + functionConf.exclude.push('.git/**', '.gitignore', '.serverless', '.DS_Store') + if (inputs.functionConf) { + functionConf.timeout = inputs.functionConf.timeout + ? inputs.functionConf.timeout + : CONFIGS.timeout + functionConf.memorySize = inputs.functionConf.memorySize + ? inputs.functionConf.memorySize + : CONFIGS.memorySize + if (inputs.functionConf.environment) { + functionConf.environment = inputs.functionConf.environment + } + if (inputs.functionConf.vpcConfig) { + functionConf.vpcConfig = inputs.functionConf.vpcConfig + } + } + + // 对apigw inputs进行标准化 + const apigatewayConf = inputs.apigatewayConf ? inputs.apigatewayConf : {} + apigatewayConf.fromClientRemark = fromClientRemark + apigatewayConf.serviceName = inputs.serviceName + apigatewayConf.description = `Serverless Framework Tencent-${capitalString( + CONFIGS.compName + )} Component` + apigatewayConf.serviceId = inputs.serviceId || stateServiceId + apigatewayConf.region = functionConf.region + apigatewayConf.protocols = apigatewayConf.protocols || ['http'] + apigatewayConf.environment = apigatewayConf.environment ? apigatewayConf.environment : 'release' + apigatewayConf.endpoints = [ + { + path: '/', + enableCORS: apigatewayConf.enableCORS, + serviceTimeout: apigatewayConf.serviceTimeout, + method: 'ANY', + function: { + isIntegratedResponse: apigatewayConf.isIntegratedResponse === false ? false : true, + functionName: functionConf.name, + functionNamespace: functionConf.namespace + } + } + ] + + // 对cns inputs进行标准化 + const tempCnsConf = {} + const tempCnsBaseConf = inputs.cloudDNSConf ? inputs.cloudDNSConf : {} + + // 分地域处理functionConf/apigatewayConf/cnsConf + for (let i = 0; i < functionConf.region.length; i++) { + const curRegion = functionConf.region[i] + const curRegionConf = inputs[curRegion] + if (curRegionConf && curRegionConf.functionConf) { + functionConf[curRegion] = curRegionConf.functionConf + } + if (curRegionConf && curRegionConf.apigatewayConf) { + apigatewayConf[curRegion] = curRegionConf.apigatewayConf + } + + const tempRegionCnsConf = mergeJson( + tempCnsBaseConf, + curRegionConf && curRegionConf.cloudDNSConf ? curRegionConf.cloudDNSConf : {} + ) + + tempCnsConf[functionConf.region[i]] = { + recordType: 'CNAME', + recordLine: tempRegionCnsConf.recordLine ? tempRegionCnsConf.recordLine : undefined, + ttl: tempRegionCnsConf.ttl, + mx: tempRegionCnsConf.mx, + status: tempRegionCnsConf.status ? tempRegionCnsConf.status : 'enable' + } + } + + const cnsConf = [] + // 对cns inputs进行检查和赋值 + if (apigatewayConf.customDomain && apigatewayConf.customDomain.length > 0) { + const domain = new Domain(credentials) + for (let domianNum = 0; domianNum < apigatewayConf.customDomain.length; domianNum++) { + const domainData = await domain.check(apigatewayConf.customDomain[domianNum].domain) + const tempInputs = { + domain: domainData.domain, + records: [] + } + for (let eveRecordNum = 0; eveRecordNum < functionConf.region.length; eveRecordNum++) { + if (tempCnsConf[functionConf.region[eveRecordNum]].recordLine) { + tempInputs.records.push({ + subDomain: domainData.subDomain || '@', + recordType: 'CNAME', + recordLine: tempCnsConf[functionConf.region[eveRecordNum]].recordLine, + value: `temp_value_about_${functionConf.region[eveRecordNum]}`, + ttl: tempCnsConf[functionConf.region[eveRecordNum]].ttl, + mx: tempCnsConf[functionConf.region[eveRecordNum]].mx, + status: tempCnsConf[functionConf.region[eveRecordNum]].status || 'enable' + }) + } + } + cnsConf.push(tempInputs) + } + } + + return { + regionList, + functionConf, + apigatewayConf, + cnsConf + } +} + +module.exports = { + generateId, + sleep, + uploadCodeToCos, + mergeJson, + capitalString, + getDefaultProtocol, + deleteRecord, + prepareInputs +} From b89c67403600430b224edec82852ff6b7e09c688 Mon Sep 17 00:00:00 2001 From: Avril Li Date: Thu, 18 Jun 2020 20:49:14 +0800 Subject: [PATCH 02/54] docs: doc format --- docs/configure.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index 3c83138..6e2f8c4 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -73,30 +73,30 @@ inputs: 主要的参数 -| 参数名称 | 是否必选 | 默认值 | 描述 | -| ------------------------------------ | :------: | :-------------: | :------------------------------------------------------------------ | -| runtime | 否 | Python3.6 | 执行环境, 目前支持: Python3.x | -| region | 否 | ap-guangzhou | 项目部署所在区域,默认广州区 | -| functionName | 否 | | 云函数名称 | -| serviceName | 否 | | API 网关服务名称, 默认创建一个新的服务名称 | -| serviceId | 否 | | API 网关服务 ID,如果存在将使用这个 API 网关服务 | -| src | 否 | `process.cwd()` | 默认为当前目录, 如果是对象, 配置参数参考 [执行目录](#执行目录) | -| layers | 否 | | 云函数绑定的 layer, 配置参数参考 [层配置](#层配置) | -| exclude | 否 | | 不包含的文件 | -| include | 否 | | 包含的文件, 如果是相对路径,是相对于 `serverless.yml`的路径 | -| [functionConf](#函数配置) | 否 | | 函数配置 | -| [apigatewayConf](#API-网关配置) | 否 | | API 网关配置 | -| [cloudDNSConf](#DNS-配置) | 否 | | DNS 配置 | -| [Region special config](#指定区配置) | 否 | | 指定区配置 | +| 参数名称 | 是否必选 | 默认值 | 描述 | +| ------------------------------------ | :------: | :-------------: | :------------------------------------------------------------- | +| runtime | 否 | Python3.6 | 执行环境, 目前支持: Python3.x | +| region | 否 | ap-guangzhou | 项目部署所在区域,默认广州区 | +| functionName | 否 | | 云函数名称 | +| serviceName | 否 | | API 网关服务名称, 默认创建一个新的服务名称 | +| serviceId | 否 | | API 网关服务 ID,如果存在将使用这个 API 网关服务 | +| src | 否 | `process.cwd()` | 默认为当前目录, 如果是对象, 配置参数参考 [执行目录](#执行目录) | +| layers | 否 | | 云函数绑定的 layer, 配置参数参考 [层配置](#层配置) | +| exclude | 否 | | 不包含的文件 | +| include | 否 | | 包含的文件, 如果是相对路径,是相对于 `serverless.yml`的路径 | +| [functionConf](#函数配置) | 否 | | 函数配置 | +| [apigatewayConf](#API-网关配置) | 否 | | API 网关配置 | +| [cloudDNSConf](#DNS-配置) | 否 | | DNS 配置 | +| [Region special config](#指定区配置) | 否 | | 指定区配置 | ## 执行目录 -| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | -|---------|------|-----------------|-----|------------------------------------------------------------------------------------------------------------------------------| -| src | 否 | String | | 代码路径。与 object 不能同时存在。 | -| exclude | 否 | Array of String | | 不包含的文件或路径, 遵守 [glob 语法](https://github.com/isaacs/node-glob) | -| bucket | 否 | String | | bucket 名称。如果配置了 src,表示部署 src 的代码并压缩成 zip 后上传到 bucket-appid 对应的存储桶中;如果配置了 object,表示获取 bucket-appid 对应存储桶中 object 对应的代码进行部署。 | -| object | 否 | String | | 部署的代码在存储桶中的路径。 | | +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| -------- | -------- | --------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| src | 否 | String | | 代码路径。与 object 不能同时存在。 | +| exclude | 否 | Array of String | | 不包含的文件或路径, 遵守 [glob 语法](https://github.com/isaacs/node-glob) | +| bucket | 否 | String | | bucket 名称。如果配置了 src,表示部署 src 的代码并压缩成 zip 后上传到 bucket-appid 对应的存储桶中;如果配置了 object,表示获取 bucket-appid 对应存储桶中 object 对应的代码进行部署。 | +| object | 否 | String | | 部署的代码在存储桶中的路径。 | | ## 层配置 From 242dc080162f93c27aa8f94adc67db307269ecb2 Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 19 Jun 2020 10:35:42 +0800 Subject: [PATCH 03/54] fix: support fonts type binary --- src/_shims/sl_handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_shims/sl_handler.php b/src/_shims/sl_handler.php index 6e26da1..3b74977 100644 --- a/src/_shims/sl_handler.php +++ b/src/_shims/sl_handler.php @@ -5,7 +5,7 @@ define('LARAVEL_START', microtime(true)); define('TEXT_REG', '#\.html.*|\.js.*|\.css.*|\.html.*#'); -define('BINARY_REG', '#\.gif.*|\.jpg.*|\.png.*|\.jepg.*|\.swf.*|\.bmp.*|\.ico.*#'); +define('BINARY_REG', '#\.ttf.*|\.woff.*|\.woff2.*|\.gif.*|\.jpg.*|\.png.*|\.jepg.*|\.swf.*|\.bmp.*|\.ico.*#'); // auto make dir /tmp/storage/framework/views system("mkdir -p /tmp/storage/framework/views"); From fdaa75c3cde6ffbe8da3687f4416a098fc3cf604 Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 19 Jun 2020 10:47:51 +0800 Subject: [PATCH 04/54] docs: update readme, configure --- README.en.md | 13 ++++--------- README.md | 9 +++------ docs/configure.md | 2 +- example/.env.example | 19 +++++++++++++++++++ example/serverless.yml | 4 ++-- example/tests/CreatesApplication.php | 22 ---------------------- example/tests/Feature/ExampleTest.php | 21 --------------------- example/tests/TestCase.php | 10 ---------- example/tests/Unit/ExampleTest.php | 18 ------------------ src/config.js | 3 ++- 10 files changed, 31 insertions(+), 90 deletions(-) delete mode 100644 example/tests/CreatesApplication.php delete mode 100644 example/tests/Feature/ExampleTest.php delete mode 100644 example/tests/TestCase.php delete mode 100644 example/tests/Unit/ExampleTest.php diff --git a/README.en.md b/README.en.md index c39360e..86cd9cd 100755 --- a/README.en.md +++ b/README.en.md @@ -2,10 +2,7 @@ # Tencent Laravel Serverless Component -[![npm](https://img.shields.io/npm/v/%40serverless%2Ftencent-laravel)](http://www.npmtrends.com/%40serverless%2Ftencent-laravel) -[![NPM downloads](http://img.shields.io/npm/dm/%40serverless%2Ftencent-laravel.svg?style=flat-square)](http://www.npmtrends.com/%40serverless%2Ftencent-laravel) - -[简体中文](https://github.com/serverless-components/tencent-thinkphp/blob/master/README.md) | English +[简体中文](./README.md) | English ## Introduction @@ -13,7 +10,7 @@ ## Content -1. [Prepare](#0-prepare) +0. [Prepare](#0-prepare) 1. [Install](#1-install) 1. [Create](#2-create) 1. [Configure](#3-configure) @@ -59,8 +56,6 @@ LOG_CHANNEL=stderr APP_STORAGE=/tmp ``` -> Notice: For Laravel@7.x, after initiating project, `APP_KEY` may not be generated in `.env`, just run `php artisan key:generate` to generate it. - ### 1. Install Install the Serverless Framework globally: @@ -93,7 +88,7 @@ TENCENT_SECRET_KEY=XXX ```yml # serverless.yml -component: laravel +component: laravel name: laravelDemo org: orgDemo app: appDemo @@ -110,7 +105,7 @@ inputs: environment: release ``` -- [More Options](https://github.com/serverless-components/tencent-laravel/tree/master/docs/configure.md) +- [More Options](./docs/configure.md) ### 4. Deploy diff --git a/README.md b/README.md index 8ed6567..3c8efd1 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,7 @@ # 腾讯云 Laravel Serverless Component -[![npm](https://img.shields.io/npm/v/%40serverless%2Ftencent-laravel)](http://www.npmtrends.com/%40serverless%2Ftencent-laravel) -[![NPM downloads](http://img.shields.io/npm/dm/%40serverless%2Ftencent-laravel.svg?style=flat-square)](http://www.npmtrends.com/%40serverless%2Ftencent-laravel) - -简体中文 | [English](https://github.com/serverless-components/tencent-thinkphp/blob/master/README.en.md) +简体中文 | [English](./README.en.md) ## 简介 @@ -77,7 +74,7 @@ $ touch serverless.yml ```yml # serverless.yml -component: laravel +component: laravel name: laravelDemo org: orgDemo app: appDemo @@ -94,7 +91,7 @@ inputs: environment: release ``` -- [更多配置](https://github.com/serverless-components/tencent-laravel/tree/master/docs/configure.md) +- [更多配置](./docs/configure.md) ### 3. 部署 diff --git a/docs/configure.md b/docs/configure.md index 6e2f8c4..27ef9bc 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -5,7 +5,7 @@ ```yml # serverless.yml -component: laravel # (必选) 组件名称,在该实例中为flask +component: laravel # (必选) 组件名称,在该实例中为laravel name: laravelDemo # (必选) 组件实例名称. org: orgDemo # (可选) 用于记录组织信息,默认值为您的腾讯云账户 appid,必须为字符串 app: appDemo # (可选) 用于记录组织信息. 默认与name相同,必须为字符串 diff --git a/example/.env.example b/example/.env.example index ac74863..eefba19 100644 --- a/example/.env.example +++ b/example/.env.example @@ -44,3 +44,22 @@ PUSHER_APP_CLUSTER=mt1 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" + + +# views compiled path +VIEW_COMPILED_PATH=/tmp/storage/framework/views + +# We cannot store sessions to disk: if you don't need sessions (e.g. API) +# then use `array`, else store sessions in database or cookies +SESSION_DRIVER=array + +# Logging to stderr allows the logs to end up in Cloudwatch +LOG_CHANNEL=stderr + +# app storage dir must be /tmp +APP_STORAGE=/tmp + + +# tencent crendential +TENCENT_SECRET_ID=xxx +TENCENT_SECRET_KEY=xxx diff --git a/example/serverless.yml b/example/serverless.yml index b7d7ac9..009c76e 100644 --- a/example/serverless.yml +++ b/example/serverless.yml @@ -1,4 +1,4 @@ -component: laravel@dev # (required) name of the component. In that case, it's flask. +component: laravel@dev # (required) name of the component. In that case, it's laravel. name: laravelDemo # (required) name of your flash component instance. org: orgDemo # (optional) serverless dashboard org. default is the first org you created during signup. app: appDemo # (optional) serverless dashboard app. default is the same as the name property. @@ -12,4 +12,4 @@ inputs: protocols: - http - https - environment: release \ No newline at end of file + environment: release diff --git a/example/tests/CreatesApplication.php b/example/tests/CreatesApplication.php deleted file mode 100644 index 547152f..0000000 --- a/example/tests/CreatesApplication.php +++ /dev/null @@ -1,22 +0,0 @@ -make(Kernel::class)->bootstrap(); - - return $app; - } -} diff --git a/example/tests/Feature/ExampleTest.php b/example/tests/Feature/ExampleTest.php deleted file mode 100644 index cdb5111..0000000 --- a/example/tests/Feature/ExampleTest.php +++ /dev/null @@ -1,21 +0,0 @@ -get('/'); - - $response->assertStatus(200); - } -} diff --git a/example/tests/TestCase.php b/example/tests/TestCase.php deleted file mode 100644 index 2932d4a..0000000 --- a/example/tests/TestCase.php +++ /dev/null @@ -1,10 +0,0 @@ -assertTrue(true); - } -} diff --git a/src/config.js b/src/config.js index d08588b..ab48f81 100644 --- a/src/config.js +++ b/src/config.js @@ -1,5 +1,6 @@ const CONFIGS = { - templateUrl: 'https://serverless-templates-1300862921.cos.ap-beijing.myqcloud.com/flask-demo.zip', + templateUrl: + 'https://serverless-templates-1300862921.cos.ap-beijing.myqcloud.com/laravel-demo.zip', compName: 'laravel', compFullname: 'Laravel', handler: 'sl_handler.handler', From 838d27d181c95396e6b7508e1a21ad4b1f518d3e Mon Sep 17 00:00:00 2001 From: Avril Li Date: Fri, 19 Jun 2020 11:16:28 +0800 Subject: [PATCH 05/54] docs: update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3c8efd1..e539368 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ composer create-project --prefer-dist laravel/laravel serverless-laravel $app->useStoragePath(env('APP_STORAGE', '/tmp')); ``` -然后在跟目录下的 `.env` 文件中新增如下配置: +然后在根目录下的 `.env` 文件中新增如下配置: ```dotenv # 视图文件编译路径 @@ -53,7 +53,7 @@ LOG_CHANNEL=stderr APP_STORAGE=/tmp ``` -> 注意:对于 laravel@7.x 项目初始化不会自动生成 `APP_KEY` 在 `.env` 中,执行下 `php artisan key:generate` 就行。 +> 注意:对于 laravel@7.x 项目初始化不会自动生成 `APP_KEY` 在 `.env` 中,执行 `php artisan key:generate` 即可 ### 1. 安装 @@ -133,4 +133,4 @@ TENCENT_SECRET_KEY=123 ### 更多组件 -可以在 [Serverless Components](https://github.com/serverless/components) repo 中查询更多组件的信息。 +可以在 [Serverless Components](https://github.com/serverless/components/blob/master/README.cn.md) repo 中查询更多组件的信息。 From 28e14951f8fd675efec3abeb1b25b42b41f38390 Mon Sep 17 00:00:00 2001 From: Avril Li Date: Fri, 19 Jun 2020 11:22:08 +0800 Subject: [PATCH 06/54] docs: update readme --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index e539368..a7fc418 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,6 @@ LOG_CHANNEL=stderr APP_STORAGE=/tmp ``` -> 注意:对于 laravel@7.x 项目初始化不会自动生成 `APP_KEY` 在 `.env` 中,执行 `php artisan key:generate` 即可 - ### 1. 安装 通过 npm 全局安装 [serverless cli](https://github.com/serverless/serverless) From a41c2b591400e814e2b1826b2d100f92d8f75e04 Mon Sep 17 00:00:00 2001 From: Avril Li Date: Fri, 19 Jun 2020 19:39:26 +0800 Subject: [PATCH 07/54] feat: support usage plan & auth --- src/utils.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/utils.js b/src/utils.js index a758c85..d32b376 100644 --- a/src/utils.js +++ b/src/utils.js @@ -289,6 +289,20 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { } } ] + if (apigatewayConf.usagePlan) { + apigatewayConf.endpoints[0].usagePlan = { + usagePlanId: apigatewayConf.usagePlan.usagePlanId, + usagePlanName: apigatewayConf.usagePlan.usagePlanName, + usagePlanDesc: apigatewayConf.usagePlan.usagePlanDesc, + maxRequestNum: apigatewayConf.usagePlan.maxRequestNum + } + } + if (apigatewayConf.auth) { + apigatewayConf.endpoints[0].auth = { + secretName: apigatewayConf.auth.secretName, + secretIds: apigatewayConf.auth.secretIds + } + } // 对cns inputs进行标准化 const tempCnsConf = {} From 3e06493fbf9c99f9e293f2f851884cd0a5315577 Mon Sep 17 00:00:00 2001 From: Avril Li Date: Mon, 22 Jun 2020 10:18:26 +0800 Subject: [PATCH 08/54] fix: prettier config --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e8fb317..46fa2de 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "commitlint": "commitlint -f HEAD@{15}", "lint": "eslint --ext .js,.ts,.tsx .", "lint:fix": "eslint --fix --ext .js,.ts,.tsx .", - "prettier": "prettier --check **/*.{css,html,js,json,md,yaml,yml}", - "prettier:fix": "prettier --write **/*.{css,html,js,json,md,yaml,yml}", + "prettier": "prettier --check '**/*.{css,html,js,json,md,yaml,yml}'", + "prettier:fix": "prettier --write '**/*.{css,html,js,json,md,yaml,yml}'", "release": "semantic-release", "release-local": "node -r dotenv/config node_modules/semantic-release/bin/semantic-release --no-ci --dry-run", "check-dependencies": "npx npm-check --skip-unused --update" From f53d9c7362957634202a9314e1f32115878ddc2b Mon Sep 17 00:00:00 2001 From: yugasun Date: Mon, 22 Jun 2020 11:52:24 +0800 Subject: [PATCH 09/54] chore: release v0.0.1 --- example/serverless.yml | 2 +- serverless.component.yml | 2 +- src/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/serverless.yml b/example/serverless.yml index 009c76e..b933088 100644 --- a/example/serverless.yml +++ b/example/serverless.yml @@ -1,4 +1,4 @@ -component: laravel@dev # (required) name of the component. In that case, it's laravel. +component: laravel # (required) name of the component. In that case, it's laravel. name: laravelDemo # (required) name of your flash component instance. org: orgDemo # (optional) serverless dashboard org. default is the first org you created during signup. app: appDemo # (optional) serverless dashboard app. default is the same as the name property. diff --git a/serverless.component.yml b/serverless.component.yml index ea82ec0..6f37ae4 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: dev +version: 0.0.1 author: Tencent Cloud, Inc org: Tencent Cloud, Inc description: Deploys a serverless Laravel application onto Tencent SCF and Tencent APIGateway. diff --git a/src/package.json b/src/package.json index 3f2c8c3..3c49d83 100644 --- a/src/package.json +++ b/src/package.json @@ -12,7 +12,7 @@ "license": "MIT", "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^1.11.2", + "tencent-component-toolkit": "^1.11.4", "type": "^2.0.0" } } From 6cd73f0e78dd6ab5e95d721cc0dbc82d2d01fdc8 Mon Sep 17 00:00:00 2001 From: Avril Li Date: Mon, 22 Jun 2020 15:57:45 +0800 Subject: [PATCH 10/54] fix: update get credential error message --- src/serverless.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serverless.js b/src/serverless.js index 9fe8670..52f114b 100644 --- a/src/serverless.js +++ b/src/serverless.js @@ -11,7 +11,7 @@ class ServerlessComponent extends Component { if (!tmpSecrets || !tmpSecrets.TmpSecretId) { throw new TypeError( 'CREDENTIAL', - 'Cannot get secretId/Key, your account could be sub-account or does not have access, please check if SLS_QcsRole role exists in your account, and visit https://console.cloud.tencent.com/cam to bind this role to your account.' + 'Cannot get secretId/Key, your account could be sub-account and does not have the access to use SLS_QcsRole, please make sure the role exists first, then visit https://cloud.tencent.com/document/product/1154/43006, follow the instructions to bind the role to your account.' ) } From b46e50e47b2068d4bb5d5dbca40c946e69c1b4f9 Mon Sep 17 00:00:00 2001 From: Avril Li Date: Fri, 3 Jul 2020 11:44:45 +0800 Subject: [PATCH 11/54] Add integration test (#10) * chore(test): add integration test and update isDisabled config * chore: update jest version to support node8.x * chore: remove process.env variables of test * chore: update test case * chore: update test case * chore: update test case --- package.json | 6 ++++- src/utils.js | 1 + tests/integration.test.js | 57 +++++++++++++++++++++++++++++++++++++++ tests/utils.js | 24 +++++++++++++++++ 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 tests/integration.test.js create mode 100644 tests/utils.js diff --git a/package.json b/package.json index 46fa2de..9d638ca 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "access": "public" }, "scripts": { - "test": "npm run lint && npm run prettier", + "int-test": "jest ./tests/integration.test.js --testEnvironment node", + "test": "npm run lint && npm run prettier && npm run int-test", "commitlint": "commitlint -f HEAD@{15}", "lint": "eslint --ext .js,.ts,.tsx .", "lint:fix": "eslint --fix --ext .js,.ts,.tsx .", @@ -45,6 +46,8 @@ "@semantic-release/git": "^9.0.0", "@semantic-release/npm": "^7.0.4", "@semantic-release/release-notes-generator": "^9.0.1", + "@serverless/platform-client-china": "^1.0.19", + "axios": "^0.19.2", "babel-eslint": "^10.1.0", "dotenv": "^8.2.0", "eslint": "^6.8.0", @@ -52,6 +55,7 @@ "eslint-plugin-import": "^2.20.1", "eslint-plugin-prettier": "^3.1.2", "husky": "^4.2.3", + "jest": "^25.0.1", "lint-staged": "^10.0.8", "prettier": "^1.19.1", "semantic-release": "^17.0.4" diff --git a/src/utils.js b/src/utils.js index d32b376..0bf0264 100644 --- a/src/utils.js +++ b/src/utils.js @@ -267,6 +267,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { // 对apigw inputs进行标准化 const apigatewayConf = inputs.apigatewayConf ? inputs.apigatewayConf : {} + apigatewayConf.isDisabled = apigatewayConf.isDisabled === true apigatewayConf.fromClientRemark = fromClientRemark apigatewayConf.serviceName = inputs.serviceName apigatewayConf.description = `Serverless Framework Tencent-${capitalString( diff --git a/tests/integration.test.js b/tests/integration.test.js new file mode 100644 index 0000000..0a68e85 --- /dev/null +++ b/tests/integration.test.js @@ -0,0 +1,57 @@ +const { generateId, getServerlessSdk } = require('./utils') +const execSync = require('child_process').execSync +const path = require('path') +const axios = require('axios') + +// set enough timeout for deployment to finish +jest.setTimeout(600000) + +// the yaml file we're testing against +const instanceYaml = { + org: 'orgDemo', + app: 'appDemo', + component: 'laravel@dev', + name: `laravel-integration-tests-${generateId()}`, + stage: 'dev', + inputs: { + runtime: 'Php7', + region: 'ap-guangzhou', + apigatewayConf: { environment: 'test' } + } +} + +// get credentials from process.env but need to init empty credentials object +const credentials = { + tencent: {} +} + +// get serverless construct sdk +const sdk = getServerlessSdk(instanceYaml.org) + +it('should successfully deploy laravel app', async () => { + const instance = await sdk.deploy(instanceYaml, { tencent: {} }) + + expect(instance).toBeDefined() + expect(instance.instanceName).toEqual(instanceYaml.name) + expect(instance.outputs).toBeDefined() + // get src from template by default + expect(instance.outputs.templateUrl).toBeDefined() + expect(instance.outputs.region).toEqual(instanceYaml.inputs.region) + expect(instance.outputs.apigw).toBeDefined() + expect(instance.outputs.apigw.environment).toEqual(instanceYaml.inputs.apigatewayConf.environment) + + const response = await axios.get(instance.outputs.apigw.url) + expect(response.data.includes('Laravel')).toBeTruthy() +}) + +it('should successfully remove laravel app', async () => { + await sdk.remove(instanceYaml, credentials) + result = await sdk.getInstance( + instanceYaml.org, + instanceYaml.stage, + instanceYaml.app, + instanceYaml.name + ) + + expect(result.instance.instanceStatus).toEqual('inactive') +}) diff --git a/tests/utils.js b/tests/utils.js new file mode 100644 index 0000000..d047afa --- /dev/null +++ b/tests/utils.js @@ -0,0 +1,24 @@ +const { ServerlessSDK } = require('@serverless/platform-client-china') + +/* + * Generate random id + */ +const generateId = () => + Math.random() + .toString(36) + .substring(6) + +/* + * Initializes and returns an instance of the serverless sdk + * @param ${string} orgName - the serverless org name. + */ +const getServerlessSdk = (orgName) => { + const sdk = new ServerlessSDK({ + context: { + orgName + } + }) + return sdk +} + +module.exports = { generateId, getServerlessSdk } From 947b2f7f16b82fc9aca3b5e822a6b00041f77586 Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 7 Jul 2020 14:44:39 +0800 Subject: [PATCH 12/54] feat: support scf publish version and traffic setup --- docs/configure.md | 65 ++++++++++++++++++++-------------------- example/serverless.yml | 2 +- package.json | 4 +-- serverless.component.yml | 6 ++-- src/config.js | 4 +-- src/package.json | 13 +------- src/serverless.js | 19 ++++++++++++ src/utils.js | 65 +++++++++++++++++++++++++++------------- 8 files changed, 104 insertions(+), 74 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index 27ef9bc..ea17b95 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -1,24 +1,23 @@ -# Configure document +# 配置文档 -## Complete configuration +## 全部配置 ```yml # serverless.yml -component: laravel # (必选) 组件名称,在该实例中为laravel -name: laravelDemo # (必选) 组件实例名称. +component: nuxtjs # (必选) 组件名称,在该实例中为nuxtjs +name: nuxtjsDemo # 必选) 组件实例名称. org: orgDemo # (可选) 用于记录组织信息,默认值为您的腾讯云账户 appid,必须为字符串 app: appDemo # (可选) 用于记录组织信息. 默认与name相同,必须为字符串 stage: dev # (可选) 用于区分环境信息,默认值是 dev inputs: region: ap-guangzhou # 云函数所在区域 - functionName: laravel-function # 云函数名称 + functionName: nuxtjsDemo # 云函数名称 serviceName: mytest # api网关服务名称 + runtime: Nodejs10.15 # 运行环境 serviceId: service-np1uloxw # api网关服务ID - runtime: Php7 # 运行环境 - src: ./ - # src: ./src # 第一种为string时,会打包src对应目录下的代码上传到默认cos上。 + src: ./src # 第一种为string时,会打包src对应目录下的代码上传到默认cos上。 # src: # 第二种,部署src下的文件代码,并打包成zip上传到bucket上 # src: ./src # 本地需要打包的文件目录 # bucket: bucket01 # bucket name,当前会默认在bucket name后增加 appid 后缀, 本例中为 bucket01-appid @@ -31,6 +30,7 @@ inputs: layers: - name: layerName # layer名称 version: 1 # 版本 + traffic: 0.9 # 配置默认流量中 $LATEST 版本比重:0 - 1 functionConf: # 函数配置相关 timeout: 10 # 超时时间,单位秒 memorySize: 128 # 内存大小,单位MB @@ -38,19 +38,19 @@ inputs: variables: # 环境变量数组 TEST: vale vpcConfig: # 私有网络配置 - subnetId: '' # 私有网络的Id - vpcId: '' # 子网ID + vpcId: '' # 私有网络的Id + subnetId: '' # 子网ID apigatewayConf: # api网关配置 isDisabled: false # 是否禁用自动创建 API 网关功能 enableCORS: true # 允许跨域 customDomains: # 自定义域名绑定 - domain: abc.com # 待绑定的自定义的域名 certificateId: abcdefg # 待绑定自定义域名的证书唯一 ID - # 自定义路径映射的路径。使用自定义映射时,可一次仅映射一个 path 到一个环境,也可映射多个 path 到多个环境。并且一旦使用自定义映射,原本的默认映射规则不再生效,只有自定义映射路径生效 + # 自定义路径映射的路径。使用自定义映射时,可一次仅映射一个 path 到一个环境,也可映射多个 path 到多个环境。并且一旦使用自定义映射,原本的默认映射规则不再生效,只有自定义映射路径生效。 pathMappingSet: - path: / environment: release - protocols: # 绑定自定义域名的协议类型,默认与服务的前端协议一致 + protocols: # 绑定自定义域名的协议类型,默认与服务的前端协议一致。 - http # 支持http协议 - https # 支持https协议 protocols: @@ -73,30 +73,29 @@ inputs: 主要的参数 -| 参数名称 | 是否必选 | 默认值 | 描述 | -| ------------------------------------ | :------: | :-------------: | :------------------------------------------------------------- | -| runtime | 否 | Python3.6 | 执行环境, 目前支持: Python3.x | -| region | 否 | ap-guangzhou | 项目部署所在区域,默认广州区 | -| functionName | 否 | | 云函数名称 | -| serviceName | 否 | | API 网关服务名称, 默认创建一个新的服务名称 | -| serviceId | 否 | | API 网关服务 ID,如果存在将使用这个 API 网关服务 | -| src | 否 | `process.cwd()` | 默认为当前目录, 如果是对象, 配置参数参考 [执行目录](#执行目录) | -| layers | 否 | | 云函数绑定的 layer, 配置参数参考 [层配置](#层配置) | -| exclude | 否 | | 不包含的文件 | -| include | 否 | | 包含的文件, 如果是相对路径,是相对于 `serverless.yml`的路径 | -| [functionConf](#函数配置) | 否 | | 函数配置 | -| [apigatewayConf](#API-网关配置) | 否 | | API 网关配置 | -| [cloudDNSConf](#DNS-配置) | 否 | | DNS 配置 | -| [Region special config](#指定区配置) | 否 | | 指定区配置 | +| 参数名称 | 是否必选 | 默认值 | 描述 | +| ------------------------------------ | :------: | :-------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| runtime | 否 | Php7 | 执行环境, 目前支持: Php7,Php5 | +| region | 否 | ap-guangzhou | 项目部署所在区域,默认广州区 | +| functionName | 否 | | 云函数名称 | +| serviceName | 否 | | API 网关服务名称, 默认创建一个新的服务名称 | +| serviceId | 否 | | API 网关服务 ID,如果存在将使用这个 API 网关服务 | +| src | 否 | `process.cwd()` | 默认为当前目录, 如果是对象, 配置参数参考 [执行目录](#执行目录) | +| layers | 否 | | 云函数绑定的 layer, 配置参数参考 [层配置](#层配置) | +| traffic | 否 | 1 | 配置默认流量中 `$LATEST` 版本比重,取值范围:0 ~ 1,比如 80%,可配置成 0.8。注意如果配置灰度流量,需要配置对应的 API 网关触发器的 endpoints 的 `function.functionQualifier` 参数为 `$DEFAULT` (默认流量) | +| [functionConf](#函数配置) | 否 | | 函数配置 | +| [apigatewayConf](#API-网关配置) | 否 | | API 网关配置 | +| [cloudDNSConf](#DNS-配置) | 否 | | DNS 配置 | +| [Region special config](#指定区配置) | 否 | | 指定区配置 | ## 执行目录 -| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | -| -------- | -------- | --------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| src | 否 | String | | 代码路径。与 object 不能同时存在。 | -| exclude | 否 | Array of String | | 不包含的文件或路径, 遵守 [glob 语法](https://github.com/isaacs/node-glob) | -| bucket | 否 | String | | bucket 名称。如果配置了 src,表示部署 src 的代码并压缩成 zip 后上传到 bucket-appid 对应的存储桶中;如果配置了 object,表示获取 bucket-appid 对应存储桶中 object 对应的代码进行部署。 | -| object | 否 | String | | 部署的代码在存储桶中的路径。 | | +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| -------- | :------: | :-------------: | :----: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| src | 否 | String | | 代码路径。与 object 不能同时存在。 | +| exclude | 否 | Array of String | | 不包含的文件或路径, 遵守 [glob 语法](https://github.com/isaacs/node-glob) | +| bucket | 否 | String | | bucket 名称。如果配置了 src,表示部署 src 的代码并压缩成 zip 后上传到 bucket-appid 对应的存储桶中;如果配置了 object,表示获取 bucket-appid 对应存储桶中 object 对应的代码进行部署。 | +| object | 否 | String | | 部署的代码在存储桶中的路径。 | ## 层配置 diff --git a/example/serverless.yml b/example/serverless.yml index b933088..009c76e 100644 --- a/example/serverless.yml +++ b/example/serverless.yml @@ -1,4 +1,4 @@ -component: laravel # (required) name of the component. In that case, it's laravel. +component: laravel@dev # (required) name of the component. In that case, it's laravel. name: laravelDemo # (required) name of your flash component instance. org: orgDemo # (optional) serverless dashboard org. default is the first org you created during signup. app: appDemo # (optional) serverless dashboard app. default is the same as the name property. diff --git a/package.json b/package.json index 9d638ca..018fa45 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "@serverless/tencent-laravel", + "name": "@serverless/laravel", "description": "Tencent Cloud Laravel Serverless Component", - "version": "1.0.4", + "version": "0.0.1", "main": "src/serverless.js", "publishConfig": { "access": "public" diff --git a/serverless.component.yml b/serverless.component.yml index 6f37ae4..5f5e6a9 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,10 +1,10 @@ name: laravel -version: 0.0.1 +version: dev author: Tencent Cloud, Inc org: Tencent Cloud, Inc -description: Deploys a serverless Laravel application onto Tencent SCF and Tencent APIGateway. +description: Deploy a serverless Laravel application onto Tencent SCF and APIGateway. keywords: tencent, serverless, laravel repo: https://github.com/serverless-components/tencent-laravel -readme: https://github.com/serverless-components/tencent-laravel/tree/v2/README.md +readme: https://github.com/serverless-components/tencent-laravel/tree/master/README.md license: MIT main: ./src diff --git a/src/config.js b/src/config.js index ab48f81..0a18f3d 100644 --- a/src/config.js +++ b/src/config.js @@ -4,12 +4,12 @@ const CONFIGS = { compName: 'laravel', compFullname: 'Laravel', handler: 'sl_handler.handler', - runtime: 'PHP 7.2', + runtime: 'Php7', exclude: ['.git/**', '.gitignore', '.DS_Store'], timeout: 3, memorySize: 128, namespace: 'default', - description: 'Function created by serverless component' + description: 'Created by Serverless Component' } module.exports = CONFIGS diff --git a/src/package.json b/src/package.json index 3c49d83..157a43e 100644 --- a/src/package.json +++ b/src/package.json @@ -1,18 +1,7 @@ { - "name": "@serverless/laravel", - "main": "./serverless.js", - "publishConfig": { - "access": "public" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "lint": "eslint . --fix --cache" - }, - "author": "Tencent Cloud, Inc.", - "license": "MIT", "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^1.11.4", + "tencent-component-toolkit": "^1.12.9", "type": "^2.0.0" } } diff --git a/src/serverless.js b/src/serverless.js index 52f114b..581f99a 100644 --- a/src/serverless.js +++ b/src/serverless.js @@ -51,6 +51,25 @@ class ServerlessComponent extends Component { ...(this.state[curRegion] ? this.state[curRegion] : {}), ...outputs[curRegion] } + // default version is $LATEST + outputs[curRegion].lastVersion = scfOutput.LastVersion + ? scfOutput.LastVersion + : this.state.lastVersion || '$LATEST' + + // default traffic is 1.0, it can also be 0, so we should compare to undefined + outputs[curRegion].traffic = scfOutput.Traffic + ? scfOutput.Traffic + : this.state.traffic !== undefined + ? this.state.traffic + : 1 + + if (outputs[curRegion].traffic !== 1 && scfOutput.ConfigTrafficVersion) { + outputs[curRegion].configTrafficVersion = scfOutput.ConfigTrafficVersion + this.state.configTrafficVersion = scfOutput.ConfigTrafficVersion + } + + this.state.lastVersion = outputs[curRegion].lastVersion + this.state.traffic = outputs[curRegion].traffic } uploadCodeHandler.push(funcDeployer()) } diff --git a/src/utils.js b/src/utils.js index 0bf0264..ff8212e 100644 --- a/src/utils.js +++ b/src/utils.js @@ -8,13 +8,6 @@ const download = require('download') const { TypeError } = require('tencent-component-toolkit/src/utils/error') const CONFIGS = require('./config') -/* - * Pauses execution for the provided miliseconds - * - * @param ${number} wait - number of miliseconds to wait - */ -const sleep = async (wait) => new Promise((resolve) => setTimeout(() => resolve(), wait)) - /* * Generates a random id */ @@ -23,18 +16,28 @@ const generateId = () => .toString(36) .substring(6) -const getDirFiles = async (dirPath) => { - const targetPath = path.resolve(dirPath) - const files = fs.readdirSync(targetPath) - const temp = {} - files.forEach((file) => { - temp[file] = path.join(targetPath, file) - }) - return temp +const getType = (obj) => { + return Object.prototype.toString.call(obj).slice(8, -1) +} + +const validateTraffic = (num) => { + if (getType(num) !== 'Number') { + throw new TypeError( + `PARAMETER_${CONFIGS.compName.toUpperCase()}_TRAFFIC`, + 'traffic must be a number' + ) + } + if (num < 0 || num > 1) { + throw new TypeError( + `PARAMETER_${CONFIGS.compName.toUpperCase()}_TRAFFIC`, + 'traffic must be a number between 0 and 1' + ) + } + return true } const getCodeZipPath = async (instance, inputs) => { - console.log(`Packaging ${CONFIGS.compNameFullname} application...`) + console.log(`Packaging ${CONFIGS.compFullname} application...`) // unzip source zip file let zipPath @@ -43,7 +46,7 @@ const getCodeZipPath = async (instance, inputs) => { const downloadPath = `/tmp/${generateId()}` const filename = 'template' - console.log(`Installing Default ${CONFIGS.compNameFullname} App...`) + console.log(`Installing Default ${CONFIGS.compFullname} App...`) try { await download(CONFIGS.templateUrl, downloadPath, { filename: `${filename}.zip` @@ -59,6 +62,16 @@ const getCodeZipPath = async (instance, inputs) => { return zipPath } +const getDirFiles = async (dirPath) => { + const targetPath = path.resolve(dirPath) + const files = fs.readdirSync(targetPath) + const temp = {} + files.forEach((file) => { + temp[file] = path.join(targetPath, file) + }) + return temp +} + /** * Upload code to COS * @param {Component} instance serverless component instance @@ -235,8 +248,18 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { fromClientRemark, layers: ensureIterable(tempFunctionConf.layers ? tempFunctionConf.layers : inputs.layers, { default: [] - }) + }), + publish: inputs.publish, + traffic: inputs.traffic, + lastVersion: instance.state.lastVersion } + + // validate traffic + if (inputs.traffic !== undefined) { + validateTraffic(inputs.traffic) + } + functionConf.needSetTraffic = inputs.traffic !== undefined && functionConf.lastVersion + functionConf.tags = ensureObject(tempFunctionConf.tags ? tempFunctionConf.tags : inputs.tag, { default: null }) @@ -267,7 +290,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { // 对apigw inputs进行标准化 const apigatewayConf = inputs.apigatewayConf ? inputs.apigatewayConf : {} - apigatewayConf.isDisabled = apigatewayConf.isDisabled === true + apigatewayConf.isDisabled = inputs.apigatewayConf === true apigatewayConf.fromClientRemark = fromClientRemark apigatewayConf.serviceName = inputs.serviceName apigatewayConf.description = `Serverless Framework Tencent-${capitalString( @@ -286,7 +309,8 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { function: { isIntegratedResponse: apigatewayConf.isIntegratedResponse === false ? false : true, functionName: functionConf.name, - functionNamespace: functionConf.namespace + functionNamespace: functionConf.namespace, + functionQualifier: functionConf.needSetTraffic ? '$DEFAULT' : '$LATEST' } } ] @@ -371,7 +395,6 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { module.exports = { generateId, - sleep, uploadCodeToCos, mergeJson, capitalString, From d29bafe1c7458777dbd9ddcc1a343dfb50c482cd Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 7 Jul 2020 14:59:10 +0800 Subject: [PATCH 13/54] chore: release v0.0.2 --- example/serverless.yml | 10 +++++----- package.json | 2 +- serverless.component.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/example/serverless.yml b/example/serverless.yml index 009c76e..e291274 100644 --- a/example/serverless.yml +++ b/example/serverless.yml @@ -1,8 +1,8 @@ -component: laravel@dev # (required) name of the component. In that case, it's laravel. -name: laravelDemo # (required) name of your flash component instance. -org: orgDemo # (optional) serverless dashboard org. default is the first org you created during signup. -app: appDemo # (optional) serverless dashboard app. default is the same as the name property. -stage: dev # (optional) serverless dashboard stage. default is dev. +component: laravel +name: laravelDemo +org: orgDemo +app: appDemo +stage: dev inputs: src: ./ # (optional) path to the source folder. default is a hello world app. diff --git a/package.json b/package.json index 018fa45..20cf52e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/laravel", "description": "Tencent Cloud Laravel Serverless Component", - "version": "0.0.1", + "version": "0.0.2", "main": "src/serverless.js", "publishConfig": { "access": "public" diff --git a/serverless.component.yml b/serverless.component.yml index 5f5e6a9..e343603 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: dev +version: 0.0.2 author: Tencent Cloud, Inc org: Tencent Cloud, Inc description: Deploy a serverless Laravel application onto Tencent SCF and APIGateway. From c9166b7733e769175aed9103c2aeeab923ba3e85 Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 9 Jul 2020 20:59:21 +0800 Subject: [PATCH 14/54] fix: upgrade deps --- .travis.yml | 18 +++++++++--------- src/package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9f070c..f1ee195 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,12 +11,12 @@ install: jobs: include: # Define the release stage that runs semantic-release - - stage: release - node_js: 10.18 - # Advanced: optionally overwrite your default `script` step to skip the tests - # script: skip - deploy: - provider: script - skip_cleanup: true - script: - - npm run release + # - stage: release + # node_js: 10.18 + # # Advanced: optionally overwrite your default `script` step to skip the tests + # # script: skip + # deploy: + # provider: script + # skip_cleanup: true + # script: + # - npm run release diff --git a/src/package.json b/src/package.json index 157a43e..1c0cd56 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^1.12.9", + "tencent-component-toolkit": "^1.12.10", "type": "^2.0.0" } } From e9c3c02a67c20328bb81a1dca20fb218783676b9 Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 16 Jul 2020 19:56:25 +0800 Subject: [PATCH 15/54] chore: set webDeployable true --- serverless.component.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/serverless.component.yml b/serverless.component.yml index e343603..a5597d7 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -8,3 +8,4 @@ repo: https://github.com/serverless-components/tencent-laravel readme: https://github.com/serverless-components/tencent-laravel/tree/master/README.md license: MIT main: ./src +webDeployable: true From 7bc2f9e076d2ab02cf0bddc8180666844cf3ecf3 Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 21 Jul 2020 19:44:55 +0800 Subject: [PATCH 16/54] fix: upgrade deps --- serverless.component.yml | 2 +- src/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/serverless.component.yml b/serverless.component.yml index a5597d7..5a1bba3 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -2,7 +2,7 @@ name: laravel version: 0.0.2 author: Tencent Cloud, Inc org: Tencent Cloud, Inc -description: Deploy a serverless Laravel application onto Tencent SCF and APIGateway. +description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. keywords: tencent, serverless, laravel repo: https://github.com/serverless-components/tencent-laravel readme: https://github.com/serverless-components/tencent-laravel/tree/master/README.md diff --git a/src/package.json b/src/package.json index 1c0cd56..b0203fe 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^1.12.10", + "tencent-component-toolkit": "^1.12.15", "type": "^2.0.0" } } From 5e4a2486e5061b77bd8308c83fe156afda7d29db Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 21 Jul 2020 19:49:03 +0800 Subject: [PATCH 17/54] chore: release v0.0.3 --- package.json | 2 +- serverless.component.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 20cf52e..2e9525a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/laravel", "description": "Tencent Cloud Laravel Serverless Component", - "version": "0.0.2", + "version": "0.0.3", "main": "src/serverless.js", "publishConfig": { "access": "public" diff --git a/serverless.component.yml b/serverless.component.yml index 5a1bba3..d13d7b9 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: 0.0.2 +version: 0.0.3 author: Tencent Cloud, Inc org: Tencent Cloud, Inc description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. From 1e66cc84bb4838c54501a3c37031e78d78c5af94 Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 21 Jul 2020 19:49:33 +0800 Subject: [PATCH 18/54] docs: update configure doc --- docs/configure.md | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index ea17b95..29e5387 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -30,7 +30,6 @@ inputs: layers: - name: layerName # layer名称 version: 1 # 版本 - traffic: 0.9 # 配置默认流量中 $LATEST 版本比重:0 - 1 functionConf: # 函数配置相关 timeout: 10 # 超时时间,单位秒 memorySize: 128 # 内存大小,单位MB @@ -73,20 +72,19 @@ inputs: 主要的参数 -| 参数名称 | 是否必选 | 默认值 | 描述 | -| ------------------------------------ | :------: | :-------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| runtime | 否 | Php7 | 执行环境, 目前支持: Php7,Php5 | -| region | 否 | ap-guangzhou | 项目部署所在区域,默认广州区 | -| functionName | 否 | | 云函数名称 | -| serviceName | 否 | | API 网关服务名称, 默认创建一个新的服务名称 | -| serviceId | 否 | | API 网关服务 ID,如果存在将使用这个 API 网关服务 | -| src | 否 | `process.cwd()` | 默认为当前目录, 如果是对象, 配置参数参考 [执行目录](#执行目录) | -| layers | 否 | | 云函数绑定的 layer, 配置参数参考 [层配置](#层配置) | -| traffic | 否 | 1 | 配置默认流量中 `$LATEST` 版本比重,取值范围:0 ~ 1,比如 80%,可配置成 0.8。注意如果配置灰度流量,需要配置对应的 API 网关触发器的 endpoints 的 `function.functionQualifier` 参数为 `$DEFAULT` (默认流量) | -| [functionConf](#函数配置) | 否 | | 函数配置 | -| [apigatewayConf](#API-网关配置) | 否 | | API 网关配置 | -| [cloudDNSConf](#DNS-配置) | 否 | | DNS 配置 | -| [Region special config](#指定区配置) | 否 | | 指定区配置 | +| 参数名称 | 是否必选 | 默认值 | 描述 | +| ------------------------------------ | :------: | :-------------: | :------------------------------------------------------------- | +| runtime | 否 | Php7 | 执行环境, 目前支持: Php7,Php5 | +| region | 否 | ap-guangzhou | 项目部署所在区域,默认广州区 | +| functionName | 否 | | 云函数名称 | +| serviceName | 否 | | API 网关服务名称, 默认创建一个新的服务名称 | +| serviceId | 否 | | API 网关服务 ID,如果存在将使用这个 API 网关服务 | +| src | 否 | `process.cwd()` | 默认为当前目录, 如果是对象, 配置参数参考 [执行目录](#执行目录) | +| layers | 否 | | 云函数绑定的 layer, 配置参数参考 [层配置](#层配置) | +| [functionConf](#函数配置) | 否 | | 函数配置 | +| [apigatewayConf](#API-网关配置) | 否 | | API 网关配置 | +| [cloudDNSConf](#DNS-配置) | 否 | | DNS 配置 | +| [Region special config](#指定区配置) | 否 | | 指定区配置 | ## 执行目录 From c27183d7ec1b420c5a16dcd03185bb72c0413f7c Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 21 Jul 2020 22:27:25 +0800 Subject: [PATCH 19/54] fix: apigw isDisabled --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index ff8212e..07b398c 100644 --- a/src/utils.js +++ b/src/utils.js @@ -290,7 +290,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { // 对apigw inputs进行标准化 const apigatewayConf = inputs.apigatewayConf ? inputs.apigatewayConf : {} - apigatewayConf.isDisabled = inputs.apigatewayConf === true + apigatewayConf.isDisabled = apigatewayConf.isDisabled === true apigatewayConf.fromClientRemark = fromClientRemark apigatewayConf.serviceName = inputs.serviceName apigatewayConf.description = `Serverless Framework Tencent-${capitalString( From 541cfdb0f18a450cb664df31598f2b5a913bc8a9 Mon Sep 17 00:00:00 2001 From: yugasun Date: Wed, 22 Jul 2020 16:16:27 +0800 Subject: [PATCH 20/54] docs: update configure isDefaultMapping --- docs/configure.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index 29e5387..b673b42 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -45,6 +45,8 @@ inputs: customDomains: # 自定义域名绑定 - domain: abc.com # 待绑定的自定义的域名 certificateId: abcdefg # 待绑定自定义域名的证书唯一 ID + # 如要设置自定义路径映射,请设置为 false + isDefaultMapping: false # 自定义路径映射的路径。使用自定义映射时,可一次仅映射一个 path 到一个环境,也可映射多个 path 到多个环境。并且一旦使用自定义映射,原本的默认映射规则不再生效,只有自定义映射路径生效。 pathMappingSet: - path: / @@ -180,13 +182,13 @@ inputs: Refer to: https://cloud.tencent.com/document/product/628/14906 -| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | -| ---------------- | :------: | :------: | :------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| domain | 是 | String | | 待绑定的自定义的域名。 | -| certificateId | 否 | String | | 待绑定自定义域名的证书唯一 ID,如果设置了 type 为 https,则为必选 | -| isDefaultMapping | 否 | String | `'TRUE'` | 是否使用默认路径映射,默认为 TRUE。为 FALSE 时,表示自定义路径映射,此时 pathMappingSet 必填。 | -| pathMappingSet | 否 | Object[] | `[]` | 自定义路径映射的路径。使用自定义映射时,可一次仅映射一个 path 到一个环境,也可映射多个 path 到多个环境。并且一旦使用自定义映射,原本的默认映射规则不再生效,只有自定义映射路径生效。 | -| protocol | 否 | String[] | | 绑定自定义域名的协议类型,默认与服务的前端协议一致。 | +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| ---------------- | :------: | :------: | :----: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| domain | 是 | String | | 待绑定的自定义的域名。 | +| certificateId | 否 | String | | 待绑定自定义域名的证书唯一 ID,如果设置了 type 为 https,则为必选 | +| isDefaultMapping | 否 | String | `true` | 是否使用默认路径映射,默认为 true。为 false 时,表示自定义路径映射,此时 pathMappingSet 必填。 | +| pathMappingSet | 否 | Object[] | `[]` | 自定义路径映射的路径。使用自定义映射时,可一次仅映射一个 path 到一个环境,也可映射多个 path 到多个环境。并且一旦使用自定义映射,原本的默认映射规则不再生效,只有自定义映射路径生效。 | +| protocol | 否 | String[] | | 绑定自定义域名的协议类型,默认与服务的前端协议一致。 | - 自定义路径映射 From 4880ca396d8dc4673504e189c900f971c83a357a Mon Sep 17 00:00:00 2001 From: yugasun Date: Mon, 27 Jul 2020 16:53:07 +0800 Subject: [PATCH 21/54] fix: upgrade deps --- src/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package.json b/src/package.json index b0203fe..9e5637b 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^1.12.15", + "tencent-component-toolkit": "^1.13.0", "type": "^2.0.0" } } From 8f2e3c55ad93bc7652f2763f3d3371c6166df887 Mon Sep 17 00:00:00 2001 From: yugasun Date: Mon, 27 Jul 2020 16:54:43 +0800 Subject: [PATCH 22/54] chore: release v0.0.4 --- package.json | 2 +- serverless.component.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2e9525a..62cd616 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/laravel", "description": "Tencent Cloud Laravel Serverless Component", - "version": "0.0.3", + "version": "0.0.4", "main": "src/serverless.js", "publishConfig": { "access": "public" diff --git a/serverless.component.yml b/serverless.component.yml index d13d7b9..286ffcf 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: 0.0.3 +version: 0.0.4 author: Tencent Cloud, Inc org: Tencent Cloud, Inc description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. From 92f9d58e02f231bb7a0506ce27003ab56ad90901 Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 6 Aug 2020 10:22:28 +0800 Subject: [PATCH 23/54] docs: fix typo --- docs/configure.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index b673b42..4d04bb5 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -5,17 +5,17 @@ ```yml # serverless.yml -component: nuxtjs # (必选) 组件名称,在该实例中为nuxtjs -name: nuxtjsDemo # 必选) 组件实例名称. +component: laravel # (必选) 组件名称,在该实例中为laravel +name: laravelDemo # 必选) 组件实例名称. org: orgDemo # (可选) 用于记录组织信息,默认值为您的腾讯云账户 appid,必须为字符串 app: appDemo # (可选) 用于记录组织信息. 默认与name相同,必须为字符串 stage: dev # (可选) 用于区分环境信息,默认值是 dev inputs: region: ap-guangzhou # 云函数所在区域 - functionName: nuxtjsDemo # 云函数名称 + functionName: laravelDemo # 云函数名称 serviceName: mytest # api网关服务名称 - runtime: Nodejs10.15 # 运行环境 + runtime: Php7 # 运行环境 serviceId: service-np1uloxw # api网关服务ID src: ./src # 第一种为string时,会打包src对应目录下的代码上传到默认cos上。 # src: # 第二种,部署src下的文件代码,并打包成zip上传到bucket上 From 0a18bc0e12e2422806c9eab3edfc2ffa064ae4c1 Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 6 Aug 2020 20:21:33 +0800 Subject: [PATCH 24/54] fix: support eip config --- docs/configure.md | 25 +++++++++++++------------ src/package.json | 2 +- src/utils.js | 13 +++---------- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index 4d04bb5..e178849 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -32,6 +32,7 @@ inputs: version: 1 # 版本 functionConf: # 函数配置相关 timeout: 10 # 超时时间,单位秒 + eip: false # 是否固定出口IP memorySize: 128 # 内存大小,单位MB environment: # 环境变量 variables: # 环境变量数组 @@ -125,12 +126,12 @@ inputs: 参考: https://cloud.tencent.com/document/product/583/18586 -| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | -| ----------- | :------: | :----: | :----: | :------------------------------------------------------------------------------ | -| timeout | 否 | Number | 3 | 函数最长执行时间,单位为秒,可选值范围 1-900 秒,默认为 3 秒 | -| memorySize | 否 | Number | 128 | 函数运行时内存大小,默认为 128M,可选范围 64、128MB-3072MB,并且以 128MB 为阶梯 | -| environment | 否 | Object | | 函数的环境变量, 参考 [环境变量](#环境变量) | -| vpcConfig | 否 | Object | | 函数的 VPC 配置, 参考 [VPC 配置](#VPC-配置) | +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| ----------- | :------: | :-----: | :-----: | :----------------------------------------------------------- | +| timeout | 否 | Number | 3 | 函数最长执行时间,单位为秒,可选值范围 1-900 秒,默认为 3 秒 | +| environment | 否 | Object | | 函数的环境变量, 参考 [环境变量](#环境变量) | +| vpcConfig | 否 | Object | | 函数的 VPC 配置, 参考 [VPC 配置](#VPC-配置) | +| eip | 否 | Boolean | `false` | 是否固定出口 IP | ##### 环境变量 @@ -162,12 +163,12 @@ inputs: 参考: https://cloud.tencent.com/document/product/628/14947 -| 参数名称 | 是否必选 | 类型 | 描述 | -| ------------- | :------: | ------ | :------------------------------------------------------ | -| usagePlanId | 否 | String | 用户自定义使用计划 ID | -| usagePlanName | 否 | String | 用户自定义的使用计划名称 | -| usagePlanDesc | 否 | String | 用户自定义的使用计划描述 | -| maxRequestNum | 否 | Int | 请求配额总数,如果为空,将使用-1 作为默认值,表示不开启 | +| 参数名称 | 是否必选 | 类型 | 描述 | +| ------------- | :------: | ------ | :--------------------------------------------------------- | +| usagePlanId | 否 | String | 用户自定义使用计划 ID | +| usagePlanName | 否 | String | 用户自定义的使用计划名称 | +| usagePlanDesc | 否 | String | 用户自定义的使用计划描述 | +| maxRequestNum | 否 | Number | 请求配额总数,如果为空,将使用 `-1` 作为默认值,表示不开启 | ##### API 密钥配置 diff --git a/src/package.json b/src/package.json index 9e5637b..9a9d323 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^1.13.0", + "tencent-component-toolkit": "^1.13.2", "type": "^2.0.0" } } diff --git a/src/utils.js b/src/utils.js index 07b398c..03b6847 100644 --- a/src/utils.js +++ b/src/utils.js @@ -251,7 +251,9 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { }), publish: inputs.publish, traffic: inputs.traffic, - lastVersion: instance.state.lastVersion + lastVersion: instance.state.lastVersion, + eip: tempFunctionConf.eip === true, + l5Enable: tempFunctionConf.l5Enable === true } // validate traffic @@ -264,15 +266,6 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { default: null }) - functionConf.include = ensureIterable( - tempFunctionConf.include ? tempFunctionConf.include : inputs.include, - { default: [], ensureItem: ensureString } - ) - functionConf.exclude = ensureIterable( - tempFunctionConf.exclude ? tempFunctionConf.exclude : inputs.exclude, - { default: [], ensureItem: ensureString } - ) - functionConf.exclude.push('.git/**', '.gitignore', '.serverless', '.DS_Store') if (inputs.functionConf) { functionConf.timeout = inputs.functionConf.timeout ? inputs.functionConf.timeout From 29c30bdccd7a004afb87f282d1e44fbf6c6493a4 Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 7 Aug 2020 10:16:05 +0800 Subject: [PATCH 25/54] chore: release v0.0.5 --- package.json | 2 +- serverless.component.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 62cd616..75839d8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverless/laravel", "description": "Tencent Cloud Laravel Serverless Component", - "version": "0.0.4", + "version": "0.0.5", "main": "src/serverless.js", "publishConfig": { "access": "public" diff --git a/serverless.component.yml b/serverless.component.yml index 286ffcf..9930245 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: 0.0.4 +version: 0.0.5 author: Tencent Cloud, Inc org: Tencent Cloud, Inc description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. From 63e53eb393dab71f9b38fdd627910f947a865ca5 Mon Sep 17 00:00:00 2001 From: yugasun Date: Wed, 19 Aug 2020 16:36:48 +0800 Subject: [PATCH 26/54] fix: traffic zero display bug --- src/serverless.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/serverless.js b/src/serverless.js index 581f99a..03016ca 100644 --- a/src/serverless.js +++ b/src/serverless.js @@ -57,11 +57,12 @@ class ServerlessComponent extends Component { : this.state.lastVersion || '$LATEST' // default traffic is 1.0, it can also be 0, so we should compare to undefined - outputs[curRegion].traffic = scfOutput.Traffic - ? scfOutput.Traffic - : this.state.traffic !== undefined - ? this.state.traffic - : 1 + outputs[curRegion].traffic = + scfOutput.Traffic !== undefined + ? scfOutput.Traffic + : this.state.traffic !== undefined + ? this.state.traffic + : 1 if (outputs[curRegion].traffic !== 1 && scfOutput.ConfigTrafficVersion) { outputs[curRegion].configTrafficVersion = scfOutput.ConfigTrafficVersion From f498c561a99904d7a384e7c80cbfaa0e2c8ed237 Mon Sep 17 00:00:00 2001 From: Avril Li Date: Wed, 26 Aug 2020 20:15:50 +0800 Subject: [PATCH 27/54] chore: enable semantic release --- .travis.yml | 21 ++++++++++---------- package.json | 1 - release.config.js | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 11 deletions(-) create mode 100644 release.config.js diff --git a/.travis.yml b/.travis.yml index f1ee195..d78fad9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: node_js node_js: - - 8 - 10 install: @@ -11,12 +10,14 @@ install: jobs: include: # Define the release stage that runs semantic-release - # - stage: release - # node_js: 10.18 - # # Advanced: optionally overwrite your default `script` step to skip the tests - # # script: skip - # deploy: - # provider: script - # skip_cleanup: true - # script: - # - npm run release + - stage: release + node_js: 10.18 + # Advanced: optionally overwrite your default `script` step to skip the tests + # script: skip + deploy: + provider: script + skip_cleanup: true + on: + branch: master + script: + - npm run release diff --git a/package.json b/package.json index 75839d8..59473f9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,6 @@ { "name": "@serverless/laravel", "description": "Tencent Cloud Laravel Serverless Component", - "version": "0.0.5", "main": "src/serverless.js", "publishConfig": { "access": "public" diff --git a/release.config.js b/release.config.js new file mode 100644 index 0000000..a13798c --- /dev/null +++ b/release.config.js @@ -0,0 +1,50 @@ +module.exports = { + verifyConditions: [ + '@semantic-release/changelog', + '@semantic-release/git', + '@semantic-release/github' + ], + plugins: [ + [ + '@semantic-release/commit-analyzer', + { + preset: 'angular', + parserOpts: { + noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'] + }, + releaseRules: [{ type: 'feat', release: 'patch' }] + } + ], + [ + '@semantic-release/release-notes-generator', + { + preset: 'angular', + parserOpts: { + noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'] + }, + writerOpts: { + commitsSort: ['subject', 'scope'] + } + } + ], + [ + '@semantic-release/changelog', + { + changelogFile: 'CHANGELOG.md' + } + ], + [ + '@semantic-release/git', + { + assets: ['package.json', 'src/**', 'CHANGELOG.md'], + message: 'chore(release): version ${nextRelease.version} \n\n${nextRelease.notes}' + } + ], + [ + '@semantic-release/github', + { + assets: ['!.env'] + } + ] + ] +} From 9c26cc67bd7db53fac3953d816ade2f53148919f Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 26 Aug 2020 12:34:18 +0000 Subject: [PATCH 28/54] chore(release): version 0.0.5 ## [0.0.5](https://github.com/serverless-components/tencent-laravel/compare/v0.0.4...v0.0.5) (2020-08-26) ### Bug Fixes * apigw isDisabled ([c27183d](https://github.com/serverless-components/tencent-laravel/commit/c27183d7ec1b420c5a16dcd03185bb72c0413f7c)) * prettier config ([3e06493](https://github.com/serverless-components/tencent-laravel/commit/3e06493fbf9c99f9e293f2f851884cd0a5315577)) * support eip config ([0a18bc0](https://github.com/serverless-components/tencent-laravel/commit/0a18bc0e12e2422806c9eab3edfc2ffa064ae4c1)) * support fonts type binary ([242dc08](https://github.com/serverless-components/tencent-laravel/commit/242dc080162f93c27aa8f94adc67db307269ecb2)) * traffic zero display bug ([63e53eb](https://github.com/serverless-components/tencent-laravel/commit/63e53eb393dab71f9b38fdd627910f947a865ca5)) * update get credential error message ([6cd73f0](https://github.com/serverless-components/tencent-laravel/commit/6cd73f0e78dd6ab5e95d721cc0dbc82d2d01fdc8)) * upgrade deps ([4880ca3](https://github.com/serverless-components/tencent-laravel/commit/4880ca396d8dc4673504e189c900f971c83a357a)) * upgrade deps ([7bc2f9e](https://github.com/serverless-components/tencent-laravel/commit/7bc2f9e076d2ab02cf0bddc8180666844cf3ecf3)) * upgrade deps ([c9166b7](https://github.com/serverless-components/tencent-laravel/commit/c9166b7733e769175aed9103c2aeeab923ba3e85)) ### Features * support scf publish version and traffic setup ([947b2f7](https://github.com/serverless-components/tencent-laravel/commit/947b2f7f16b82fc9aca3b5e822a6b00041f77586)) * support usage plan & auth ([a41c2b5](https://github.com/serverless-components/tencent-laravel/commit/a41c2b591400e814e2b1826b2d100f92d8f75e04)) * upgrade laravel to v2 ([77574f9](https://github.com/serverless-components/tencent-laravel/commit/77574f9de9ba70391f0729087dd82846ae01facd)) --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6b46bad --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,21 @@ +## [0.0.5](https://github.com/serverless-components/tencent-laravel/compare/v0.0.4...v0.0.5) (2020-08-26) + + +### Bug Fixes + +* apigw isDisabled ([c27183d](https://github.com/serverless-components/tencent-laravel/commit/c27183d7ec1b420c5a16dcd03185bb72c0413f7c)) +* prettier config ([3e06493](https://github.com/serverless-components/tencent-laravel/commit/3e06493fbf9c99f9e293f2f851884cd0a5315577)) +* support eip config ([0a18bc0](https://github.com/serverless-components/tencent-laravel/commit/0a18bc0e12e2422806c9eab3edfc2ffa064ae4c1)) +* support fonts type binary ([242dc08](https://github.com/serverless-components/tencent-laravel/commit/242dc080162f93c27aa8f94adc67db307269ecb2)) +* traffic zero display bug ([63e53eb](https://github.com/serverless-components/tencent-laravel/commit/63e53eb393dab71f9b38fdd627910f947a865ca5)) +* update get credential error message ([6cd73f0](https://github.com/serverless-components/tencent-laravel/commit/6cd73f0e78dd6ab5e95d721cc0dbc82d2d01fdc8)) +* upgrade deps ([4880ca3](https://github.com/serverless-components/tencent-laravel/commit/4880ca396d8dc4673504e189c900f971c83a357a)) +* upgrade deps ([7bc2f9e](https://github.com/serverless-components/tencent-laravel/commit/7bc2f9e076d2ab02cf0bddc8180666844cf3ecf3)) +* upgrade deps ([c9166b7](https://github.com/serverless-components/tencent-laravel/commit/c9166b7733e769175aed9103c2aeeab923ba3e85)) + + +### Features + +* support scf publish version and traffic setup ([947b2f7](https://github.com/serverless-components/tencent-laravel/commit/947b2f7f16b82fc9aca3b5e822a6b00041f77586)) +* support usage plan & auth ([a41c2b5](https://github.com/serverless-components/tencent-laravel/commit/a41c2b591400e814e2b1826b2d100f92d8f75e04)) +* upgrade laravel to v2 ([77574f9](https://github.com/serverless-components/tencent-laravel/commit/77574f9de9ba70391f0729087dd82846ae01facd)) From ef1b6ddee5b4e700c1da5534633734333bbdf030 Mon Sep 17 00:00:00 2001 From: Avril Li Date: Wed, 26 Aug 2020 20:39:17 +0800 Subject: [PATCH 29/54] chore: update release rule --- release.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release.config.js b/release.config.js index a13798c..98b3864 100644 --- a/release.config.js +++ b/release.config.js @@ -11,8 +11,7 @@ module.exports = { preset: 'angular', parserOpts: { noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'] - }, - releaseRules: [{ type: 'feat', release: 'patch' }] + } } ], [ From 1af615bf4bf6950c862387b25f414f8d14cc1fbe Mon Sep 17 00:00:00 2001 From: yugasun Date: Thu, 27 Aug 2020 16:20:30 +0800 Subject: [PATCH 30/54] fix: support cfs config --- serverless.component.yml | 2 +- src/package.json | 2 +- src/utils.js | 3 +++ tests/integration.test.js | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/serverless.component.yml b/serverless.component.yml index 9930245..79e2d2c 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: 0.0.5 +version: 0.0.6 author: Tencent Cloud, Inc org: Tencent Cloud, Inc description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. diff --git a/src/package.json b/src/package.json index 9a9d323..a53fc4f 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^1.13.2", + "tencent-component-toolkit": "^1.15.7", "type": "^2.0.0" } } diff --git a/src/utils.js b/src/utils.js index 03b6847..095ec8e 100644 --- a/src/utils.js +++ b/src/utils.js @@ -249,6 +249,9 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { layers: ensureIterable(tempFunctionConf.layers ? tempFunctionConf.layers : inputs.layers, { default: [] }), + cfs: ensureIterable(tempFunctionConf.cfs ? tempFunctionConf.cfs : inputs.cfs, { + default: [] + }), publish: inputs.publish, traffic: inputs.traffic, lastVersion: instance.state.lastVersion, diff --git a/tests/integration.test.js b/tests/integration.test.js index 0a68e85..8bef758 100644 --- a/tests/integration.test.js +++ b/tests/integration.test.js @@ -10,7 +10,7 @@ jest.setTimeout(600000) const instanceYaml = { org: 'orgDemo', app: 'appDemo', - component: 'laravel@dev', + component: 'laravel', name: `laravel-integration-tests-${generateId()}`, stage: 'dev', inputs: { From d5d7dd2d0b7c1fda0c7b46eb36c00980f37e0adc Mon Sep 17 00:00:00 2001 From: Avril Li Date: Wed, 2 Sep 2020 11:14:50 +0800 Subject: [PATCH 31/54] chore: add ygsec check --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 59473f9..14e3725 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,9 @@ }, "husky": { "hooks": { - "pre-commit": "lint-staged", + "pre-commit": "ygsec && lint-staged", "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-push": "npm run lint:fix && npm run prettier:fix" + "pre-push": "ygsec && npm run lint:fix && npm run prettier:fix" } }, "lint-staged": { @@ -46,6 +46,7 @@ "@semantic-release/npm": "^7.0.4", "@semantic-release/release-notes-generator": "^9.0.1", "@serverless/platform-client-china": "^1.0.19", + "@ygkit/secure": "0.0.3", "axios": "^0.19.2", "babel-eslint": "^10.1.0", "dotenv": "^8.2.0", @@ -53,7 +54,7 @@ "eslint-config-prettier": "^6.10.0", "eslint-plugin-import": "^2.20.1", "eslint-plugin-prettier": "^3.1.2", - "husky": "^4.2.3", + "husky": "^4.2.5", "jest": "^25.0.1", "lint-staged": "^10.0.8", "prettier": "^1.19.1", From b5de551fe3fcddfc7021f01f7b0563c0b2cc9669 Mon Sep 17 00:00:00 2001 From: yugasun Date: Wed, 2 Sep 2020 17:09:01 +0800 Subject: [PATCH 32/54] fix: update tencnet-component-toolkit for api mark --- README.en.md | 130 --------------------------------------- README.md | 10 ++- serverless.component.yml | 2 +- src/package.json | 2 +- 4 files changed, 9 insertions(+), 135 deletions(-) delete mode 100755 README.en.md diff --git a/README.en.md b/README.en.md deleted file mode 100755 index 86cd9cd..0000000 --- a/README.en.md +++ /dev/null @@ -1,130 +0,0 @@ -[![Serverless PHP Laravel Tencent Cloud](https://img.serverlesscloud.cn/20191226/1577347087676-website_%E9%95%BF.png)](http://serverless.com) - -# Tencent Laravel Serverless Component - -[简体中文](./README.md) | English - -## Introduction - -[Laravel](https://github.com/laravel/laravel) Serverless Component for Tencent Cloud, support `Laravel >= 6.0`. - -## Content - -0. [Prepare](#0-prepare) -1. [Install](#1-install) -1. [Create](#2-create) -1. [Configure](#3-configure) -1. [Deploy](#4-deploy) -1. [Remove](#5-Remove) - -### 0. Prepare - -#### Initial Laravel Project - -Before use this component, you should init a `laravel` project: - -```bash -composer create-project --prefer-dist laravel/laravel serverless-laravel -``` - -> Notice:Laravel use Composer manage dependencies, so you should install Composer firstly. Refer to [Official Install](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos) - -#### Modify Laravel Project - -When cloud funtion running, only `/tmp` folder is writable, so we should change the `APP_STORAGE` folder to `/tmp`. - -Add this line in `bootstrap/app.php` after `$app = new Illuminate\Foundation\Application`: - -```php -$app->useStoragePath(env('APP_STORAGE', '/tmp')); -``` - -We will also need to customize the location for compiled views, as well as customize a few variables in the .env file: - -```dotenv -# views compiled path -VIEW_COMPILED_PATH=/tmp/storage/framework/views - -# We cannot store sessions to disk: if you don't need sessions (e.g. API) -# then use `array`, else store sessions in database or cookies -SESSION_DRIVER=array - -# Logging to stderr allows the logs to end up in Cloudwatch -LOG_CHANNEL=stderr - -# app storage dir must be /tmp -APP_STORAGE=/tmp -``` - -### 1. Install - -Install the Serverless Framework globally: - -```bash -$ npm install -g serverless -``` - -### 2. Create - -Just create the following simple boilerplate: - -```bash -$ touch serverless.yml -$ touch .env # your Tencent api keys -``` - -Add the access keys of a [Tencent CAM Role](https://console.cloud.tencent.com/cam/capi) with `AdministratorAccess` in the `.env` file, using this format: - -``` -# .env -TENCENT_SECRET_ID=XXX -TENCENT_SECRET_KEY=XXX -``` - -- If you don't have a Tencent Cloud account, you could [sign up](https://intl.cloud.tencent.com/register) first. - -### 3. Configure - -```yml -# serverless.yml - -component: laravel -name: laravelDemo -org: orgDemo -app: appDemo -stage: dev - -inputs: - src: ./ - region: ap-guangzhou - runtime: Php7 - apigatewayConf: - protocols: - - http - - https - environment: release -``` - -- [More Options](./docs/configure.md) - -### 4. Deploy - -> Notice: **Before deploying, you should clear local run config cache, run `php artisan config:clear`.** - -```bash -$ sls deploy -``` - -> Notice: `sls` is short for `serverless` command. - -  - -### 5. Remove - -```bash -$ sls remove -``` - -### More Components - -Checkout the [Serverless Components](https://github.com/serverless/components) repo for more information. diff --git a/README.md b/README.md index a7fc418..dd5e0a6 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ # 腾讯云 Laravel Serverless Component -简体中文 | [English](./README.en.md) - ## 简介 腾讯云 [Laravel](https://github.com/laravel/laravel) Serverless Component, 支持 `Laravel >= 6.0`。 @@ -89,7 +87,7 @@ inputs: environment: release ``` -- [更多配置](./docs/configure.md) +- [更多配置](https://github.com/serverless-components/tencent-laravel/tree/master/docs/configure.md) ### 3. 部署 @@ -132,3 +130,9 @@ TENCENT_SECRET_KEY=123 ### 更多组件 可以在 [Serverless Components](https://github.com/serverless/components/blob/master/README.cn.md) repo 中查询更多组件的信息。 + +## License + +MIT License + +Copyright (c) 2020 Tencent Cloud, Inc. diff --git a/serverless.component.yml b/serverless.component.yml index 79e2d2c..e723d43 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: 0.0.6 +version: 0.0.7 author: Tencent Cloud, Inc org: Tencent Cloud, Inc description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. diff --git a/src/package.json b/src/package.json index a53fc4f..9931624 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^1.15.7", + "tencent-component-toolkit": "^1.16.3", "type": "^2.0.0" } } From 45300aaaf8abe92d39c66634520ed8b254802301 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 2 Sep 2020 09:22:17 +0000 Subject: [PATCH 33/54] chore(release): version 0.0.6 ## [0.0.6](https://github.com/serverless-components/tencent-laravel/compare/v0.0.5...v0.0.6) (2020-09-02) ### Bug Fixes * support cfs config ([1af615b](https://github.com/serverless-components/tencent-laravel/commit/1af615bf4bf6950c862387b25f414f8d14cc1fbe)) * update tencnet-component-toolkit for api mark ([b5de551](https://github.com/serverless-components/tencent-laravel/commit/b5de551fe3fcddfc7021f01f7b0563c0b2cc9669)) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b46bad..98c762c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [0.0.6](https://github.com/serverless-components/tencent-laravel/compare/v0.0.5...v0.0.6) (2020-09-02) + + +### Bug Fixes + +* support cfs config ([1af615b](https://github.com/serverless-components/tencent-laravel/commit/1af615bf4bf6950c862387b25f414f8d14cc1fbe)) +* update tencnet-component-toolkit for api mark ([b5de551](https://github.com/serverless-components/tencent-laravel/commit/b5de551fe3fcddfc7021f01f7b0563c0b2cc9669)) + ## [0.0.5](https://github.com/serverless-components/tencent-laravel/compare/v0.0.4...v0.0.5) (2020-08-26) From 665a6cde0b0bf5df90b5d84eafa28ff9e37339aa Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 4 Sep 2020 19:38:24 +0800 Subject: [PATCH 34/54] fix: update deps --- serverless.component.yml | 12 ++++++------ src/package.json | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/serverless.component.yml b/serverless.component.yml index e723d43..555e168 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,11 +1,11 @@ name: laravel -version: 0.0.7 -author: Tencent Cloud, Inc -org: Tencent Cloud, Inc +version: 0.0.8 +author: 'Tencent Cloud, Inc' +org: 'Tencent Cloud, Inc' description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. -keywords: tencent, serverless, laravel -repo: https://github.com/serverless-components/tencent-laravel -readme: https://github.com/serverless-components/tencent-laravel/tree/master/README.md +keywords: 'tencent, serverless, laravel' +repo: 'https://github.com/serverless-components/tencent-laravel' +readme: 'https://github.com/serverless-components/tencent-laravel/tree/master/README.md' license: MIT main: ./src webDeployable: true diff --git a/src/package.json b/src/package.json index 9931624..4e09522 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^1.16.3", - "type": "^2.0.0" + "tencent-component-toolkit": "^1.16.4", + "type": "^2.1.0" } } From dfdf7d04c4c3dc2d5e032b79398501a765d8e782 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 4 Sep 2020 11:40:37 +0000 Subject: [PATCH 35/54] chore(release): version 0.0.7 ## [0.0.7](https://github.com/serverless-components/tencent-laravel/compare/v0.0.6...v0.0.7) (2020-09-04) ### Bug Fixes * update deps ([665a6cd](https://github.com/serverless-components/tencent-laravel/commit/665a6cde0b0bf5df90b5d84eafa28ff9e37339aa)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98c762c..5818fa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.0.7](https://github.com/serverless-components/tencent-laravel/compare/v0.0.6...v0.0.7) (2020-09-04) + + +### Bug Fixes + +* update deps ([665a6cd](https://github.com/serverless-components/tencent-laravel/commit/665a6cde0b0bf5df90b5d84eafa28ff9e37339aa)) + ## [0.0.6](https://github.com/serverless-components/tencent-laravel/compare/v0.0.5...v0.0.6) (2020-09-02) From b63c58e6ba06597cd18dee4e963404f28b062ba3 Mon Sep 17 00:00:00 2001 From: yugasun Date: Mon, 7 Sep 2020 15:25:11 +0800 Subject: [PATCH 36/54] fix: update deploy flow for multi region --- example/composer.lock | 2286 +++++++++++++++++++++----------------- serverless.component.yml | 2 +- src/serverless.js | 240 ++-- src/utils.js | 263 ++--- 4 files changed, 1494 insertions(+), 1297 deletions(-) diff --git a/example/composer.lock b/example/composer.lock index cc9dbf6..f2d0fb3 100644 --- a/example/composer.lock +++ b/example/composer.lock @@ -18,7 +18,13 @@ "type": "zip", "url": "https://api.github.com/repos/asm89/stack-cors/zipball/b9c31def6a83f84b4d4a40d35996d375755f0e08", "reference": "b9c31def6a83f84b4d4a40d35996d375755f0e08", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.5.9", @@ -60,17 +66,23 @@ }, { "name": "brick/math", - "version": "0.8.15", + "version": "0.9.1", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "9b08d412b9da9455b210459ff71414de7e6241cd" + "reference": "283a40c901101e66de7061bd359252c013dcc43c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/9b08d412b9da9455b210459ff71414de7e6241cd", - "reference": "9b08d412b9da9455b210459ff71414de7e6241cd", - "shasum": "" + "url": "https://api.github.com/repos/brick/math/zipball/283a40c901101e66de7061bd359252c013dcc43c", + "reference": "283a40c901101e66de7061bd359252c013dcc43c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-json": "*", @@ -102,13 +114,7 @@ "brick", "math" ], - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/brick/math", - "type": "tidelift" - } - ], - "time": "2020-04-15T15:59:35+00:00" + "time": "2020-08-18T23:57:15+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -122,7 +128,13 @@ "type": "zip", "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.2" @@ -155,7 +167,13 @@ "type": "zip", "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.2 || ^8.0" @@ -218,20 +236,6 @@ "uppercase", "words" ], - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", - "type": "tidelift" - } - ], "time": "2020-05-29T15:13:26+00:00" }, { @@ -246,7 +250,13 @@ "type": "zip", "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.2 || ^8.0" @@ -294,20 +304,6 @@ "parser", "php" ], - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], "time": "2020-05-25T17:44:05+00:00" }, { @@ -322,7 +318,13 @@ "type": "zip", "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/72b6fbf76adb3cf5bc0db68559b33d41219aba27", "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.0" @@ -366,17 +368,23 @@ }, { "name": "egulias/email-validator", - "version": "2.1.18", + "version": "2.1.20", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441" + "reference": "f46887bc48db66c7f38f668eb7d6ae54583617ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/cfa3d44471c7f5bfb684ac2b0da7114283d78441", - "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441", - "shasum": "" + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/f46887bc48db66c7f38f668eb7d6ae54583617ff", + "reference": "f46887bc48db66c7f38f668eb7d6ae54583617ff", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "doctrine/lexer": "^1.0.1", @@ -420,21 +428,27 @@ "validation", "validator" ], - "time": "2020-06-16T20:11:17+00:00" + "time": "2020-09-06T13:44:32+00:00" }, { "name": "fideloper/proxy", - "version": "4.3.0", + "version": "4.4.0", "source": { "type": "git", "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a" + "reference": "9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a", - "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a", - "shasum": "" + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8", + "reference": "9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0", @@ -474,7 +488,7 @@ "proxy", "trusted proxy" ], - "time": "2020-02-22T01:51:47+00:00" + "time": "2020-06-23T01:36:47+00:00" }, { "name": "fruitcake/laravel-cors", @@ -488,7 +502,13 @@ "type": "zip", "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/1d127dbec313e2e227d65e0c483765d8d7559bf6", "reference": "1d127dbec313e2e227d65e0c483765d8d7559bf6", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "asm89/stack-cors": "^1.3", @@ -542,12 +562,6 @@ "crossdomain", "laravel" ], - "funding": [ - { - "url": "https://github.com/barryvdh", - "type": "github" - } - ], "time": "2020-04-28T08:47:37+00:00" }, { @@ -562,7 +576,13 @@ "type": "zip", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-json": "*", @@ -629,7 +649,13 @@ "type": "zip", "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.5.0" @@ -680,7 +706,13 @@ "type": "zip", "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", "reference": "239400de7a173fe9901b9ac7c06497751f00727a", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.4.0", @@ -741,17 +773,23 @@ }, { "name": "laravel/framework", - "version": "v7.16.1", + "version": "v7.27.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "dc9cd8338d222dec2d9962553639e08c4585fa5b" + "reference": "17777a92da9b3cf0026f26462d289d596420e6d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/dc9cd8338d222dec2d9962553639e08c4585fa5b", - "reference": "dc9cd8338d222dec2d9962553639e08c4585fa5b", - "shasum": "" + "url": "https://api.github.com/repos/laravel/framework/zipball/17777a92da9b3cf0026f26462d289d596420e6d0", + "reference": "17777a92da9b3cf0026f26462d289d596420e6d0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "doctrine/inflector": "^1.4|^2.0", @@ -856,6 +894,7 @@ "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.0).", + "predis/predis": "Required to use the predis connector (^1.1.2).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", "symfony/cache": "Required to PSR-6 cache bridge (^5.0).", @@ -894,21 +933,27 @@ "framework", "laravel" ], - "time": "2020-06-16T14:31:25+00:00" + "time": "2020-09-01T13:41:48+00:00" }, { "name": "laravel/tinker", - "version": "v2.4.0", + "version": "v2.4.2", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "cde90a7335a2130a4488beb68f4b2141869241db" + "reference": "58424c24e8aec31c3a3ac54eb3adb15e8a0a067b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/cde90a7335a2130a4488beb68f4b2141869241db", - "reference": "cde90a7335a2130a4488beb68f4b2141869241db", - "shasum": "" + "url": "https://api.github.com/repos/laravel/tinker/zipball/58424c24e8aec31c3a3ac54eb3adb15e8a0a067b", + "reference": "58424c24e8aec31c3a3ac54eb3adb15e8a0a067b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "illuminate/console": "^6.0|^7.0|^8.0", @@ -958,25 +1003,31 @@ "laravel", "psysh" ], - "time": "2020-04-07T15:01:31+00:00" + "time": "2020-08-11T19:28:08+00:00" }, { "name": "league/commonmark", - "version": "1.4.3", + "version": "1.5.4", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505" + "reference": "21819c989e69bab07e933866ad30c7e3f32984ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/412639f7cfbc0b31ad2455b2fe965095f66ae505", - "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505", - "shasum": "" + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/21819c989e69bab07e933866ad30c7e3f32984ba", + "reference": "21819c989e69bab07e933866ad30c7e3f32984ba", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-mbstring": "*", - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "conflict": { "scrutinizer/ocular": "1.7.*" @@ -990,7 +1041,7 @@ "michelf/php-markdown": "~1.4", "mikehaertl/php-shellcommand": "^1.4", "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", "scrutinizer/ocular": "^1.5", "symfony/finder": "^4.2" }, @@ -998,11 +1049,6 @@ "bin/commonmark" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, "autoload": { "psr-4": { "League\\CommonMark\\": "src" @@ -1032,58 +1078,39 @@ "md", "parser" ], - "funding": [ - { - "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", - "type": "custom" - }, - { - "url": "https://www.colinodell.com/sponsor", - "type": "custom" - }, - { - "url": "https://www.paypal.me/colinpodell/10.00", - "type": "custom" - }, - { - "url": "https://github.com/colinodell", - "type": "github" - }, - { - "url": "https://www.patreon.com/colinodell", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/commonmark", - "type": "tidelift" - } - ], - "time": "2020-05-04T22:15:21+00:00" + "time": "2020-08-18T01:19:12+00:00" }, { "name": "league/flysystem", - "version": "1.0.69", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "7106f78428a344bc4f643c233a94e48795f10967" + "reference": "9be3b16c877d477357c015cec057548cf9b2a14a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967", - "reference": "7106f78428a344bc4f643c233a94e48795f10967", - "shasum": "" + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a", + "reference": "9be3b16c877d477357c015cec057548cf9b2a14a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-fileinfo": "*", - "php": ">=5.5.9" + "league/mime-type-detection": "^1.3", + "php": "^7.2.5 || ^8.0" }, "conflict": { "league/flysystem-sftp": "<1.0.6" }, "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.26" + "phpspec/prophecy": "^1.11.1", + "phpunit/phpunit": "^8.5.8" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -1142,27 +1169,74 @@ "sftp", "storage" ], - "funding": [ + "time": "2020-08-23T07:39:11+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "fda190b62b962d96a069fcc414d781db66d65b69" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/fda190b62b962d96a069fcc414d781db66d65b69", + "reference": "fda190b62b962d96a069fcc414d781db66d65b69", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.36", + "phpunit/phpunit": "^8.5.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://offset.earth/frankdejonge", - "type": "other" + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" } ], - "time": "2020-05-18T15:13:39+00:00" + "description": "Mime-type detection for Flysystem", + "time": "2020-08-09T10:34:01+00:00" }, { "name": "monolog/monolog", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1" + "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/38914429aac460e8e4616c8cb486ecb40ec90bb1", - "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1", - "shasum": "" + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f9eee5cec93dfb313a38b6b288741e84e53f02d5", + "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2", @@ -1229,31 +1303,27 @@ "logging", "psr-3" ], - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2020-05-22T08:12:19+00:00" + "time": "2020-07-23T08:41:23+00:00" }, { "name": "nesbot/carbon", - "version": "2.35.0", + "version": "2.39.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4b9bd835261ef23d36397a46a76b496a458305e5" + "reference": "7af467873250583cc967a59ee9df29fabab193c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4b9bd835261ef23d36397a46a76b496a458305e5", - "reference": "4b9bd835261ef23d36397a46a76b496a458305e5", - "shasum": "" + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7af467873250583cc967a59ee9df29fabab193c1", + "reference": "7af467873250583cc967a59ee9df29fabab193c1", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-json": "*", @@ -1264,9 +1334,10 @@ "require-dev": { "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", - "kylekatarnls/multi-tester": "^1.1", - "phpmd/phpmd": "^2.8", - "phpstan/phpstan": "^0.11", + "kylekatarnls/multi-tester": "^2.0", + "phpmd/phpmd": "^2.9", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.35", "phpunit/phpunit": "^7.5 || ^8.0", "squizlabs/php_codesniffer": "^3.4" }, @@ -1283,6 +1354,11 @@ "providers": [ "Carbon\\Laravel\\ServiceProvider" ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -1312,39 +1388,35 @@ "datetime", "time" ], - "funding": [ - { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", - "type": "tidelift" - } - ], - "time": "2020-05-24T18:27:52+00:00" + "time": "2020-09-04T13:11:37+00:00" }, { "name": "nikic/php-parser", - "version": "v4.5.0", + "version": "v4.9.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463" + "reference": "88e519766fc58bd46b8265561fb79b54e2e00b28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/53c2753d756f5adb586dca79c2ec0e2654dd9463", - "reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463", - "shasum": "" + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/88e519766fc58bd46b8265561fb79b54e2e00b28", + "reference": "88e519766fc58bd46b8265561fb79b54e2e00b28", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-tokenizer": "*", "php": ">=7.0" }, "require-dev": { - "ircmaxell/php-yacc": "0.0.5", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -1352,7 +1424,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "4.9-dev" } }, "autoload": { @@ -1374,21 +1446,27 @@ "parser", "php" ], - "time": "2020-06-03T07:24:19+00:00" + "time": "2020-08-30T16:15:20+00:00" }, { "name": "opis/closure", - "version": "3.5.5", + "version": "3.5.7", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c" + "reference": "4531e53afe2fc660403e76fb7644e95998bff7bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c", - "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c", - "shasum": "" + "url": "https://api.github.com/repos/opis/closure/zipball/4531e53afe2fc660403e76fb7644e95998bff7bf", + "reference": "4531e53afe2fc660403e76fb7644e95998bff7bf", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^5.4 || ^7.0" @@ -1435,28 +1513,85 @@ "serialization", "serialize" ], - "time": "2020-06-17T14:59:55+00:00" + "time": "2020-09-06T17:02:15+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com/" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-02T15:55:56+00:00" }, { "name": "phpoption/phpoption", - "version": "1.7.4", + "version": "1.7.5", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3" + "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", - "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", - "shasum": "" + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", + "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^5.5.9 || ^7.0 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.3", - "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" + "bamarni/composer-bin-plugin": "^1.4.1", + "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { @@ -1490,17 +1625,7 @@ "php", "type" ], - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" - } - ], - "time": "2020-06-07T10:40:07+00:00" + "time": "2020-07-20T17:29:33+00:00" }, { "name": "psr/container", @@ -1514,7 +1639,13 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.0" @@ -1563,7 +1694,13 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.0" @@ -1609,7 +1746,13 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.0" @@ -1659,7 +1802,13 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.0" @@ -1706,7 +1855,13 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.0" @@ -1754,7 +1909,13 @@ "type": "zip", "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a8aec1b2981ab66882a01cce36a49b6317dc3560", "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "dnoegel/php-xdg-base-dir": "0.1.*", @@ -1826,7 +1987,13 @@ "type": "zip", "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.6" @@ -1856,35 +2023,44 @@ }, { "name": "ramsey/collection", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca" + "reference": "044184884e3c803e4cbb6451386cb71562939b18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca", - "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca", - "shasum": "" + "url": "https://api.github.com/repos/ramsey/collection/zipball/044184884e3c803e4cbb6451386cb71562939b18", + "reference": "044184884e3c803e4cbb6451386cb71562939b18", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", + "captainhook/captainhook": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "ergebnis/composer-normalize": "^2.6", "fzaninotto/faker": "^1.5", - "jakub-onderka/php-parallel-lint": "^1", + "hamcrest/hamcrest-php": "^2", "jangregor/phpstan-prophecy": "^0.6", "mockery/mockery": "^1.3", "phpstan/extension-installer": "^1", - "phpstan/phpdoc-parser": "0.4.1", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-mockery": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan": "^0.12.32", + "phpstan/phpstan-mockery": "^0.12.5", + "phpstan/phpstan-phpunit": "^0.12.11", "phpunit/phpunit": "^8.5", - "slevomat/coding-standard": "^6.0", - "squizlabs/php_codesniffer": "^3.5" + "psy/psysh": "^0.10.4", + "slevomat/coding-standard": "^6.3", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^3.12.2" }, "type": "library", "autoload": { @@ -1904,7 +2080,6 @@ } ], "description": "A PHP 7.2+ library for representing and manipulating collections.", - "homepage": "https://github.com/ramsey/collection", "keywords": [ "array", "collection", @@ -1913,24 +2088,30 @@ "queue", "set" ], - "time": "2020-01-05T00:22:59+00:00" + "time": "2020-08-11T00:57:21+00:00" }, { "name": "ramsey/uuid", - "version": "4.0.1", + "version": "4.1.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d" + "reference": "cd4032040a750077205918c86049aa0f43d22947" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d", - "reference": "ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d", - "shasum": "" + "url": "https://api.github.com/repos/ramsey/uuid/zipball/cd4032040a750077205918c86049aa0f43d22947", + "reference": "cd4032040a750077205918c86049aa0f43d22947", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { - "brick/math": "^0.8", + "brick/math": "^0.8 || ^0.9", "ext-json": "*", "php": "^7.2 || ^8", "ramsey/collection": "^1.0", @@ -1941,7 +2122,7 @@ }, "require-dev": { "codeception/aspect-mock": "^3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7.0", "doctrine/annotations": "^1.8", "goaop/framework": "^2", "mockery/mockery": "^1.3", @@ -1950,8 +2131,8 @@ "php-mock/php-mock-mockery": "^1.3", "php-mock/php-mock-phpunit": "^2.5", "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^0.17.1", "phpstan/extension-installer": "^1.0", - "phpstan/phpdoc-parser": "0.4.3", "phpstan/phpstan": "^0.12", "phpstan/phpstan-mockery": "^0.12", "phpstan/phpstan-phpunit": "^0.12", @@ -1994,13 +2175,7 @@ "identifier", "uuid" ], - "funding": [ - { - "url": "https://github.com/ramsey", - "type": "github" - } - ], - "time": "2020-03-29T20:13:32+00:00" + "time": "2020-08-18T17:17:46+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -2014,7 +2189,13 @@ "type": "zip", "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "egulias/email-validator": "~2.0", @@ -2066,17 +2247,23 @@ }, { "name": "symfony/console", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "34ac555a3627e324b660e318daa07572e1140123" + "reference": "186f395b256065ba9b890c0a4e48a91d598fa2cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/34ac555a3627e324b660e318daa07572e1140123", - "reference": "34ac555a3627e324b660e318daa07572e1140123", - "shasum": "" + "url": "https://api.github.com/repos/symfony/console/zipball/186f395b256065ba9b890c0a4e48a91d598fa2cf", + "reference": "186f395b256065ba9b890c0a4e48a91d598fa2cf", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -2141,25 +2328,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com/", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-06-15T12:59:21+00:00" + "time": "2020-09-02T07:07:40+00:00" }, { "name": "symfony/css-selector", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -2169,7 +2342,13 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/css-selector/zipball/e544e24472d4c97b2d11ade7caacd446727c6bf9", "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5" @@ -2208,35 +2387,27 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com/", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.1.2", + "version": "v2.1.3", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337" + "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", - "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", - "shasum": "" + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14", + "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.1" @@ -2245,6 +2416,10 @@ "extra": { "branch-alias": { "dev-master": "2.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -2268,35 +2443,27 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com/", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-27T08:34:37+00:00" + "time": "2020-06-06T08:49:21+00:00" }, { "name": "symfony/error-handler", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896" + "reference": "525636d4b84e06c6ca72d96b6856b5b169416e6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896", - "reference": "7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896", - "shasum": "" + "url": "https://api.github.com/repos/symfony/error-handler/zipball/525636d4b84e06c6ca72d96b6856b5b169416e6a", + "reference": "525636d4b84e06c6ca72d96b6856b5b169416e6a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -2339,35 +2506,27 @@ ], "description": "Symfony ErrorHandler Component", "homepage": "https://symfony.com/", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-30T20:35:19+00:00" + "time": "2020-08-17T10:01:29+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7" + "reference": "94871fc0a69c3c5da57764187724cdce0755899c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/cc0d059e2e997e79ca34125a52f3e33de4424ac7", - "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7", - "shasum": "" + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/94871fc0a69c3c5da57764187724cdce0755899c", + "reference": "94871fc0a69c3c5da57764187724cdce0755899c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -2425,35 +2584,27 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com/", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2020-08-13T14:19:42+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.1.2", + "version": "v2.1.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "405952c4e90941a17e52ef7489a2bd94870bb290" + "reference": "f6f613d74cfc5a623fc36294d3451eb7fa5a042b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/405952c4e90941a17e52ef7489a2bd94870bb290", - "reference": "405952c4e90941a17e52ef7489a2bd94870bb290", - "shasum": "" + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f6f613d74cfc5a623fc36294d3451eb7fa5a042b", + "reference": "f6f613d74cfc5a623fc36294d3451eb7fa5a042b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -2466,6 +2617,10 @@ "extra": { "branch-alias": { "dev-master": "2.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -2497,35 +2652,27 @@ "interoperability", "standards" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2020-07-06T13:23:11+00:00" }, { "name": "symfony/finder", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187" + "reference": "2b765f0cf6612b3636e738c0689b29aa63088d5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/4298870062bfc667cb78d2b379be4bf5dec5f187", - "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187", - "shasum": "" + "url": "https://api.github.com/repos/symfony/finder/zipball/2b765f0cf6612b3636e738c0689b29aa63088d5d", + "reference": "2b765f0cf6612b3636e738c0689b29aa63088d5d", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5" @@ -2560,35 +2707,27 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com/", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2020-08-17T10:01:29+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "f93055171b847915225bd5b0a5792888419d8d75" + "reference": "41a4647f12870e9d41d9a7d72ff0614a27208558" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f93055171b847915225bd5b0a5792888419d8d75", - "reference": "f93055171b847915225bd5b0a5792888419d8d75", - "shasum": "" + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/41a4647f12870e9d41d9a7d72ff0614a27208558", + "reference": "41a4647f12870e9d41d9a7d72ff0614a27208558", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -2635,35 +2774,27 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com/", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-06-15T06:52:54+00:00" + "time": "2020-08-17T07:48:54+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "a18c27ace1ef344ffcb129a5b089bad7643b387a" + "reference": "3e32676e6cb5d2081c91a56783471ff8a7f7110b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a18c27ace1ef344ffcb129a5b089bad7643b387a", - "reference": "a18c27ace1ef344ffcb129a5b089bad7643b387a", - "shasum": "" + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/3e32676e6cb5d2081c91a56783471ff8a7f7110b", + "reference": "3e32676e6cb5d2081c91a56783471ff8a7f7110b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -2748,35 +2879,27 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com/", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-06-15T13:51:38+00:00" + "time": "2020-09-02T08:15:18+00:00" }, { "name": "symfony/mime", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "c0c418f05e727606e85b482a8591519c4712cf45" + "reference": "89a2c9b4cb7b5aa516cf55f5194c384f444c81dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45", - "reference": "c0c418f05e727606e85b482a8591519c4712cf45", - "shasum": "" + "url": "https://api.github.com/repos/symfony/mime/zipball/89a2c9b4cb7b5aa516cf55f5194c384f444c81dc", + "reference": "89a2c9b4cb7b5aa516cf55f5194c384f444c81dc", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -2825,35 +2948,27 @@ "mime", "mime-type" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-06-09T15:07:35+00:00" + "time": "2020-08-17T10:01:29+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.17.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", - "shasum": "" + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.3" @@ -2864,7 +2979,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -2897,35 +3016,27 @@ "polyfill", "portable" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-12T16:14:59+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.17.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424" + "reference": "6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c4de7601eefbf25f9d47190abe07f79fe0a27424", - "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424", - "shasum": "" + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36", + "reference": "6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.3" @@ -2936,7 +3047,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -2970,35 +3085,27 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.17.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "e094b0770f7833fdf257e6ba4775be4e258230b2" + "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e094b0770f7833fdf257e6ba4775be4e258230b2", - "reference": "e094b0770f7833fdf257e6ba4775be4e258230b2", - "shasum": "" + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b740103edbdcc39602239ee8860f0f45a8eb9aa5", + "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.3" @@ -3009,7 +3116,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3044,39 +3155,32 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.17.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a" + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a", - "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a", - "shasum": "" + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.3", - "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php70": "^1.10", "symfony/polyfill-php72": "^1.10" }, "suggest": { @@ -3085,7 +3189,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3105,6 +3213,10 @@ "name": "Laurent Bassin", "email": "laurent@bassin.info" }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" @@ -3120,35 +3232,27 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2020-08-04T06:02:08+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.17.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "1357b1d168eb7f68ad6a134838e46b0b159444a9" + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/1357b1d168eb7f68ad6a134838e46b0b159444a9", - "reference": "1357b1d168eb7f68ad6a134838e46b0b159444a9", - "shasum": "" + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.3" @@ -3159,7 +3263,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3197,54 +3305,120 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://github.com/fabpot", - "type": "github" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "time": "2020-05-12T16:14:59+00:00" + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com/", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2020-07-14T12:35:20+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.17.0", + "name": "symfony/polyfill-php70", + "version": "v1.18.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fa79b11539418b02fc5e1897267673ba2c19419c" + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c", - "reference": "fa79b11539418b02fc5e1897267673ba2c19419c", - "shasum": "" + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", "php": ">=5.3.3" }, - "suggest": { - "ext-mbstring": "For best performance" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Php70\\": "" }, "files": [ "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3261,44 +3435,35 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", "homepage": "https://symfony.com/", "keywords": [ "compatibility", - "mbstring", "polyfill", "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.17.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "f048e612a3905f34931127360bdd2def19a5e582" + "reference": "639447d008615574653fb3bc60d1986d7172eaae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", - "reference": "f048e612a3905f34931127360bdd2def19a5e582", - "shasum": "" + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", + "reference": "639447d008615574653fb3bc60d1986d7172eaae", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.3" @@ -3306,7 +3471,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3339,35 +3508,27 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.17.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc" + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc", - "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc", - "shasum": "" + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.3" @@ -3375,7 +3536,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3411,35 +3576,27 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.17.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd" + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd", - "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd", - "shasum": "" + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.0.8" @@ -3447,7 +3604,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3487,35 +3648,27 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/process", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1" + "reference": "1864216226af21eb76d9477f691e7cbf198e0402" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1", - "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1", - "shasum": "" + "url": "https://api.github.com/repos/symfony/process/zipball/1864216226af21eb76d9477f691e7cbf198e0402", + "reference": "1864216226af21eb76d9477f691e7cbf198e0402", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -3551,35 +3704,27 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com/", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-30T20:35:19+00:00" + "time": "2020-07-23T08:36:24+00:00" }, { "name": "symfony/routing", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "bbd0ba121d623f66d165a55a108008968911f3eb" + "reference": "47b0218344cb6af25c93ca8ee1137fafbee5005d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/bbd0ba121d623f66d165a55a108008968911f3eb", - "reference": "bbd0ba121d623f66d165a55a108008968911f3eb", - "shasum": "" + "url": "https://api.github.com/repos/symfony/routing/zipball/47b0218344cb6af25c93ca8ee1137fafbee5005d", + "reference": "47b0218344cb6af25c93ca8ee1137fafbee5005d", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -3643,35 +3788,27 @@ "uri", "url" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-06-10T11:49:58+00:00" + "time": "2020-08-10T08:03:57+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.1.2", + "version": "v2.1.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b" + "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/66a8f0957a3ca54e4f724e49028ab19d75a8918b", - "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b", - "shasum": "" + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/58c7475e5457c5492c26cc740cc0ad7464be9442", + "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -3684,6 +3821,10 @@ "extra": { "branch-alias": { "dev-master": "2.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -3715,35 +3856,27 @@ "interoperability", "standards" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2020-07-06T13:23:11+00:00" }, { "name": "symfony/string", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ac70459db781108db7c6d8981dd31ce0e29e3298" + "reference": "0de4cc1e18bb596226c06a82e2e7e9bc6001a63a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ac70459db781108db7c6d8981dd31ce0e29e3298", - "reference": "ac70459db781108db7c6d8981dd31ce0e29e3298", - "shasum": "" + "url": "https://api.github.com/repos/symfony/string/zipball/0de4cc1e18bb596226c06a82e2e7e9bc6001a63a", + "reference": "0de4cc1e18bb596226c06a82e2e7e9bc6001a63a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -3800,35 +3933,27 @@ "utf-8", "utf8" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-06-11T12:16:36+00:00" + "time": "2020-08-17T07:48:54+00:00" }, { "name": "symfony/translation", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2" + "reference": "917b02cdc5f33e0309b8e9d33ee1480b20687413" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", - "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", - "shasum": "" + "url": "https://api.github.com/repos/symfony/translation/zipball/917b02cdc5f33e0309b8e9d33ee1480b20687413", + "reference": "917b02cdc5f33e0309b8e9d33ee1480b20687413", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -3892,35 +4017,27 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com/", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-30T20:35:19+00:00" + "time": "2020-08-17T10:01:29+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.1.2", + "version": "v2.1.3", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e" + "reference": "616a9773c853097607cf9dd6577d5b143ffdcd63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/e5ca07c8f817f865f618aa072c2fe8e0e637340e", - "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e", - "shasum": "" + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/616a9773c853097607cf9dd6577d5b143ffdcd63", + "reference": "616a9773c853097607cf9dd6577d5b143ffdcd63", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5" @@ -3932,6 +4049,10 @@ "extra": { "branch-alias": { "dev-master": "2.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -3963,35 +4084,27 @@ "interoperability", "standards" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2020-07-06T13:23:11+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.1.2", + "version": "v5.1.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "46a942903059b0b05e601f00eb64179e05578c0f" + "reference": "b43a3905262bcf97b2510f0621f859ca4f5287be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/46a942903059b0b05e601f00eb64179e05578c0f", - "reference": "46a942903059b0b05e601f00eb64179e05578c0f", - "shasum": "" + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b43a3905262bcf97b2510f0621f859ca4f5287be", + "reference": "b43a3905262bcf97b2510f0621f859ca4f5287be", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.2.5", @@ -4053,44 +4166,36 @@ "debug", "dump" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-05-30T20:35:19+00:00" + "time": "2020-08-17T07:42:30+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.2", + "version": "2.2.3", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "dda2ee426acd6d801d5b7fd1001cde9b5f790e15" + "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/dda2ee426acd6d801d5b7fd1001cde9b5f790e15", - "reference": "dda2ee426acd6d801d5b7fd1001cde9b5f790e15", - "shasum": "" + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/b43b05cf43c1b6d849478965062b6ef73e223bb5", + "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-dom": "*", "ext-libxml": "*", - "php": "^5.5 || ^7.0", + "php": "^5.5 || ^7.0 || ^8.0", "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5" }, "type": "library", "extra": { @@ -4116,26 +4221,32 @@ ], "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", - "time": "2019-10-24T08:53:34+00:00" + "time": "2020-07-13T06:12:54+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v4.1.7", + "version": "v4.1.8", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "db63b2ea280fdcf13c4ca392121b0b2450b51193" + "reference": "572af79d913627a9d70374d27a6f5d689a35de32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/db63b2ea280fdcf13c4ca392121b0b2450b51193", - "reference": "db63b2ea280fdcf13c4ca392121b0b2450b51193", - "shasum": "" + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/572af79d913627a9d70374d27a6f5d689a35de32", + "reference": "572af79d913627a9d70374d27a6f5d689a35de32", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^5.5.9 || ^7.0 || ^8.0", "phpoption/phpoption": "^1.7.3", - "symfony/polyfill-ctype": "^1.16" + "symfony/polyfill-ctype": "^1.17" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", @@ -4180,31 +4291,27 @@ "env", "environment" ], - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" - } - ], - "time": "2020-06-07T18:25:35+00:00" + "time": "2020-07-14T19:22:52+00:00" }, { "name": "voku/portable-ascii", - "version": "1.5.2", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "618631dc601d8eb6ea0a9fbf654ec82f066c4e97" + "reference": "25bcbf01678930251fd572891447d9e318a6e2b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/618631dc601d8eb6ea0a9fbf654ec82f066c4e97", - "reference": "618631dc601d8eb6ea0a9fbf654ec82f066c4e97", - "shasum": "" + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/25bcbf01678930251fd572891447d9e318a6e2b8", + "reference": "25bcbf01678930251fd572891447d9e318a6e2b8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=7.0.0" @@ -4238,25 +4345,7 @@ "clean", "php" ], - "funding": [ - { - "url": "https://www.paypal.me/moelleken", - "type": "custom" - }, - { - "url": "https://github.com/voku", - "type": "github" - }, - { - "url": "https://www.patreon.com/voku", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", - "type": "tidelift" - } - ], - "time": "2020-06-15T23:49:30+00:00" + "time": "2020-07-22T23:32:04+00:00" } ], "packages-dev": [ @@ -4272,7 +4361,13 @@ "type": "zip", "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.1 || ^8.0" @@ -4314,44 +4409,38 @@ "constructor", "instantiate" ], - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], "time": "2020-05-29T17:27:14+00:00" }, { "name": "facade/flare-client-php", - "version": "1.3.2", + "version": "1.3.5", "source": { "type": "git", "url": "https://github.com/facade/flare-client-php.git", - "reference": "db1e03426e7f9472c9ecd1092aff00f56aa6c004" + "reference": "25907a113bfc212a38d458ae365bfb902b4e7fb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/db1e03426e7f9472c9ecd1092aff00f56aa6c004", - "reference": "db1e03426e7f9472c9ecd1092aff00f56aa6c004", - "shasum": "" + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/25907a113bfc212a38d458ae365bfb902b4e7fb8", + "reference": "25907a113bfc212a38d458ae365bfb902b4e7fb8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "facade/ignition-contracts": "~1.0", - "illuminate/pipeline": "^5.5|^6.0|^7.0", + "illuminate/pipeline": "^5.5|^6.0|^7.0|^8.0", "php": "^7.1", "symfony/http-foundation": "^3.3|^4.1|^5.0", + "symfony/mime": "^3.4|^4.0|^5.1", "symfony/var-dumper": "^3.4|^4.0|^5.0" }, "require-dev": { + "friendsofphp/php-cs-fixer": "^2.14", "larapack/dd": "^1.1", "phpunit/phpunit": "^7.5.16", "spatie/phpunit-snapshot-assertions": "^2.0" @@ -4382,27 +4471,27 @@ "flare", "reporting" ], - "funding": [ - { - "url": "https://www.patreon.com/spatie", - "type": "patreon" - } - ], - "time": "2020-03-02T15:52:04+00:00" + "time": "2020-08-26T18:06:23+00:00" }, { "name": "facade/ignition", - "version": "2.0.7", + "version": "2.3.6", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "e6bedc1e74507d584fbcb041ebe0f7f215109cf2" + "reference": "d7d05dba5a0bdbf018a2cb7be268f22f5d73eb81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/e6bedc1e74507d584fbcb041ebe0f7f215109cf2", - "reference": "e6bedc1e74507d584fbcb041ebe0f7f215109cf2", - "shasum": "" + "url": "https://api.github.com/repos/facade/ignition/zipball/d7d05dba5a0bdbf018a2cb7be268f22f5d73eb81", + "reference": "d7d05dba5a0bdbf018a2cb7be268f22f5d73eb81", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-json": "*", @@ -4420,7 +4509,8 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^2.14", "mockery/mockery": "^1.3", - "orchestra/testbench": "5.0" + "orchestra/testbench": "5.0", + "psalm/plugin-laravel": "^1.2" }, "suggest": { "laravel/telescope": "^3.1" @@ -4459,25 +4549,36 @@ "laravel", "page" ], - "time": "2020-06-08T09:14:08+00:00" + "time": "2020-08-10T13:50:38+00:00" }, { "name": "facade/ignition-contracts", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/facade/ignition-contracts.git", - "reference": "f445db0fb86f48e205787b2592840dd9c80ded28" + "reference": "aeab1ce8b68b188a43e81758e750151ad7da796b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/f445db0fb86f48e205787b2592840dd9c80ded28", - "reference": "f445db0fb86f48e205787b2592840dd9c80ded28", - "shasum": "" + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/aeab1ce8b68b188a43e81758e750151ad7da796b", + "reference": "aeab1ce8b68b188a43e81758e750151ad7da796b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.1" }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.14", + "phpunit/phpunit": "^7.5|^8.0", + "vimeo/psalm": "^3.12" + }, "type": "library", "autoload": { "psr-4": { @@ -4503,7 +4604,7 @@ "flare", "ignition" ], - "time": "2019-08-30T14:06:08+00:00" + "time": "2020-07-14T10:10:28+00:00" }, { "name": "filp/whoops", @@ -4517,7 +4618,13 @@ "type": "zip", "url": "https://api.github.com/repos/filp/whoops/zipball/5d5fe9bb3d656b514d455645b3addc5f7ba7714d", "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^5.5.9 || ^7.0", @@ -4578,7 +4685,13 @@ "type": "zip", "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f", "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^5.3.3 || ^7.0" @@ -4618,20 +4731,26 @@ }, { "name": "hamcrest/hamcrest-php", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", - "shasum": "" + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { - "php": "^5.3|^7.0" + "php": "^5.3|^7.0|^8.0" }, "replace": { "cordoval/hamcrest-php": "*", @@ -4639,14 +4758,13 @@ "kodova/hamcrest-php": "*" }, "require-dev": { - "phpunit/php-file-iterator": "1.3.3", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "^1.0" + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -4656,43 +4774,46 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD" + "BSD-3-Clause" ], "description": "This is the PHP port of Hamcrest Matchers", "keywords": [ "test" ], - "time": "2016-01-20T08:20:44+00:00" + "time": "2020-07-09T08:09:16+00:00" }, { "name": "mockery/mockery", - "version": "1.4.0", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "6c6a7c533469873deacf998237e7649fc6b36223" + "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/6c6a7c533469873deacf998237e7649fc6b36223", - "reference": "6c6a7c533469873deacf998237e7649fc6b36223", - "shasum": "" + "url": "https://api.github.com/repos/mockery/mockery/zipball/60fa2f67f6e4d3634bb4a45ff3171fa52215800d", + "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { - "hamcrest/hamcrest-php": "~2.0", + "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": "^7.3.0" - }, - "conflict": { - "phpunit/phpunit": "<8.0" + "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "^8.0.0 || ^9.0.0" + "phpunit/phpunit": "^5.7.10|^6.5|^7.5|^8.5|^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -4730,24 +4851,30 @@ "test double", "testing" ], - "time": "2020-05-19T14:25:16+00:00" + "time": "2020-08-11T18:10:21+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.5", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", - "shasum": "" + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "replace": { "myclabs/deep-copy": "self.version" @@ -4778,7 +4905,7 @@ "object", "object graph" ], - "time": "2020-01-17T21:11:47+00:00" + "time": "2020-06-29T13:22:24+00:00" }, { "name": "nunomaduro/collision", @@ -4792,7 +4919,13 @@ "type": "zip", "url": "https://api.github.com/repos/nunomaduro/collision/zipball/d50490417eded97be300a92cd7df7badc37a9018", "reference": "d50490417eded97be300a92cd7df7badc37a9018", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "facade/ignition-contracts": "^1.0", @@ -4848,20 +4981,6 @@ "php", "symfony" ], - "funding": [ - { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", - "type": "custom" - }, - { - "url": "https://github.com/nunomaduro", - "type": "github" - }, - { - "url": "https://www.patreon.com/nunomaduro", - "type": "patreon" - } - ], "time": "2020-04-04T19:56:08+00:00" }, { @@ -4876,7 +4995,13 @@ "type": "zip", "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-dom": "*", @@ -4931,7 +5056,13 @@ "type": "zip", "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^5.6 || ^7.0" @@ -4968,25 +5099,31 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.1.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", - "shasum": "" + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { - "php": ">=7.1" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -5013,32 +5150,37 @@ "reflection", "static analysis" ], - "time": "2020-04-27T09:25:28+00:00" + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.1.0", + "version": "5.2.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" + "reference": "d870572532cd70bc3fab58f2e23ad423c8404c44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "shasum": "" + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d870572532cd70bc3fab58f2e23ad423c8404c44", + "reference": "d870572532cd70bc3fab58f2e23ad423c8404c44", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { - "ext-filter": "^7.1", - "php": "^7.2", - "phpdocumentor/reflection-common": "^2.0", - "phpdocumentor/type-resolver": "^1.0", - "webmozart/assert": "^1" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "^1", - "mockery/mockery": "^1" + "mockery/mockery": "~1.3.2" }, "type": "library", "extra": { @@ -5066,34 +5208,39 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-02-22T12:28:44+00:00" + "time": "2020-08-15T11:14:08+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.1.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" + "reference": "e878a14a65245fbe78f8080eba03b47c3b705651" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", - "shasum": "" + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651", + "reference": "e878a14a65245fbe78f8080eba03b47c3b705651", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.2", - "mockery/mockery": "~1" + "ext-tokenizer": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -5112,37 +5259,43 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-02-18T18:59:58+00:00" + "time": "2020-06-27T10:12:23+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.10.3", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" + "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", - "shasum": "" + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160", + "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2", + "phpdocumentor/reflection-docblock": "^5.0", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { @@ -5175,7 +5328,7 @@ "spy", "stub" ], - "time": "2020-03-05T15:02:03+00:00" + "time": "2020-07-08T12:44:21+00:00" }, { "name": "phpunit/php-code-coverage", @@ -5189,7 +5342,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-dom": "*", @@ -5252,7 +5411,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", "reference": "050bedf145a257b1ff02746c31894800e5122946", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.1" @@ -5302,7 +5467,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.3.3" @@ -5343,7 +5514,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.1" @@ -5392,7 +5569,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-tokenizer": "*", @@ -5431,17 +5614,23 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.6", + "version": "8.5.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348" + "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348", - "reference": "3f9c4079d1407cd84c51c02c6ad1df6ec2ed1348", - "shasum": "" + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34c18baa6a44f1d1fbf0338907139e9dce95b997", + "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "doctrine/instantiator": "^1.2.0", @@ -5510,31 +5699,27 @@ "testing", "xunit" ], - "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-06-15T10:45:47+00:00" + "time": "2020-06-22T07:06:58+00:00" }, { "name": "scrivo/highlight.php", - "version": "v9.18.1.1", + "version": "v9.18.1.2", "source": { "type": "git", "url": "https://github.com/scrivo/highlight.php.git", - "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558" + "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/52fc21c99fd888e33aed4879e55a3646f8d40558", - "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558", - "shasum": "" + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/efb6e445494a9458aa59b0af5edfa4bdcc6809d9", + "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-json": "*", @@ -5589,13 +5774,7 @@ "highlight.php", "syntax" ], - "funding": [ - { - "url": "https://github.com/allejo", - "type": "github" - } - ], - "time": "2020-03-02T05:59:21+00:00" + "time": "2020-08-27T03:24:44+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -5609,7 +5788,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^5.6 || ^7.0" @@ -5654,7 +5839,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.1", @@ -5718,7 +5909,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.1" @@ -5774,7 +5971,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.1" @@ -5827,7 +6030,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.0", @@ -5894,7 +6103,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.2", @@ -5948,7 +6163,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.0", @@ -5995,7 +6216,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", "reference": "773f97c67f28de00d397be301821b06708fca0be", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.0" @@ -6040,7 +6267,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.0" @@ -6093,7 +6326,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.1" @@ -6135,7 +6374,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": "^7.2" @@ -6181,7 +6426,13 @@ "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "php": ">=5.6" @@ -6214,23 +6465,29 @@ }, { "name": "theseer/tokenizer", - "version": "1.1.3", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "reference": "75a63c33a8577608444246075ea0af0d052e452a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "shasum": "" + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -6250,24 +6507,30 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" + "time": "2020-07-12T23:59:07+00:00" }, { "name": "webmozart/assert", - "version": "1.9.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "9dc4f203e36f2b486149058bade43c851dd97451" + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/9dc4f203e36f2b486149058bade43c851dd97451", - "reference": "9dc4f203e36f2b486149058bade43c851dd97451", - "shasum": "" + "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] }, "require": { - "php": "^5.3.3 || ^7.0", + "php": "^5.3.3 || ^7.0 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -6299,7 +6562,7 @@ "check", "validate" ], - "time": "2020-06-16T10:16:42+00:00" + "time": "2020-07-08T17:02:28+00:00" } ], "aliases": [], @@ -6310,6 +6573,5 @@ "platform": { "php": "^7.2.5" }, - "platform-dev": [], - "plugin-api-version": "1.1.0" + "platform-dev": [] } diff --git a/serverless.component.yml b/serverless.component.yml index 555e168..5d733f2 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: 0.0.8 +version: 0.0.9 author: 'Tencent Cloud, Inc' org: 'Tencent Cloud, Inc' description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. diff --git a/src/serverless.js b/src/serverless.js index 03016ca..946563a 100644 --- a/src/serverless.js +++ b/src/serverless.js @@ -1,7 +1,7 @@ const { Component } = require('@serverless/core') -const { MultiApigw, Scf, Apigw, Cns } = require('tencent-component-toolkit') +const { Scf, Apigw, Cns, Cam } = require('tencent-component-toolkit') const { TypeError } = require('tencent-component-toolkit/src/utils/error') -const { uploadCodeToCos, getDefaultProtocol, deleteRecord, prepareInputs } = require('./utils') +const { uploadCodeToCos, getDefaultProtocol, prepareInputs, deepClone } = require('./utils') const CONFIGS = require('./config') class ServerlessComponent extends Component { @@ -27,134 +27,153 @@ class ServerlessComponent extends Component { } async deployFunction(credentials, inputs, regionList) { - const uploadCodeHandler = [] + if (!inputs.role) { + try { + const camClient = new Cam(credentials) + const roleExist = await camClient.CheckSCFExcuteRole() + if (roleExist) { + inputs.role = 'QCS_SCFExcuteRole' + } + } catch (e) { + // no op + } + } + const outputs = {} const appId = this.getAppId() - for (let eveRegionIndex = 0; eveRegionIndex < regionList.length; eveRegionIndex++) { - const curRegion = regionList[eveRegionIndex] - const funcDeployer = async () => { - const code = await uploadCodeToCos(this, appId, credentials, inputs, curRegion) - const scf = new Scf(credentials, curRegion) - const tempInputs = { - ...inputs, - code - } - const scfOutput = await scf.deploy(tempInputs) - outputs[curRegion] = { - functionName: scfOutput.FunctionName, - runtime: scfOutput.Runtime, - namespace: scfOutput.Namespace - } + const funcDeployer = async (curRegion) => { + const code = await uploadCodeToCos(this, appId, credentials, inputs, curRegion) + const scf = new Scf(credentials, curRegion) + const tempInputs = { + ...inputs, + code + } + const scfOutput = await scf.deploy(deepClone(tempInputs)) + outputs[curRegion] = { + functionName: scfOutput.FunctionName, + runtime: scfOutput.Runtime, + namespace: scfOutput.Namespace + } - this.state[curRegion] = { - ...(this.state[curRegion] ? this.state[curRegion] : {}), - ...outputs[curRegion] - } - // default version is $LATEST - outputs[curRegion].lastVersion = scfOutput.LastVersion - ? scfOutput.LastVersion - : this.state.lastVersion || '$LATEST' - - // default traffic is 1.0, it can also be 0, so we should compare to undefined - outputs[curRegion].traffic = - scfOutput.Traffic !== undefined - ? scfOutput.Traffic - : this.state.traffic !== undefined - ? this.state.traffic - : 1 - - if (outputs[curRegion].traffic !== 1 && scfOutput.ConfigTrafficVersion) { - outputs[curRegion].configTrafficVersion = scfOutput.ConfigTrafficVersion - this.state.configTrafficVersion = scfOutput.ConfigTrafficVersion - } + this.state[curRegion] = { + ...(this.state[curRegion] ? this.state[curRegion] : {}), + ...outputs[curRegion] + } - this.state.lastVersion = outputs[curRegion].lastVersion - this.state.traffic = outputs[curRegion].traffic + // default version is $LATEST + outputs[curRegion].lastVersion = scfOutput.LastVersion + ? scfOutput.LastVersion + : this.state.lastVersion || '$LATEST' + + // default traffic is 1.0, it can also be 0, so we should compare to undefined + outputs[curRegion].traffic = + scfOutput.Traffic !== undefined + ? scfOutput.Traffic + : this.state.traffic !== undefined + ? this.state.traffic + : 1 + + if (outputs[curRegion].traffic !== 1 && scfOutput.ConfigTrafficVersion) { + outputs[curRegion].configTrafficVersion = scfOutput.ConfigTrafficVersion + this.state.configTrafficVersion = scfOutput.ConfigTrafficVersion } - uploadCodeHandler.push(funcDeployer()) + + this.state.lastVersion = outputs[curRegion].lastVersion + this.state.traffic = outputs[curRegion].traffic + } + + for (let i = 0; i < regionList.length; i++) { + const curRegion = regionList[i] + await funcDeployer(curRegion) } - await Promise.all(uploadCodeHandler) this.save() return outputs } + // try to add dns record + async tryToAddDnsRecord(credentials, customDomains) { + try { + const cns = new Cns(credentials) + for (let i = 0; i < customDomains.length; i++) { + const item = customDomains[i] + if (item.domainPrefix) { + await cns.deploy({ + domain: item.subDomain.replace(`${item.domainPrefix}.`, ''), + records: [ + { + subDomain: item.domainPrefix, + recordType: 'CNAME', + recordLine: '默认', + value: item.cname, + ttl: 600, + mx: 10, + status: 'enable' + } + ] + }) + } + } + } catch (e) { + console.log('METHOD_tryToAddDnsRecord', e.message) + } + } + async deployApigateway(credentials, inputs, regionList) { if (inputs.isDisabled) { return {} } - const apigw = new MultiApigw(credentials, regionList) - const oldState = this.state[regionList[0]] || {} - inputs.oldState = { - apiList: oldState.apiList || [], - customDomains: oldState.customDomains || [] + + const getServiceId = (instance, region) => { + const regionState = instance.state[region] + return inputs.serviceId || (regionState && regionState.serviceId) } - const apigwOutputs = await apigw.deploy(inputs) - const outputs = {} - Object.keys(apigwOutputs).forEach((curRegion) => { - const curOutput = apigwOutputs[curRegion] - outputs[curRegion] = { - serviceId: curOutput.serviceId, - subDomain: curOutput.subDomain, - environment: curOutput.environment, - url: `${getDefaultProtocol(inputs.protocols)}://${curOutput.subDomain}/${ - curOutput.environment - }/` - } - if (curOutput.customDomains) { - outputs[curRegion].customDomains = curOutput.customDomains - } - this.state[curRegion] = { - created: curOutput.created, - ...(this.state[curRegion] ? this.state[curRegion] : {}), - ...outputs[curRegion], - apiList: curOutput.apiList - } - }) - this.save() - return outputs - } - async deployCns(credentials, inputs, regionList, apigwOutputs) { - const cns = new Cns(credentials) - const cnsRegion = {} + const deployTasks = [] + const outputs = {} regionList.forEach((curRegion) => { - const curApigwOutput = apigwOutputs[curRegion] - cnsRegion[curRegion] = curApigwOutput.subDomain - }) + const apigwDeployer = async () => { + const apigw = new Apigw(credentials, curRegion) - const state = [] - const outputs = {} - const tempJson = {} - for (let i = 0; i < inputs.length; i++) { - const curCns = inputs[i] - for (let j = 0; j < curCns.records.length; j++) { - curCns.records[j].value = - cnsRegion[curCns.records[j].value.replace('temp_value_about_', '')] - } - const tencentCnsOutputs = await cns.deploy(curCns) - outputs[curCns.domain] = tencentCnsOutputs.DNS - ? tencentCnsOutputs.DNS - : 'The domain name has already been added.' - tencentCnsOutputs.domain = curCns.domain - state.push(tencentCnsOutputs) - } + const oldState = this.state[curRegion] || {} + const apigwInputs = { + ...inputs, + oldState: { + apiList: oldState.apiList || [], + customDomains: oldState.customDomains || [] + } + } + // different region deployment has different service id + apigwInputs.serviceId = getServiceId(this, curRegion) + const apigwOutput = await apigw.deploy(deepClone(apigwInputs)) + outputs[curRegion] = { + serviceId: apigwOutput.serviceId, + subDomain: apigwOutput.subDomain, + environment: apigwOutput.environment, + url: `${getDefaultProtocol(inputs.protocols)}://${apigwOutput.subDomain}/${ + apigwOutput.environment + }/` + } - // 删除serverless创建的但是不在本次列表中 - try { - for (let i = 0; i < state.length; i++) { - tempJson[state[i].domain] = state[i].records - } - const recordHistory = this.state.cns || [] - for (let i = 0; i < recordHistory.length; i++) { - const delList = deleteRecord(tempJson[recordHistory[i].domain], recordHistory[i].records) - if (delList && delList.length > 0) { - await cns.remove({ deleteList: delList }) + if (apigwOutput.customDomains) { + // TODO: need confirm add cns authentication + if (inputs.autoAddDnsRecord === true) { + // await this.tryToAddDnsRecord(credentials, apigwOutput.customDomains) + } + outputs[curRegion].customDomains = apigwOutput.customDomains + } + this.state[curRegion] = { + created: true, + ...(this.state[curRegion] ? this.state[curRegion] : {}), + ...outputs[curRegion], + apiList: apigwOutput.apiList } } - } catch (e) {} + deployTasks.push(apigwDeployer()) + }) + + await Promise.all(deployTasks) - this.state['cns'] = state this.save() return outputs } @@ -165,7 +184,7 @@ class ServerlessComponent extends Component { const credentials = this.getCredentials() // 对Inputs内容进行标准化 - const { regionList, functionConf, apigatewayConf, cnsConf } = await prepareInputs( + const { regionList, functionConf, apigatewayConf } = await prepareInputs( this, credentials, inputs @@ -197,11 +216,6 @@ class ServerlessComponent extends Component { outputs['scf'] = functionOutputs } - // cns depends on apigw, so if disabled apigw, just ignore it. - if (cnsConf.length > 0 && apigatewayConf.isDisabled !== true) { - outputs['cns'] = await this.deployCns(credentials, cnsConf, regionList, apigwOutputs) - } - this.state.region = regionList[0] this.state.regionList = regionList this.state.lambdaArn = functionConf.name diff --git a/src/utils.js b/src/utils.js index 095ec8e..ef8aa9f 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,6 +1,6 @@ const path = require('path') const fs = require('fs') -const { Domain, Cos } = require('tencent-component-toolkit') +const { Cos } = require('tencent-component-toolkit') const ensureObject = require('type/object/ensure') const ensureIterable = require('type/iterable/ensure') const ensureString = require('type/string/ensure') @@ -16,10 +16,45 @@ const generateId = () => .toString(36) .substring(6) +const deepClone = (obj) => { + return JSON.parse(JSON.stringify(obj)) +} + const getType = (obj) => { return Object.prototype.toString.call(obj).slice(8, -1) } +const mergeJson = (sourceJson, targetJson) => { + Object.entries(sourceJson).forEach(([key, val]) => { + targetJson[key] = deepClone(val) + }) + return targetJson +} + +const capitalString = (str) => { + if (str.length < 2) { + return str.toUpperCase() + } + + return `${str[0].toUpperCase()}${str.slice(1)}` +} + +const getDefaultProtocol = (protocols) => { + return String(protocols).includes('https') ? 'https' : 'http' +} + +const getDefaultFunctionName = () => { + return `${CONFIGS.compName}_component_${generateId()}` +} + +const getDefaultServiceName = () => { + return 'serverless' +} + +const getDefaultServiceDescription = () => { + return 'Created by Serverless Component' +} + const validateTraffic = (num) => { if (getType(num) !== 'Number') { throw new TypeError( @@ -118,10 +153,16 @@ const uploadCodeToCos = async (instance, appId, credentials, inputs, region) => object: objectName, method: 'PUT' }) - const shimFiles = await getDirFiles(path.join(__dirname, '_shims')) + // if shims and sls sdk entries had been injected to zipPath, no need to injected again console.log(`Uploading code to bucket ${bucketName}`) - await instance.uploadSourceZipToCOS(zipPath, uploadUrl, shimFiles, {}) + if (instance.codeInjected === true) { + await instance.uploadSourceZipToCOS(zipPath, uploadUrl, {}, {}) + } else { + const shimFiles = await getDirFiles(path.join(__dirname, '_shims')) + await instance.uploadSourceZipToCOS(zipPath, uploadUrl, shimFiles, {}) + instance.codeInjected = true + } console.log(`Upload ${objectName} to bucket ${bucketName} success`) } } @@ -136,69 +177,6 @@ const uploadCodeToCos = async (instance, appId, credentials, inputs, region) => } } -const mergeJson = (sourceJson, targetJson) => { - for (const eveKey in sourceJson) { - if (targetJson.hasOwnProperty(eveKey)) { - if (['protocols', 'endpoints', 'customDomain'].indexOf(eveKey) != -1) { - for (let i = 0; i < sourceJson[eveKey].length; i++) { - const sourceEvents = JSON.stringify(sourceJson[eveKey][i]) - const targetEvents = JSON.stringify(targetJson[eveKey]) - if (targetEvents.indexOf(sourceEvents) == -1) { - targetJson[eveKey].push(sourceJson[eveKey][i]) - } - } - } else { - if (typeof sourceJson[eveKey] != 'string') { - mergeJson(sourceJson[eveKey], targetJson[eveKey]) - } else { - targetJson[eveKey] = sourceJson[eveKey] - } - } - } else { - targetJson[eveKey] = sourceJson[eveKey] - } - } - return targetJson -} - -const capitalString = (str) => { - if (str.length < 2) { - return str.toUpperCase() - } - - return `${str[0].toUpperCase()}${str.slice(1)}` -} - -const getDefaultProtocol = (protocols) => { - if (protocols.map((i) => i.toLowerCase()).includes('https')) { - return 'https' - } - return 'http' -} - -const deleteRecord = (newRecords, historyRcords) => { - const deleteList = [] - for (let i = 0; i < historyRcords.length; i++) { - let temp = false - for (let j = 0; j < newRecords.length; j++) { - if ( - newRecords[j].domain == historyRcords[i].domain && - newRecords[j].subDomain == historyRcords[i].subDomain && - newRecords[j].recordType == historyRcords[i].recordType && - newRecords[j].value == historyRcords[i].value && - newRecords[j].recordLine == historyRcords[i].recordLine - ) { - temp = true - break - } - } - if (!temp) { - deleteList.push(historyRcords[i]) - } - } - return deleteList -} - const prepareInputs = async (instance, credentials, inputs = {}) => { // 对function inputs进行标准化 const tempFunctionConf = inputs.functionConf ? inputs.functionConf : {} @@ -212,9 +190,6 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { // chenck state function name const stateFunctionName = instance.state[regionList[0]] && instance.state[regionList[0]].functionName - // check state service id - const stateServiceId = instance.state[regionList[0]] && instance.state[regionList[0]].serviceId - const functionConf = { code: { src: inputs.src, @@ -224,7 +199,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { name: ensureString(inputs.functionName, { isOptional: true }) || stateFunctionName || - `${CONFIGS.compName}_component_${generateId()}`, + getDefaultFunctionName(), region: regionList, role: ensureString(tempFunctionConf.role ? tempFunctionConf.role : inputs.role, { default: '' @@ -256,7 +231,12 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { traffic: inputs.traffic, lastVersion: instance.state.lastVersion, eip: tempFunctionConf.eip === true, - l5Enable: tempFunctionConf.l5Enable === true + l5Enable: tempFunctionConf.l5Enable === true, + timeout: tempFunctionConf.timeout ? tempFunctionConf.timeout : CONFIGS.timeout, + memorySize: tempFunctionConf.memorySize ? tempFunctionConf.memorySize : CONFIGS.memorySize, + tags: ensureObject(tempFunctionConf.tags ? tempFunctionConf.tags : inputs.tag, { + default: null + }) } // validate traffic @@ -265,73 +245,55 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { } functionConf.needSetTraffic = inputs.traffic !== undefined && functionConf.lastVersion - functionConf.tags = ensureObject(tempFunctionConf.tags ? tempFunctionConf.tags : inputs.tag, { - default: null - }) - - if (inputs.functionConf) { - functionConf.timeout = inputs.functionConf.timeout - ? inputs.functionConf.timeout - : CONFIGS.timeout - functionConf.memorySize = inputs.functionConf.memorySize - ? inputs.functionConf.memorySize - : CONFIGS.memorySize - if (inputs.functionConf.environment) { - functionConf.environment = inputs.functionConf.environment - } - if (inputs.functionConf.vpcConfig) { - functionConf.vpcConfig = inputs.functionConf.vpcConfig - } + if (tempFunctionConf.environment) { + functionConf.environment = inputs.functionConf.environment + } + if (tempFunctionConf.vpcConfig) { + functionConf.vpcConfig = inputs.functionConf.vpcConfig } // 对apigw inputs进行标准化 - const apigatewayConf = inputs.apigatewayConf ? inputs.apigatewayConf : {} - apigatewayConf.isDisabled = apigatewayConf.isDisabled === true - apigatewayConf.fromClientRemark = fromClientRemark - apigatewayConf.serviceName = inputs.serviceName - apigatewayConf.description = `Serverless Framework Tencent-${capitalString( - CONFIGS.compName - )} Component` - apigatewayConf.serviceId = inputs.serviceId || stateServiceId - apigatewayConf.region = functionConf.region - apigatewayConf.protocols = apigatewayConf.protocols || ['http'] - apigatewayConf.environment = apigatewayConf.environment ? apigatewayConf.environment : 'release' - apigatewayConf.endpoints = [ - { - path: '/', - enableCORS: apigatewayConf.enableCORS, - serviceTimeout: apigatewayConf.serviceTimeout, - method: 'ANY', - function: { - isIntegratedResponse: apigatewayConf.isIntegratedResponse === false ? false : true, - functionName: functionConf.name, - functionNamespace: functionConf.namespace, - functionQualifier: functionConf.needSetTraffic ? '$DEFAULT' : '$LATEST' + const tempApigwConf = inputs.apigatewayConf ? inputs.apigatewayConf : {} + const apigatewayConf = { + serviceId: inputs.serviceId, + region: regionList, + isDisabled: tempApigwConf.isDisabled === true, + fromClientRemark: fromClientRemark, + serviceName: inputs.serviceName || getDefaultServiceName(instance), + description: getDefaultServiceDescription(instance), + protocols: tempApigwConf.protocols || ['http'], + environment: tempApigwConf.environment ? tempApigwConf.environment : 'release', + endpoints: [ + { + path: '/', + enableCORS: tempApigwConf.enableCORS, + serviceTimeout: tempApigwConf.serviceTimeout, + method: 'ANY', + function: { + isIntegratedResponse: true, + functionName: functionConf.name, + functionNamespace: functionConf.namespace + } } - } - ] - if (apigatewayConf.usagePlan) { + ], + customDomains: tempApigwConf.customDomains || [] + } + if (tempApigwConf.usagePlan) { apigatewayConf.endpoints[0].usagePlan = { - usagePlanId: apigatewayConf.usagePlan.usagePlanId, - usagePlanName: apigatewayConf.usagePlan.usagePlanName, - usagePlanDesc: apigatewayConf.usagePlan.usagePlanDesc, - maxRequestNum: apigatewayConf.usagePlan.maxRequestNum + usagePlanId: tempApigwConf.usagePlan.usagePlanId, + usagePlanName: tempApigwConf.usagePlan.usagePlanName, + usagePlanDesc: tempApigwConf.usagePlan.usagePlanDesc, + maxRequestNum: tempApigwConf.usagePlan.maxRequestNum } } - if (apigatewayConf.auth) { + if (tempApigwConf.auth) { apigatewayConf.endpoints[0].auth = { - secretName: apigatewayConf.auth.secretName, - secretIds: apigatewayConf.auth.secretIds + secretName: tempApigwConf.auth.secretName, + secretIds: tempApigwConf.auth.secretIds } } - // 对cns inputs进行标准化 - const tempCnsConf = {} - const tempCnsBaseConf = inputs.cloudDNSConf ? inputs.cloudDNSConf : {} - - // 分地域处理functionConf/apigatewayConf/cnsConf - for (let i = 0; i < functionConf.region.length; i++) { - const curRegion = functionConf.region[i] + regionList.forEach((curRegion) => { const curRegionConf = inputs[curRegion] if (curRegionConf && curRegionConf.functionConf) { functionConf[curRegion] = curRegionConf.functionConf @@ -339,62 +301,21 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { if (curRegionConf && curRegionConf.apigatewayConf) { apigatewayConf[curRegion] = curRegionConf.apigatewayConf } - - const tempRegionCnsConf = mergeJson( - tempCnsBaseConf, - curRegionConf && curRegionConf.cloudDNSConf ? curRegionConf.cloudDNSConf : {} - ) - - tempCnsConf[functionConf.region[i]] = { - recordType: 'CNAME', - recordLine: tempRegionCnsConf.recordLine ? tempRegionCnsConf.recordLine : undefined, - ttl: tempRegionCnsConf.ttl, - mx: tempRegionCnsConf.mx, - status: tempRegionCnsConf.status ? tempRegionCnsConf.status : 'enable' - } - } - - const cnsConf = [] - // 对cns inputs进行检查和赋值 - if (apigatewayConf.customDomain && apigatewayConf.customDomain.length > 0) { - const domain = new Domain(credentials) - for (let domianNum = 0; domianNum < apigatewayConf.customDomain.length; domianNum++) { - const domainData = await domain.check(apigatewayConf.customDomain[domianNum].domain) - const tempInputs = { - domain: domainData.domain, - records: [] - } - for (let eveRecordNum = 0; eveRecordNum < functionConf.region.length; eveRecordNum++) { - if (tempCnsConf[functionConf.region[eveRecordNum]].recordLine) { - tempInputs.records.push({ - subDomain: domainData.subDomain || '@', - recordType: 'CNAME', - recordLine: tempCnsConf[functionConf.region[eveRecordNum]].recordLine, - value: `temp_value_about_${functionConf.region[eveRecordNum]}`, - ttl: tempCnsConf[functionConf.region[eveRecordNum]].ttl, - mx: tempCnsConf[functionConf.region[eveRecordNum]].mx, - status: tempCnsConf[functionConf.region[eveRecordNum]].status || 'enable' - }) - } - } - cnsConf.push(tempInputs) - } - } + }) return { regionList, functionConf, - apigatewayConf, - cnsConf + apigatewayConf } } module.exports = { + deepClone, generateId, uploadCodeToCos, mergeJson, capitalString, getDefaultProtocol, - deleteRecord, prepareInputs } From e9ba3471c718aad5f665c600c266c9c0b36f9d86 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 7 Sep 2020 07:28:24 +0000 Subject: [PATCH 37/54] chore(release): version 0.0.8 ## [0.0.8](https://github.com/serverless-components/tencent-laravel/compare/v0.0.7...v0.0.8) (2020-09-07) ### Bug Fixes * update deploy flow for multi region ([b63c58e](https://github.com/serverless-components/tencent-laravel/commit/b63c58e6ba06597cd18dee4e963404f28b062ba3)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5818fa2..825596d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.0.8](https://github.com/serverless-components/tencent-laravel/compare/v0.0.7...v0.0.8) (2020-09-07) + + +### Bug Fixes + +* update deploy flow for multi region ([b63c58e](https://github.com/serverless-components/tencent-laravel/commit/b63c58e6ba06597cd18dee4e963404f28b062ba3)) + ## [0.0.7](https://github.com/serverless-components/tencent-laravel/compare/v0.0.6...v0.0.7) (2020-09-04) From eb2f187b178d4ea5cc37ba2e79863df782e6600d Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 4 Dec 2020 10:22:16 +0800 Subject: [PATCH 38/54] docs: update configure --- docs/configure.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index e178849..0495922 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -16,17 +16,12 @@ inputs: functionName: laravelDemo # 云函数名称 serviceName: mytest # api网关服务名称 runtime: Php7 # 运行环境 - serviceId: service-np1uloxw # api网关服务ID - src: ./src # 第一种为string时,会打包src对应目录下的代码上传到默认cos上。 - # src: # 第二种,部署src下的文件代码,并打包成zip上传到bucket上 - # src: ./src # 本地需要打包的文件目录 - # bucket: bucket01 # bucket name,当前会默认在bucket name后增加 appid 后缀, 本例中为 bucket01-appid - # exclude: # 被排除的文件或目录 - # - .env - # - node_modules - # src: # 第三种,在指定存储桶bucket中已经存在了object代码,直接部署 - # bucket: bucket01 # bucket name,当前会默认在bucket name后增加 appid 后缀, 本例中为 bucket01-appid - # object: cos.zip # bucket key 指定存储桶内的文件 + src: # 第二种,部署src下的文件代码,并打包成zip上传到bucket上 + src: ./src # 本地需要打包的文件目录 + # bucket: bucket01 # bucket name,存储桶名称 + # object: cos.zip # bucket key 指定存储桶内的文件 + exclude: # 被排除的文件或目录 + - .env layers: - name: layerName # layer名称 version: 1 # 版本 From 9670f55e521b15886297b99d8d89d5fe10a90cac Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 4 Dec 2020 10:53:33 +0800 Subject: [PATCH 39/54] feat: support no migration deploy --- README.md | 134 ++++++++++-------- .../index.test.js | 23 ++- {tests => __tests__/lib}/utils.js | 0 example/.env.example | 15 -- example/bootstrap/app.php | 2 - example/serverless.yml | 7 +- jest.config.js | 14 ++ package.json | 3 +- serverless.component.yml | 2 +- src/config.js | 8 +- src/utils.js | 19 ++- 11 files changed, 126 insertions(+), 101 deletions(-) rename tests/integration.test.js => __tests__/index.test.js (66%) rename {tests => __tests__/lib}/utils.js (100%) create mode 100644 jest.config.js diff --git a/README.md b/README.md index dd5e0a6..76b226e 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,71 @@ [![Serverless PHP Laravel Tencent Cloud](https://img.serverlesscloud.cn/20191226/1577347087676-website_%E9%95%BF.png)](http://serverless.com) -# 腾讯云 Laravel Serverless Component - -## 简介 +
腾讯云 [Laravel](https://github.com/laravel/laravel) Serverless Component, 支持 `Laravel >= 6.0`。 -## 目录 +
-0. [准备](#0-准备) -1. [安装](#1-安装) -1. [配置](#2-配置) -1. [部署](#3-部署) -1. [移除](#4-移除) +特性介绍: -### 0. 准备 +- [x] **按需付费** - 按照请求的使用量进行收费,没有请求时无需付费 +- [x] **"0"配置** - 只需要关心项目代码,之后部署即可,Serverless Framework 会搞定所有配置。 +- [x] **极速部署** - 仅需几秒,部署你的整个 laravel 应用。 +- [x] **便捷协作** - 通过云端的状态信息和部署日志,方便的进行多人协作开发。 +- [x] **自定义域名** - 支持配置自定义域名及 HTTPS 访问 -#### 初始化 Laravel 项目 +
-在使用此组件之前,你需要先自己初始化一个 `laravel` 项目 +快速开始: -```bash -composer create-project --prefer-dist laravel/laravel serverless-laravel -``` +1. [**安装**](#1-安装) +2. [**创建**](#2-创建) +3. [**部署**](#3-部署) +4. [**配置**](#4-配置) +5. [**查看状态**](#5-查看状态) +6. [**移除**](#6-移除) -> 注意:Laravel 使用 Coposer 管理依赖的,所以你需要先自行安装 Composer,请参考 [官方安装文档](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos) +更多资源: -#### 修改 Laravel 项目 +- [**架构说明**](#架构说明) +- [**账号配置**](#账号配置) -由于云函数在执行时,只有 `/tmp` 可读写的,所以我们需要将 `laravel` 框架运行时的 `storage` 目录写到该目录下,为此需要修改 `bootstrap/app.php` 文件,在 `$app = new Illuminate\Foundation\Application` 后添加: +  -```php -$app->useStoragePath(env('APP_STORAGE', '/tmp')); -``` +### 1. 安装 -然后在根目录下的 `.env` 文件中新增如下配置: +通过 npm 安装最新版本的 Serverless Framework -```dotenv -# 视图文件编译路径 -VIEW_COMPILED_PATH=/tmp/storage/framework/views +```bash +$ npm install -g serverless +``` -# 由于是无服务函数,所以没法存储 session 在硬盘上,如果不需要 sessions,可以使用 array -# 如果需要你可以将 session 存储到 cookie 或者数据库中 -SESSION_DRIVER=array +### 2. 创建 -# 建议将错误日志输出到控制台,方便云端去查看 -LOG_CHANNEL=stderr +通过如下命令和模板链接,快速创建一个 laravel 应用: -# 应用的 storage 目录必须为 /tmp -APP_STORAGE=/tmp +```bash +$ serverless init laravel-starter --name serverless-laravel +$ cd example ``` -### 1. 安装 +### 3. 部署 -通过 npm 全局安装 [serverless cli](https://github.com/serverless/serverless) +在 `serverless.yml` 文件所在的项目根目录,运行以下指令进行部署: ```bash -$ npm install -g serverless +$ serverless deploy ``` -### 2. 配置 +部署时需要进行身份验证,如您的账号未 [登陆](https://cloud.tencent.com/login) 或 [注册](https://cloud.tencent.com/register) 腾讯云,您可以直接通过 `微信` 扫描命令行中的二维码进行授权登陆和注册。 -在项目根目录,创建 `serverless.yml` 文件,在其中进行如下配置 +> 注意: 如果希望查看更多部署过程的信息,可以通过`serverless deploy --debug` 命令查看部署过程中的实时日志信息。 -```bash -$ touch serverless.yml -``` +### 4. 配置 + +laravel 组件支持 0 配置部署,也就是可以直接通过配置文件中的默认值进行部署。但你依然可以修改更多可选配置来进一步开发该 laravel 项目。 + +以下是 laravel 组件的 `serverless.yml`配置示例: ```yml # serverless.yml @@ -77,7 +77,9 @@ app: appDemo stage: dev inputs: - src: ./ + src: + src: ./ + functionName: laravelDemo region: ap-guangzhou runtime: Php7 apigatewayConf: @@ -87,50 +89,58 @@ inputs: environment: release ``` -- [更多配置](https://github.com/serverless-components/tencent-laravel/tree/master/docs/configure.md) +点此查看[全量配置及配置说明](https://github.com/serverless-components/tencent-laravel/tree/master/docs/configure.md) -### 3. 部署 +当你根据该配置文件更新配置字段后,再次运行 `serverless deploy` 或者 `serverless` 就可以更新配置到云端。 + +### 5. 查看状态 + +在`serverless.yml`文件所在的目录下,通过如下命令查看部署状态: -> 注意:**在部署前,你需要先清理本地运行的配置缓存,执行 `php artisan config:clear` 即可。** +``` +$ serverless info +``` -如您的账号未 [登陆](https://cloud.tencent.com/login) 或 [注册](https://cloud.tencent.com/register) 腾讯云,您可以直接通过 `微信` 扫描命令行中的二维码进行授权登陆和注册。 +### 6. 移除 -通过 `sls` 命令进行部署,并可以添加 `--debug` 参数查看部署过程中的信息 +在`serverless.yml`文件所在的目录下,通过以下命令移除部署的 laravel 服务。移除后该组件会对应删除云上部署时所创建的所有相关资源。 -```bash -$ sls deploy +``` +$ serverless remove ``` -> 注意: `sls` 是 `serverless` 命令的简写。 +和部署类似,支持通过 `serverless remove --debug` 命令查看移除过程中的实时日志信息。 -### 4. 移除 +## 架构说明 -通过以下命令移除部署的 Laravel 服务。 +laravel 组件将在腾讯云账户中使用到如下 Serverless 服务: -```bash -$ sls remove -``` +- [x] **API 网关** - API 网关将会接收外部请求并且转发到 SCF 云函数中。 +- [x] **SCF 云函数** - 云函数将承载 laravel.js 应用。 +- [x] **CAM 访问控制** - 该组件会创建默认 CAM 角色用于授权访问关联资源。 +- [x] **COS 对象存储** - 为确保上传速度和质量,云函数压缩并上传代码时,会默认将代码包存储在特定命名的 COS 桶中。 +- [x] **SSL 证书服务** - 如果你在 yaml 文件中配置了 `apigatewayConf.customDomains` 字段,需要做自定义域名绑定并开启 HTTPS 时,也会用到证书管理服务和域名服务。Serverless Framework 会根据已经备案的域名自动申请并配置 SSL 证书。 -### 账号配置(可选) +## 账号配置 当前默认支持 CLI 扫描二维码登录,如您希望配置持久的环境变量/秘钥信息,也可以本地创建 `.env` 文件 +```console +$ touch .env # 腾讯云的配置信息 +``` + 在 `.env` 文件中配置腾讯云的 SecretId 和 SecretKey 信息并保存 -如果没有腾讯云账号,可以在此 [注册新账号](https://cloud.tencent.com/register)。 +如果没有腾讯云账号,可以在此[注册新账号](https://cloud.tencent.com/register)。 -如果已有腾讯云账号,可以在 [API 密钥管理](https://console.cloud.tencent.com/cam/capi) 中获取 `SecretId` 和`SecretKey`. +如果已有腾讯云账号,可以在[API 密钥管理](https://console.cloud.tencent.com/cam/capi)中获取 `SecretId` 和`SecretKey`. -```text +``` # .env TENCENT_SECRET_ID=123 TENCENT_SECRET_KEY=123 ``` -### 更多组件 - -可以在 [Serverless Components](https://github.com/serverless/components/blob/master/README.cn.md) repo 中查询更多组件的信息。 - ## License MIT License diff --git a/tests/integration.test.js b/__tests__/index.test.js similarity index 66% rename from tests/integration.test.js rename to __tests__/index.test.js index 8bef758..107d93b 100644 --- a/tests/integration.test.js +++ b/__tests__/index.test.js @@ -1,16 +1,10 @@ -const { generateId, getServerlessSdk } = require('./utils') -const execSync = require('child_process').execSync -const path = require('path') +const { generateId, getServerlessSdk } = require('./lib/utils') const axios = require('axios') -// set enough timeout for deployment to finish -jest.setTimeout(600000) - -// the yaml file we're testing against const instanceYaml = { org: 'orgDemo', app: 'appDemo', - component: 'laravel', + component: 'laravel@dev', name: `laravel-integration-tests-${generateId()}`, stage: 'dev', inputs: { @@ -20,16 +14,17 @@ const instanceYaml = { } } -// get credentials from process.env but need to init empty credentials object const credentials = { - tencent: {} + tencent: { + SecretId: process.env.TENCENT_SECRET_ID, + SecretKey: process.env.TENCENT_SECRET_KEY + } } -// get serverless construct sdk const sdk = getServerlessSdk(instanceYaml.org) -it('should successfully deploy laravel app', async () => { - const instance = await sdk.deploy(instanceYaml, { tencent: {} }) +it('should deploy success', async () => { + const instance = await sdk.deploy(instanceYaml, credentials) expect(instance).toBeDefined() expect(instance.instanceName).toEqual(instanceYaml.name) @@ -44,7 +39,7 @@ it('should successfully deploy laravel app', async () => { expect(response.data.includes('Laravel')).toBeTruthy() }) -it('should successfully remove laravel app', async () => { +it('should remove success', async () => { await sdk.remove(instanceYaml, credentials) result = await sdk.getInstance( instanceYaml.org, diff --git a/tests/utils.js b/__tests__/lib/utils.js similarity index 100% rename from tests/utils.js rename to __tests__/lib/utils.js diff --git a/example/.env.example b/example/.env.example index eefba19..da50526 100644 --- a/example/.env.example +++ b/example/.env.example @@ -45,21 +45,6 @@ PUSHER_APP_CLUSTER=mt1 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" - -# views compiled path -VIEW_COMPILED_PATH=/tmp/storage/framework/views - -# We cannot store sessions to disk: if you don't need sessions (e.g. API) -# then use `array`, else store sessions in database or cookies -SESSION_DRIVER=array - -# Logging to stderr allows the logs to end up in Cloudwatch -LOG_CHANNEL=stderr - -# app storage dir must be /tmp -APP_STORAGE=/tmp - - # tencent crendential TENCENT_SECRET_ID=xxx TENCENT_SECRET_KEY=xxx diff --git a/example/bootstrap/app.php b/example/bootstrap/app.php index 990ecf6..037e17d 100644 --- a/example/bootstrap/app.php +++ b/example/bootstrap/app.php @@ -15,8 +15,6 @@ $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) ); -$app->useStoragePath(env('APP_STORAGE', '/tmp')); - /* |-------------------------------------------------------------------------- | Bind Important Interfaces diff --git a/example/serverless.yml b/example/serverless.yml index e291274..ddbbf41 100644 --- a/example/serverless.yml +++ b/example/serverless.yml @@ -1,11 +1,12 @@ -component: laravel -name: laravelDemo org: orgDemo app: appDemo stage: dev +component: laravel +name: laravelDemo inputs: - src: ./ # (optional) path to the source folder. default is a hello world app. + src: + src: ./ region: ap-guangzhou runtime: Php7 apigatewayConf: diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..08fa42d --- /dev/null +++ b/jest.config.js @@ -0,0 +1,14 @@ +const { join } = require('path') +require('dotenv').config({ path: join(__dirname, '.env.test') }) + +const config = { + verbose: true, + silent: false, + testTimeout: 60000, + testEnvironment: 'node', + testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(js|ts)$', + testPathIgnorePatterns: ['/node_modules/', '/__tests__/lib/'], + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'] +} + +module.exports = config diff --git a/package.json b/package.json index 14e3725..131b5c4 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,7 @@ "access": "public" }, "scripts": { - "int-test": "jest ./tests/integration.test.js --testEnvironment node", - "test": "npm run lint && npm run prettier && npm run int-test", + "test": "jest", "commitlint": "commitlint -f HEAD@{15}", "lint": "eslint --ext .js,.ts,.tsx .", "lint:fix": "eslint --fix --ext .js,.ts,.tsx .", diff --git a/serverless.component.yml b/serverless.component.yml index 5d733f2..72c98ab 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: 0.0.9 +version: 0.1.0 author: 'Tencent Cloud, Inc' org: 'Tencent Cloud, Inc' description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. diff --git a/src/config.js b/src/config.js index 0a18f3d..3cb06cc 100644 --- a/src/config.js +++ b/src/config.js @@ -9,7 +9,13 @@ const CONFIGS = { timeout: 3, memorySize: 128, namespace: 'default', - description: 'Created by Serverless Component' + description: 'Created by Serverless Component', + envs: { + VIEW_COMPILED_PATH: '/tmp/storage/framework/views', + SESSION_DRIVER: 'array', + LOG_CHANNEL: 'stderr', + APP_STORAGE: '/tmp' + } } module.exports = CONFIGS diff --git a/src/utils.js b/src/utils.js index ef8aa9f..d843638 100644 --- a/src/utils.js +++ b/src/utils.js @@ -246,8 +246,25 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { functionConf.needSetTraffic = inputs.traffic !== undefined && functionConf.lastVersion if (tempFunctionConf.environment) { - functionConf.environment = inputs.functionConf.environment + functionConf.environment = tempFunctionConf.environment + functionConf.environment.variables = functionConf.environment.variables || {} + functionConf.environment.variables.SERVERLESS = '1' + functionConf.environment.variables.VIEW_COMPILED_PATH = CONFIGS.envs.VIEW_COMPILED_PATH + functionConf.environment.variables.SESSION_DRIVER = CONFIGS.envs.SESSION_DRIVER + functionConf.environment.variables.LOG_CHANNEL = CONFIGS.envs.LOG_CHANNEL + functionConf.environment.variables.APP_STORAGE = CONFIGS.envs.APP_STORAGE + } else { + functionConf.environment = { + variables: { + SERVERLESS: '1', + VIEW_COMPILED_PATH: CONFIGS.envs.VIEW_COMPILED_PATH, + SESSION_DRIVER: CONFIGS.envs.SESSION_DRIVER, + LOG_CHANNEL: CONFIGS.envs.LOG_CHANNEL, + APP_STORAGE: CONFIGS.envs.APP_STORAGE + } + } } + if (tempFunctionConf.vpcConfig) { functionConf.vpcConfig = inputs.functionConf.vpcConfig } From 4716fc76d773a21db4ca1cdb2467ebf7b2ff36d2 Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 4 Dec 2020 11:02:53 +0800 Subject: [PATCH 40/54] ci: add github actions --- .github/workflows/release.yml | 48 ++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 45 +++++++++++++++++++++++++++++++ .github/workflows/validate.yml | 45 +++++++++++++++++++++++++++++++ .travis.yml | 23 ---------------- README.md | 2 ++ 5 files changed, 140 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml create mode 100644 .github/workflows/validate.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..11c8ac8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Release + +on: + push: + branches: [master] + +jobs: + release: + name: Release + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + persist-credentials: false + + - name: Install Node.js and npm + uses: actions/setup-node@v1 + with: + node-version: 14.x + registry-url: https://registry.npmjs.org + + - name: Retrieve dependencies from cache + id: cacheNpm + uses: actions/cache@v2 + with: + path: | + ~/.npm + node_modules + key: npm-v14-${{ runner.os }}-refs/heads/master-${{ hashFiles('package.json') }} + restore-keys: npm-v14-${{ runner.os }}-refs/heads/master- + + - name: Install dependencies + if: steps.cacheNpm.outputs.cache-hit != 'true' + run: | + npm update --no-save + npm update --save-dev --no-save + - name: Releasing + run: | + npm run release + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GIT_AUTHOR_NAME: slsplus + GIT_AUTHOR_EMAIL: slsplus.sz@gmail.com + GIT_COMMITTER_NAME: slsplus + GIT_COMMITTER_EMAIL: slsplus.sz@gmail.com diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..21b004e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,45 @@ +name: Test + +on: + pull_request: + branches: [master] + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # Ensure connection with 'master' branch + fetch-depth: 2 + + - name: Install Node.js and npm + uses: actions/setup-node@v1 + with: + node-version: 14.x + registry-url: https://registry.npmjs.org + + - name: Retrieve dependencies from cache + id: cacheNpm + uses: actions/cache@v2 + with: + path: | + ~/.npm + node_modules + key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} + restore-keys: | + npm-v14-${{ runner.os }}-${{ github.ref }}- + npm-v14-${{ runner.os }}-refs/heads/master- + + - name: Install dependencies + if: steps.cacheNpm.outputs.cache-hit != 'true' + run: | + npm update --no-save + npm update --save-dev --no-save + - name: Running tests + run: npm run test + env: + TENCENT_SECRET_ID: ${{ secrets.TENCENT_SECRET_ID }} + TENCENT_SECRET_KEY: ${{ secrets.TENCENT_SECRET_KEY }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..3840792 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,45 @@ +name: Validate + +on: + pull_request: + branches: [master] + +jobs: + lintAndFormatting: + name: Lint & Formatting + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # Ensure connection with 'master' branch + fetch-depth: 2 + + - name: Install Node.js and npm + uses: actions/setup-node@v1 + with: + node-version: 14.x + registry-url: https://registry.npmjs.org + + - name: Retrieve dependencies from cache + id: cacheNpm + uses: actions/cache@v2 + with: + path: | + ~/.npm + node_modules + key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} + restore-keys: | + npm-v14-${{ runner.os }}-${{ github.ref }}- + npm-v14-${{ runner.os }}-refs/heads/master- + + - name: Install dependencies + if: steps.cacheNpm.outputs.cache-hit != 'true' + run: | + npm update --no-save + npm update --save-dev --no-save + + - name: Validate Formatting + run: npm run prettier:fix + - name: Validate Lint rules + run: npm run lint:fix diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d78fad9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js - -node_js: - - 10 - -install: - - npm install - -# should change to serverless registry publish -jobs: - include: - # Define the release stage that runs semantic-release - - stage: release - node_js: 10.18 - # Advanced: optionally overwrite your default `script` step to skip the tests - # script: skip - deploy: - provider: script - skip_cleanup: true - on: - branch: master - script: - - npm run release diff --git a/README.md b/README.md index 76b226e..7a21b62 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ [![Serverless PHP Laravel Tencent Cloud](https://img.serverlesscloud.cn/20191226/1577347087676-website_%E9%95%BF.png)](http://serverless.com) +[![Build Status](https://github.com/serverless-components/tencent-laravel/workflows/Test/badge.svg?branch=master)](https://github.com/serverless-components/tencent-laravel/actions?query=workflow:Test) +
腾讯云 [Laravel](https://github.com/laravel/laravel) Serverless Component, 支持 `Laravel >= 6.0`。 From 82d8696e0b4446414f81cd398646b4f9410d602c Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 4 Dec 2020 11:38:20 +0800 Subject: [PATCH 41/54] fix: update deps --- example/public/favicon.ico | Bin 0 -> 15086 bytes serverless.component.yml | 2 +- src/package.json | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/public/favicon.ico b/example/public/favicon.ico index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..dbb20ed8a0f77039ee5bfdce8fdcc2daf964f0d4 100644 GIT binary patch literal 15086 zcmeI232;^A6@VWuEXpbhEx6X5UWM4(Sm4QhzLrl z$CD%CEvWopkoQ^?}for6-TeNw4ZadC3qJ(YSNU3aAAXKa;9&B0(-Y^ai&3hLv( zf%T%b|Mwpr^(!78Rlp}O4~kklMqBtJ?=Ivz1(riCM2UO@d6MOA5qDF4lGoPcHx3?! zHLwJ1|J7joKMU#~hXb|W)R?VNf57fhJ8~IHP77fbybI@`>jsB#Z2l8C?uwiS?|^oT zV7HRtb?sUskB#v`{N8X8d<9 zICvGlf&1V9^jl`e=e$w=mTQOoesC{X|1~&XznS%0`?zFyv=wnm;Sb-#!Fo z=nL-KmgaAM`X|n4cmRy+*qUTMh31caU$_mvhSy;-^*a|@U%LT&)U~7DDXm>19BaR2>wt3u+ZkIxGz}9wmU6@Cm7O!p88wl6KXJ8vD=i)29wic3yHq`5FU06%~ z35C?d)-|C93bGGAv3DL$hxfpH)Gy%&urN7Se;#>kAL^vJ^8ixJ`;Tnvenj4{AJ~DmfmxTF@&-OkRH<sfLcQx?14QsDH0uYOP0Bwb z{&;*jC*41+hPz>3uA{m2ehcjOhC9Hv{}k3krl0-t`N6KW^7r}6emo5>g1>{~;Tq^4 zt}|1jFNUk(U+@WBOr9qr^>aF02;MjJ68tnV@U*392_4|9Asj(-KNw||4Ph`*gN zkv%v+1KtM9Z-wDWS=Rc4zL6hvu^;U@Zj=0zTwL!DfsdGlo`$vXBpl53wAbE0 zjG>-U8?5U*X5lE!YH^EB}l#{Y(Y#qn}}W zFtW|_5Alf=o;8jQx`wi;{DUoij)K+L{^(oI-#NY-@~+hd=I?s$J?{VcC!I=LgtpE5 z97mf4oBzr7=lV*(wbXt3Zy@J0H2TeI{E$yiI2(K)?0)bm@L9+AP>r6U(QOv_Gv+#y z%i*vTT-P6i@1yU8bWim#sP`EXe;4bI`8q!Sk#HHZ$#+$h?*x~Cd#X>t`*uO=KiAkB+X`@B>vKxZcU;(owWX=` z$Gw632JgZ50N*s4f4AxqhyU>H`*OWC%R`A%;+xF1xy*Rn4gy<;pe z|9;ec5Y~ZX{!r?52=~>dB)0A0V0aF!@7x#!S^48{D|BPPIL@6)@ELnM9sJH%D zzY`?w(`@@EcJ5(Lfwy2a{1*1Y{}#FOR}Ukw`8C*%?ww9U7w?@oHh(?+*FoCoiL&l|pD9|-2J|GeWTGe7M5!q4H;gjx9Ln`y)OE|gsk&Xs?{mFW6q z+MqLkbWL5wp}M}59RZ4 z808&8fo-5zizJOO8uTlzUGmwnJ- z*Bkqb;3M$9-R%2&Y)ard@Y(cZ_$lOETSJ^eB)Pawc2pK(A8ZEf9)ClzFBZZoa4z_5 zx@WLaqH`UZ2Je7&i(pvEh?d36^x2xnH6!sx>@};CWZ{kUh~teZP{f4IHs-*nGM9v)@+kaDbeJsC>K0;P-y{nKN>g7|@x$eqT>VevG z>x$R`%&O}a%`Nk~E20m{Pw926pjB+ARkh`@teuYFJnE3hihAkqw2EOYq<^QyZ@D)1 zk9p(#p8&6bb7rEtjrCV(J@>K18U{CmYmBj9OO9PrcO#D$t;vPP#&>U+2`@th^oO6r zl~4?G!Lo~ClkYJhFRmx-v7g27-Qc&F_8XWt}A@6UN zjHNGZ#)7^tXd=Gz>dJiOi66&=7|7e#l(}wA2FHfu#otA^ zR&GrD&!S#DE|I;!HNkOUPC5G{qfZ?hju-c+_Teu=Swl%#zWz_gw+`1~UpucK1^4LA z>%8A&v3Fh3cO85PIqeghM&loSR{W4RddG!1*dI?p*6+eN?+8c2lW-3_06zcavoGlS zGvYfgW^;X=kSD?taE|!AyD!`h&%;!0;0lg?KhV%V{`N`P#>7vrSJdALeg{uu1Vl9Q<4ZbHjO%4dVxWV!x;r97IjL!qf9J{`TebWUTdp|V?ZHDRtnJ@khl(`Ro5uA(tL(Cx26~on_%_ZPk zV87T7uFu|IZiLKnGKh1>j%DVP&NuiCvVZ+=ZuY?D7BI#%=$`cVnThUJWS!oS?S=+6&X5`4yn%74|>3>WUUuMN!q_D5@!oqFTcGp2C4q4C(h2d7pwXO8#h{ zKHxg**jDxpWlc%!y1+!RZ^yxfiS%53mt6JH+b{crYk+p088e-bXTvt0gZ*Z?b2Yv8 z>W_2noC`Z8=Z?4C!S!Z1g!RC^t9B=6&PC2Iht5e|=gSG;noi3VF|=~r20nnu{W1|ML7z&fY>(JMwPy#2x zwJ Date: Fri, 4 Dec 2020 03:46:35 +0000 Subject: [PATCH 42/54] chore(release): version 0.1.0 # [0.1.0](https://github.com/serverless-components/tencent-laravel/compare/v0.0.8...v0.1.0) (2020-12-04) ### Bug Fixes * update deps ([82d8696](https://github.com/serverless-components/tencent-laravel/commit/82d8696e0b4446414f81cd398646b4f9410d602c)) ### Features * support no migration deploy ([9670f55](https://github.com/serverless-components/tencent-laravel/commit/9670f55e521b15886297b99d8d89d5fe10a90cac)) --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 825596d..5a5f73e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# [0.1.0](https://github.com/serverless-components/tencent-laravel/compare/v0.0.8...v0.1.0) (2020-12-04) + + +### Bug Fixes + +* update deps ([82d8696](https://github.com/serverless-components/tencent-laravel/commit/82d8696e0b4446414f81cd398646b4f9410d602c)) + + +### Features + +* support no migration deploy ([9670f55](https://github.com/serverless-components/tencent-laravel/commit/9670f55e521b15886297b99d8d89d5fe10a90cac)) + ## [0.0.8](https://github.com/serverless-components/tencent-laravel/compare/v0.0.7...v0.0.8) (2020-09-07) From 4d940f7f9c4ed6716fe31a65fc374f632cd7bb95 Mon Sep 17 00:00:00 2001 From: Yuga Sun Date: Fri, 4 Dec 2020 14:50:04 +0800 Subject: [PATCH 43/54] fix: update prepare inputs method (#18) * chore(release): version 0.1.0 * update deps ([82d8696](https://github.com/serverless-components/tencent-laravel/commit/82d8696e0b4446414f81cd398646b4f9410d602c)) * support no migration deploy ([9670f55](https://github.com/serverless-components/tencent-laravel/commit/9670f55e521b15886297b99d8d89d5fe10a90cac)) * fix: update prepare inputs method Co-authored-by: slsplus --- example/README.md | 79 ----------------------------------------------- src/config.js | 3 +- src/utils.js | 61 +++++++++++++++++++----------------- 3 files changed, 34 insertions(+), 109 deletions(-) delete mode 100644 example/README.md diff --git a/example/README.md b/example/README.md deleted file mode 100644 index 3cae01e..0000000 --- a/example/README.md +++ /dev/null @@ -1,79 +0,0 @@ -

- -

-Build Status -Total Downloads -Latest Stable Version -License -

- -## About Laravel - -Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: - -- [Simple, fast routing engine](https://laravel.com/docs/routing). -- [Powerful dependency injection container](https://laravel.com/docs/container). -- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. -- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). -- Database agnostic [schema migrations](https://laravel.com/docs/migrations). -- [Robust background job processing](https://laravel.com/docs/queues). -- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). - -Laravel is accessible, powerful, and provides tools required for large, robust applications. - -## Learning Laravel - -Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. - -If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. - -## Laravel Sponsors - -We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell). - -- **[Vehikl](https://vehikl.com/)** -- **[Tighten Co.](https://tighten.co)** -- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** -- **[64 Robots](https://64robots.com)** -- **[Cubet Techno Labs](https://cubettech.com)** -- **[Cyber-Duck](https://cyber-duck.co.uk)** -- **[Many](https://www.many.co.uk)** -- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** -- **[DevSquad](https://devsquad.com)** -- [UserInsights](https://userinsights.com) -- [Fragrantica](https://www.fragrantica.com) -- [SOFTonSOFA](https://softonsofa.com/) -- [User10](https://user10.com) -- [Soumettre.fr](https://soumettre.fr/) -- [CodeBrisk](https://codebrisk.com) -- [1Forge](https://1forge.com) -- [TECPRESSO](https://tecpresso.co.jp/) -- [Runtime Converter](http://runtimeconverter.com/) -- [WebL'Agence](https://weblagence.com/) -- [Invoice Ninja](https://www.invoiceninja.com) -- [iMi digital](https://www.imi-digital.de/) -- [Earthlink](https://www.earthlink.ro/) -- [Steadfast Collective](https://steadfastcollective.com/) -- [We Are The Robots Inc.](https://watr.mx/) -- [Understand.io](https://www.understand.io/) -- [Abdel Elrafa](https://abdelelrafa.com) -- [Hyper Host](https://hyper.host) -- [Appoly](https://www.appoly.co.uk) -- [OP.GG](https://op.gg) -- [云软科技](http://www.yunruan.ltd/) - -## Contributing - -Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). - -## Code of Conduct - -In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). - -## Security Vulnerabilities - -If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. - -## License - -The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). diff --git a/src/config.js b/src/config.js index 3cb06cc..4283834 100644 --- a/src/config.js +++ b/src/config.js @@ -10,7 +10,8 @@ const CONFIGS = { memorySize: 128, namespace: 'default', description: 'Created by Serverless Component', - envs: { + defaultEnvs: { + SERVERLESS: '1', VIEW_COMPILED_PATH: '/tmp/storage/framework/views', SESSION_DRIVER: 'array', LOG_CHANNEL: 'stderr', diff --git a/src/utils.js b/src/utils.js index d843638..8be17c0 100644 --- a/src/utils.js +++ b/src/utils.js @@ -179,7 +179,11 @@ const uploadCodeToCos = async (instance, appId, credentials, inputs, region) => const prepareInputs = async (instance, credentials, inputs = {}) => { // 对function inputs进行标准化 - const tempFunctionConf = inputs.functionConf ? inputs.functionConf : {} + const tempFunctionConf = inputs.functionConf + ? inputs.functionConf + : inputs.functionConfig + ? inputs.functionConfig + : {} const fromClientRemark = `tencent-${CONFIGS.compName}` const regionList = inputs.region ? typeof inputs.region == 'string' @@ -190,7 +194,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { // chenck state function name const stateFunctionName = instance.state[regionList[0]] && instance.state[regionList[0]].functionName - const functionConf = { + const functionConf = Object.assign(tempFunctionConf, { code: { src: inputs.src, bucket: inputs.srcOriginal && inputs.srcOriginal.bucket, @@ -230,14 +234,12 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { publish: inputs.publish, traffic: inputs.traffic, lastVersion: instance.state.lastVersion, - eip: tempFunctionConf.eip === true, - l5Enable: tempFunctionConf.l5Enable === true, timeout: tempFunctionConf.timeout ? tempFunctionConf.timeout : CONFIGS.timeout, memorySize: tempFunctionConf.memorySize ? tempFunctionConf.memorySize : CONFIGS.memorySize, tags: ensureObject(tempFunctionConf.tags ? tempFunctionConf.tags : inputs.tag, { default: null }) - } + }) // validate traffic if (inputs.traffic !== undefined) { @@ -247,53 +249,54 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { if (tempFunctionConf.environment) { functionConf.environment = tempFunctionConf.environment - functionConf.environment.variables = functionConf.environment.variables || {} - functionConf.environment.variables.SERVERLESS = '1' - functionConf.environment.variables.VIEW_COMPILED_PATH = CONFIGS.envs.VIEW_COMPILED_PATH - functionConf.environment.variables.SESSION_DRIVER = CONFIGS.envs.SESSION_DRIVER - functionConf.environment.variables.LOG_CHANNEL = CONFIGS.envs.LOG_CHANNEL - functionConf.environment.variables.APP_STORAGE = CONFIGS.envs.APP_STORAGE + functionConf.environment.variables = { + ...(functionConf.environment.variables || {}), + ...CONFIGS.defaultEnvs + } } else { functionConf.environment = { - variables: { - SERVERLESS: '1', - VIEW_COMPILED_PATH: CONFIGS.envs.VIEW_COMPILED_PATH, - SESSION_DRIVER: CONFIGS.envs.SESSION_DRIVER, - LOG_CHANNEL: CONFIGS.envs.LOG_CHANNEL, - APP_STORAGE: CONFIGS.envs.APP_STORAGE - } + variables: CONFIGS.defaultEnvs } } if (tempFunctionConf.vpcConfig) { - functionConf.vpcConfig = inputs.functionConf.vpcConfig + functionConf.vpcConfig = tempFunctionConf.vpcConfig } // 对apigw inputs进行标准化 - const tempApigwConf = inputs.apigatewayConf ? inputs.apigatewayConf : {} - const apigatewayConf = { - serviceId: inputs.serviceId, + const tempApigwConf = inputs.apigatewayConf + ? inputs.apigatewayConf + : inputs.apigwConfig + ? inputs.apigwConfig + : {} + const apigatewayConf = Object.assign(tempApigwConf, { + serviceId: inputs.serviceId || tempApigwConf.serviceId, region: regionList, isDisabled: tempApigwConf.isDisabled === true, fromClientRemark: fromClientRemark, - serviceName: inputs.serviceName || getDefaultServiceName(instance), - description: getDefaultServiceDescription(instance), + serviceName: inputs.serviceName || tempApigwConf.serviceName || getDefaultServiceName(instance), + serviceDesc: tempApigwConf.serviceDesc || getDefaultServiceDescription(instance), protocols: tempApigwConf.protocols || ['http'], environment: tempApigwConf.environment ? tempApigwConf.environment : 'release', - endpoints: [ + customDomains: tempApigwConf.customDomains || [] + }) + if (!apigatewayConf.endpoints) { + apigatewayConf.endpoints = [ { - path: '/', + path: tempApigwConf.path || '/', enableCORS: tempApigwConf.enableCORS, serviceTimeout: tempApigwConf.serviceTimeout, method: 'ANY', + apiName: tempApigwConf.apiName || 'index', function: { isIntegratedResponse: true, functionName: functionConf.name, - functionNamespace: functionConf.namespace + functionNamespace: functionConf.namespace, + functionQualifier: + (tempApigwConf.function && tempApigwConf.function.functionQualifier) || '$DEFAULT' } } - ], - customDomains: tempApigwConf.customDomains || [] + ] } if (tempApigwConf.usagePlan) { apigatewayConf.endpoints[0].usagePlan = { From 93174dc40e5eac2154919259cb607b8e1a5f88b7 Mon Sep 17 00:00:00 2001 From: slsplus Date: Fri, 4 Dec 2020 06:50:35 +0000 Subject: [PATCH 44/54] chore(release): version 0.1.1 ## [0.1.1](https://github.com/serverless-components/tencent-laravel/compare/v0.1.0...v0.1.1) (2020-12-04) ### Bug Fixes * update prepare inputs method ([#18](https://github.com/serverless-components/tencent-laravel/issues/18)) ([4d940f7](https://github.com/serverless-components/tencent-laravel/commit/4d940f7f9c4ed6716fe31a65fc374f632cd7bb95)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a5f73e..bf9ca66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.1.1](https://github.com/serverless-components/tencent-laravel/compare/v0.1.0...v0.1.1) (2020-12-04) + + +### Bug Fixes + +* update prepare inputs method ([#18](https://github.com/serverless-components/tencent-laravel/issues/18)) ([4d940f7](https://github.com/serverless-components/tencent-laravel/commit/4d940f7f9c4ed6716fe31a65fc374f632cd7bb95)) + # [0.1.0](https://github.com/serverless-components/tencent-laravel/compare/v0.0.8...v0.1.0) (2020-12-04) From 3574791adeed0c36c6b68e72b78f23889bd3b4dd Mon Sep 17 00:00:00 2001 From: yugasun Date: Fri, 4 Dec 2020 14:51:56 +0800 Subject: [PATCH 45/54] docs: update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a21b62..dbd3b32 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Serverless PHP Laravel Tencent Cloud](https://img.serverlesscloud.cn/20191226/1577347087676-website_%E9%95%BF.png)](http://serverless.com) -[![Build Status](https://github.com/serverless-components/tencent-laravel/workflows/Test/badge.svg?branch=master)](https://github.com/serverless-components/tencent-laravel/actions?query=workflow:Test) +[![Build Status](https://github.com/serverless-components/tencent-laravel/workflows/Test/badge.svg)](https://github.com/serverless-components/tencent-laravel/actions?query=workflow:Test)
From 7bd779af406ecb863160b6272ff2bb6395167364 Mon Sep 17 00:00:00 2001 From: Yuga Sun Date: Tue, 15 Dec 2020 15:34:04 +0800 Subject: [PATCH 46/54] fix: update deploy and remove flow (#19) * fix: update to deployment to serial flow * fix: update remove flow --- .github/workflows/test.yml | 2 ++ jest.config.js | 2 +- serverless.component.yml | 2 +- src/package.json | 2 +- src/serverless.js | 27 ++++++++++++++++++--------- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21b004e..c966e94 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,5 +41,7 @@ jobs: - name: Running tests run: npm run test env: + SERVERLESS_PLATFORM_VENDOR: tencent + GLOBAL_ACCELERATOR_NA: true TENCENT_SECRET_ID: ${{ secrets.TENCENT_SECRET_ID }} TENCENT_SECRET_KEY: ${{ secrets.TENCENT_SECRET_KEY }} diff --git a/jest.config.js b/jest.config.js index 08fa42d..a70dd57 100644 --- a/jest.config.js +++ b/jest.config.js @@ -4,7 +4,7 @@ require('dotenv').config({ path: join(__dirname, '.env.test') }) const config = { verbose: true, silent: false, - testTimeout: 60000, + testTimeout: 600000, testEnvironment: 'node', testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(js|ts)$', testPathIgnorePatterns: ['/node_modules/', '/__tests__/lib/'], diff --git a/serverless.component.yml b/serverless.component.yml index 2536442..476edd9 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: 0.1.1 +version: 0.1.2 author: 'Tencent Cloud, Inc' org: 'Tencent Cloud, Inc' description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. diff --git a/src/package.json b/src/package.json index c7e061e..850fa0c 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^1.19.4", + "tencent-component-toolkit": "^1.19.8", "type": "^2.1.0" } } diff --git a/src/serverless.js b/src/serverless.js index 946563a..bdd8375 100644 --- a/src/serverless.js +++ b/src/serverless.js @@ -196,24 +196,33 @@ class ServerlessComponent extends Component { outputs.templateUrl = CONFIGS.templateUrl } - const deployTasks = [this.deployFunction(credentials, functionConf, regionList, outputs)] + let apigwOutputs + const functionOutputs = await this.deployFunction( + credentials, + functionConf, + regionList, + outputs + ) // support apigatewayConf.isDisabled if (apigatewayConf.isDisabled !== true) { - deployTasks.push(this.deployApigateway(credentials, apigatewayConf, regionList, outputs)) + apigwOutputs = await this.deployApigateway(credentials, apigatewayConf, regionList, outputs) } else { this.state.apigwDisabled = true } - const [functionOutputs, apigwOutputs = {}] = await Promise.all(deployTasks) // optimize outputs for one region if (regionList.length === 1) { const [oneRegion] = regionList outputs.region = oneRegion - outputs['apigw'] = apigwOutputs[oneRegion] outputs['scf'] = functionOutputs[oneRegion] + if (apigwOutputs) { + outputs['apigw'] = apigwOutputs[oneRegion] + } } else { - outputs['apigw'] = apigwOutputs outputs['scf'] = functionOutputs + if (apigwOutputs) { + outputs['apigw'] = apigwOutputs + } } this.state.region = regionList[0] @@ -238,10 +247,6 @@ class ServerlessComponent extends Component { const scf = new Scf(credentials, curRegion) const apigw = new Apigw(credentials, curRegion) const handler = async () => { - await scf.remove({ - functionName: curState.functionName, - namespace: curState.namespace - }) // if disable apigw, no need to remove if (state.apigwDisabled !== true) { await apigw.remove({ @@ -252,6 +257,10 @@ class ServerlessComponent extends Component { customDomains: curState.customDomains }) } + await scf.remove({ + functionName: curState.functionName, + namespace: curState.namespace + }) } removeHandlers.push(handler()) } From 8e9e23f3dd1a61094a2890f74929686e7f5a4989 Mon Sep 17 00:00:00 2001 From: slsplus Date: Tue, 15 Dec 2020 07:34:27 +0000 Subject: [PATCH 47/54] chore(release): version 0.1.2 ## [0.1.2](https://github.com/serverless-components/tencent-laravel/compare/v0.1.1...v0.1.2) (2020-12-15) ### Bug Fixes * update deploy and remove flow ([#19](https://github.com/serverless-components/tencent-laravel/issues/19)) ([7bd779a](https://github.com/serverless-components/tencent-laravel/commit/7bd779af406ecb863160b6272ff2bb6395167364)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf9ca66..550d8d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.1.2](https://github.com/serverless-components/tencent-laravel/compare/v0.1.1...v0.1.2) (2020-12-15) + + +### Bug Fixes + +* update deploy and remove flow ([#19](https://github.com/serverless-components/tencent-laravel/issues/19)) ([7bd779a](https://github.com/serverless-components/tencent-laravel/commit/7bd779af406ecb863160b6272ff2bb6395167364)) + ## [0.1.1](https://github.com/serverless-components/tencent-laravel/compare/v0.1.0...v0.1.1) (2020-12-04) From ea1af31739596d818b99d7206c84180662dd24da Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 23 Feb 2021 15:37:01 +0800 Subject: [PATCH 48/54] feat: support post form data --- README.md | 6 +- docs/configure.md | 250 +++++++++++++++++++++----------------- docs/upload.md | 40 ++++++ example/.gitignore | 2 + example/routes/api.php | 32 +++++ example/serverless.yml | 2 +- serverless.component.yml | 2 +- src/_shims/sl_handler.php | 249 +++++++++++++++++++++++++++++-------- src/package.json | 2 +- src/serverless.js | 57 +-------- src/utils.js | 29 +++-- 11 files changed, 433 insertions(+), 238 deletions(-) create mode 100644 docs/upload.md diff --git a/README.md b/README.md index dbd3b32..852ee93 100644 --- a/README.md +++ b/README.md @@ -72,12 +72,12 @@ laravel 组件支持 0 配置部署,也就是可以直接通过配置文件中 ```yml # serverless.yml -component: laravel -name: laravelDemo -org: orgDemo app: appDemo stage: dev +component: laravel +name: laravelDemo + inputs: src: src: ./ diff --git a/docs/configure.md b/docs/configure.md index 0495922..c62f349 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -4,40 +4,52 @@ ```yml # serverless.yml - -component: laravel # (必选) 组件名称,在该实例中为laravel -name: laravelDemo # 必选) 组件实例名称. -org: orgDemo # (可选) 用于记录组织信息,默认值为您的腾讯云账户 appid,必须为字符串 app: appDemo # (可选) 用于记录组织信息. 默认与name相同,必须为字符串 stage: dev # (可选) 用于区分环境信息,默认值是 dev +component: laravel # (必选) 组件名称 +name: laravelDemo # 必选) 组件实例名称. + inputs: region: ap-guangzhou # 云函数所在区域 - functionName: laravelDemo # 云函数名称 - serviceName: mytest # api网关服务名称 - runtime: Php7 # 运行环境 - src: # 第二种,部署src下的文件代码,并打包成zip上传到bucket上 - src: ./src # 本地需要打包的文件目录 - # bucket: bucket01 # bucket name,存储桶名称 - # object: cos.zip # bucket key 指定存储桶内的文件 + entryFile: sls.js # 自定义 server 的入口文件名,默认为 sls.js,如果不想修改文件名为 sls.js 可以自定义 + src: # 部署src下的文件代码,并打包成zip上传到bucket上 + src: ./ # 本地需要打包的文件目录 exclude: # 被排除的文件或目录 - .env - layers: - - name: layerName # layer名称 - version: 1 # 版本 + - 'node_modules/**' + # src: # 在指定存储桶bucket中已经存在了object代码,直接部署 + # bucket: bucket01 # bucket name,当前会默认在bucket name后增加 appid 后缀, 本例中为 bucket01-appid + # object: cos.zip # bucket key 指定存储桶内的文件 functionConf: # 函数配置相关 + name: webDemo # 云函数名称 + runtime: Nodejs10.15 # 运行环境 timeout: 10 # 超时时间,单位秒 eip: false # 是否固定出口IP memorySize: 128 # 内存大小,单位MB environment: # 环境变量 variables: # 环境变量数组 TEST: vale - vpcConfig: # 私有网络配置 - vpcId: '' # 私有网络的Id - subnetId: '' # 子网ID + vpc: # 私有网络配置 + vpcId: 'vpc-xxx' # 私有网络的Id + subnetId: 'subnet-xxx' # 子网ID + layers: + - name: layerName # layer名称 + version: 1 # 版本 + tags: + tagKey: tagValue apigatewayConf: # api网关配置 isDisabled: false # 是否禁用自动创建 API 网关功能 + isBase64Encoded: false # 是否开启 base64 编码 + id: service-np1uloxw # api网关服务ID + name: serverless # api网关服务名称 + description: serverless apigw # api网关描述 enableCORS: true # 允许跨域 + timeout: 15 # api 超时时间 + protocols: + - http + - https + environment: test customDomains: # 自定义域名绑定 - domain: abc.com # 待绑定的自定义的域名 certificateId: abcdefg # 待绑定自定义域名的证书唯一 ID @@ -50,11 +62,6 @@ inputs: protocols: # 绑定自定义域名的协议类型,默认与服务的前端协议一致。 - http # 支持http协议 - https # 支持https协议 - protocols: - - http - - https - environment: test - serviceTimeout: 15 usagePlan: # 用户使用计划 usagePlanId: 1111 usagePlanName: slscmp @@ -66,129 +73,144 @@ inputs: - xxx ``` -## 配置描述 +## inputs 配置参数 主要的参数 -| 参数名称 | 是否必选 | 默认值 | 描述 | -| ------------------------------------ | :------: | :-------------: | :------------------------------------------------------------- | -| runtime | 否 | Php7 | 执行环境, 目前支持: Php7,Php5 | -| region | 否 | ap-guangzhou | 项目部署所在区域,默认广州区 | -| functionName | 否 | | 云函数名称 | -| serviceName | 否 | | API 网关服务名称, 默认创建一个新的服务名称 | -| serviceId | 否 | | API 网关服务 ID,如果存在将使用这个 API 网关服务 | -| src | 否 | `process.cwd()` | 默认为当前目录, 如果是对象, 配置参数参考 [执行目录](#执行目录) | -| layers | 否 | | 云函数绑定的 layer, 配置参数参考 [层配置](#层配置) | -| [functionConf](#函数配置) | 否 | | 函数配置 | -| [apigatewayConf](#API-网关配置) | 否 | | API 网关配置 | -| [cloudDNSConf](#DNS-配置) | 否 | | DNS 配置 | -| [Region special config](#指定区配置) | 否 | | 指定区配置 | - -## 执行目录 - -| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | -| -------- | :------: | :-------------: | :----: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| src | 否 | String | | 代码路径。与 object 不能同时存在。 | -| exclude | 否 | Array of String | | 不包含的文件或路径, 遵守 [glob 语法](https://github.com/isaacs/node-glob) | -| bucket | 否 | String | | bucket 名称。如果配置了 src,表示部署 src 的代码并压缩成 zip 后上传到 bucket-appid 对应的存储桶中;如果配置了 object,表示获取 bucket-appid 对应存储桶中 object 对应的代码进行部署。 | -| object | 否 | String | | 部署的代码在存储桶中的路径。 | - -## 层配置 +| 参数名称 | 必选 | 类型 | 默认值 | 描述 | +| -------------- | :--: | :------------------------ | :-------------: | :--------------- | +| region | 否 | string | `ap-guangzhou` | 项目部署所在区域 | +| src | 否 | [Src](#Src) | `process.cwd()` | 项目代码配置 | +| functionConf | 否 | [Function](#Function) | | 函数配置 | +| apigatewayConf | 否 | [Apigateway](#Apigateway) | | API 网关配置 | -| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | -| -------- | :------: | :----: | :----: | :------- | -| name | 否 | String | | 层名称 | -| version | 否 | String | | 层版本号 | +## Src -### DNS 配置 +项目代码配置 -参考: https://cloud.tencent.com/document/product/302/8516 +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| -------- | :------: | :------: | :----: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| src | 否 | string | | 代码路径。与 object 不能同时存在。 | +| exclude | 否 | string[] | | 不包含的文件或路径, 遵守 [glob 语法][glob] | +| bucket | 否 | string | | bucket 名称。如果配置了 src,表示部署 src 的代码并压缩成 zip 后上传到 bucket-appid 对应的存储桶中;如果配置了 object,表示获取 bucket-appid 对应存储桶中 object 对应的代码进行部署。 | +| object | 否 | string | | 部署的代码在存储桶中的路径。 | -| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | -| ---------- | :------: | -------- | :----: | :---------------------------------------------- | -| ttl | 否 | Number | 600 | TTL 值,范围 1 - 604800,不同等级域名最小值不同 | -| recordLine | 否 | String[] | | 记录的线路名称 | +### Function -### 指定区配置 +函数配置 -| 参数名称 | 是否必选 | 类型 | 默认值 | 函数 | -| ------------------------------- | :------: | ------ | ------ | ------------ | -| [functionConf](#函数配置) | 否 | Object | | 函数配置 | -| [apigatewayConf](#API-网关配置) | 否 | Object | | API 网关配置 | -| [cloudDNSConf](#DNS-配置) | 否 | Object | | DNS 配置 | +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| ----------- | :------: | :-------------------------- | :-----------: | :------------------------------------------------------------------------------ | +| runtime | 否 | string | `Nodejs10.15` | 执行环境, 支持: Nodejs6.10, Nodejs8.9, Nodejs10.15, Nodejs12.16 | +| timeout | 否 | number | `3` | 函数最长执行时间,单位为秒,可选值范围 1-900 秒,默认为 3 秒 | +| memorySize | 否 | number | `128` | 函数运行时内存大小,默认为 128M,可选范围 64、128MB-3072MB,并且以 128MB 为阶梯 | +| environment | 否 | [Environment](#Environment) | | 函数的环境变量 | +| vpc | 否 | [Vpc](#Vpc) | | 函数的 VPC 配置 | +| layers | 否 | [Layer](#Layer)[] | | 云函数绑定的 layer | +| tags | 否 | object | | 云函数标签,`key-value` 形式配置 | +| eip | 否 | boolean | `false` | 是否固定出口 IP | -### 函数配置 +> 此处只是列举,`faas` 参数支持 [scf][scf-config] 组件的所有基础配置( `events` 除外) -参考: https://cloud.tencent.com/document/product/583/18586 +`runtime` 运行环境说明: -| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | -| ----------- | :------: | :-----: | :-----: | :----------------------------------------------------------- | -| timeout | 否 | Number | 3 | 函数最长执行时间,单位为秒,可选值范围 1-900 秒,默认为 3 秒 | -| environment | 否 | Object | | 函数的环境变量, 参考 [环境变量](#环境变量) | -| vpcConfig | 否 | Object | | 函数的 VPC 配置, 参考 [VPC 配置](#VPC-配置) | -| eip | 否 | Boolean | `false` | 是否固定出口 IP | +``` +Nodejs 框架支持:Nodejs6.10, Nodejs8.9, Nodejs10.15, Nodejs12.16 +Python 框架支持:Python3.6, Python2.7 +PHP 框架支持:Php7,Php5 +``` + +##### Layer + +层配置 + +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| -------- | :------: | :----: | :----: | :------- | +| name | 否 | string | | 层名称 | +| version | 否 | string | | 层版本号 | + +##### Environment -##### 环境变量 +环境变量 -| 参数名称 | 类型 | 描述 | -| --------- | ---- | :---------------------------------------- | -| variables | | 环境变量参数, 包含多对 key-value 的键值对 | +| 参数名称 | 类型 | 描述 | +| --------- | ------ | :---------------------------------------- | +| variables | object | 环境变量参数, 包含多对 key-value 的键值对 | -##### VPC 配置 +##### Vpc -| 参数名称 | 类型 | 描述 | -| -------- | ------ | :------ | -| subnetId | String | 子网 ID | -| vpcId | String | VPC ID | +VPC 配置 -### API 网关配置 +| 参数名称 | 类型 | 描述 | +| -------- | ------ | :---------- | +| vpcId | string | 私有网络 ID | +| subnetId | string | 子网 ID | -| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | -| -------------- | :------: | :------- | :------- | :--------------------------------------------------------------------------------- | -| protocols | 否 | String[] | ['http'] | 前端请求的类型,如 http,https,http 与 https | -| environment | 否 | String | release | 发布环境. 目前支持三种发布环境: test(测试), prepub(预发布) 与 release(发布). | -| usagePlan | 否 | | | 使用计划配置, 参考 [使用计划](#使用计划) | -| auth | 否 | | | API 密钥配置, 参考 [API 密钥](#API-密钥配置) | -| customDomain | 否 | Object[] | | 自定义 API 域名配置, 参考 [自定义域名](#自定义域名) | -| enableCORS | 否 | Boolean | `false` | 开启跨域。默认值为否。 | -| serviceTimeout | 否 | Number | `15` | Api 超时时间,单位: 秒 | -| isDisabled | 否 | Boolean | `false` | 关闭自动创建 API 网关功能。默认值为否,即默认自动创建 API 网关。 | +### Apigateway -##### 使用计划 +API 网关配置 + +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| --------------- | :------: | :------------------------------ | :----------- | :--------------------------------------------------------------- | +| id | 否 | string | | API 网关服务 ID, 如果存在将使用这个 API 网关服务 | +| name | 否 | string | `serverless` | API 网关服务名称, 默认创建一个新的服务名称 | +| description | 否 | string | `serverless` | API 网关服务描述 | +| protocols | 否 | string[] | `['http']` | 前端请求的类型,如 http,https,http 与 https | +| environment | 否 | string | `release` | 发布环境. 网关环境: test, prepub 与 release | +| usagePlan | 否 | [UsagePlan](#UsagePlan) | | 使用计划配置 | +| auth | 否 | [ApuAuth](#ApiAuth) | | API 密钥配置 | +| customDomain | 否 | [CustomDomain](#CustomDomain)[] | | 自定义 API 域名配置 | +| enableCORS | 否 | boolean | `false` | 开启跨域。默认值为否。 | +| timeout | 否 | number | `15` | Api 超时时间,单位: 秒 | +| isDisabled | 否 | boolean | `false` | 关闭自动创建 API 网关功能。默认值为否,即默认自动创建 API 网关。 | +| isBase64Encoded | 否 | Boolean | `false` | 是否开启 Base64 编码,如果需要文件上传,请配置为 `true` | + +##### UsagePlan + +使用计划配置 参考: https://cloud.tencent.com/document/product/628/14947 -| 参数名称 | 是否必选 | 类型 | 描述 | -| ------------- | :------: | ------ | :--------------------------------------------------------- | -| usagePlanId | 否 | String | 用户自定义使用计划 ID | -| usagePlanName | 否 | String | 用户自定义的使用计划名称 | -| usagePlanDesc | 否 | String | 用户自定义的使用计划描述 | -| maxRequestNum | 否 | Number | 请求配额总数,如果为空,将使用 `-1` 作为默认值,表示不开启 | +| 参数名称 | 是否必选 | 类型 | 描述 | +| ------------- | :------: | :----- | :------------------------------------------------------ | +| usagePlanId | 否 | string | 用户自定义使用计划 ID | +| usagePlanName | 否 | string | 用户自定义的使用计划名称 | +| usagePlanDesc | 否 | string | 用户自定义的使用计划描述 | +| maxRequestNum | 否 | number | 请求配额总数,如果为空,将使用-1 作为默认值,表示不开启 | -##### API 密钥配置 +##### ApiAuth -参考: https://cloud.tencent.com/document/product/628/14916 +API 密钥配置 | 参数名称 | 类型 | 描述 | | ---------- | :----- | :------- | -| secretName | String | 密钥名称 | -| secretIds | String | 密钥 ID | +| secretName | string | 密钥名称 | +| secretIds | string | 密钥 ID | + +##### CustomDomain -##### 自定义域名 +自定义域名配置 -Refer to: https://cloud.tencent.com/document/product/628/14906 +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| ---------------- | :------: | :-------------------- | :----: | :---------------------------------------------------------------------------------- | +| domain | 是 | string | | 待绑定的自定义的域名。 | +| protocol | 否 | string[] | | 绑定自定义域名的协议类型,默认与服务的前端协议一致。 | +| certificateId | 否 | string | | 待绑定自定义域名的证书 ID,如果设置了 `protocol` 含有 https,则为必选 | +| isDefaultMapping | 否 | string | `true` | 是否使用默认路径映射。为 `false` 时,表示自定义路径映射,此时 pathMappingSet 必填。 | +| pathMappingSet | 否 | [PathMap](#PathMap)[] | `[]` | 自定义路径映射的路径。 | -| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | -| ---------------- | :------: | :------: | :----: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| domain | 是 | String | | 待绑定的自定义的域名。 | -| certificateId | 否 | String | | 待绑定自定义域名的证书唯一 ID,如果设置了 type 为 https,则为必选 | -| isDefaultMapping | 否 | String | `true` | 是否使用默认路径映射,默认为 true。为 false 时,表示自定义路径映射,此时 pathMappingSet 必填。 | -| pathMappingSet | 否 | Object[] | `[]` | 自定义路径映射的路径。使用自定义映射时,可一次仅映射一个 path 到一个环境,也可映射多个 path 到多个环境。并且一旦使用自定义映射,原本的默认映射规则不再生效,只有自定义映射路径生效。 | -| protocol | 否 | String[] | | 绑定自定义域名的协议类型,默认与服务的前端协议一致。 | +> 注意:使用自定义映射时,可一次仅映射一个 path 到一个环境,也可映射多个 path 到多个环境。并且一旦使用自定义映射,原本的默认映射规则不再生效,只有自定义映射路径生效。 -- 自定义路径映射 +###### PathMap + +自定义路径映射 | 参数名称 | 是否必选 | 类型 | Description | | ----------- | :------: | :----- | :------------- | -| path | 是 | String | 自定义映射路径 | -| environment | 是 | String | 自定义映射环境 | +| path | 是 | string | 自定义映射路径 | +| environment | 是 | string | 自定义映射环境 | + + + +[glob]: https://github.com/isaacs/node-glob +[scf-config]: https://github.com/serverless-components/tencent-scf/tree/master/docs/configure.md diff --git a/docs/upload.md b/docs/upload.md new file mode 100644 index 0000000..2379711 --- /dev/null +++ b/docs/upload.md @@ -0,0 +1,40 @@ +## 文件上传说明 + +项目中如果涉及到文件上传,需要依赖 API 网关提供的 [Base64 编码能力](https://cloud.tencent.com/document/product/628/51799),使用时只需要 `serverless.yml` 中配置 `isBase64Encoded` 为 `true`,如下: + +```yaml +app: appDemo +stage: dev +component: laravel +name: laravelDemo + +inputs: + # 省略... + apigatewayConf: + isBase64Encoded: true + # 省略... + # 省略... +``` + +当前 API 网关支持上传最大文件大小为 `2M`,如果文件过大,请修改为前端直传对象存储方案。 + +## Base64 示例 + +此 Github 项目的 `example` 目录下 `routes/api.php` 文件中有 `POST /upload` 接口如下: + +```php +// 上传文件接口 +Route::post('/upload', function (Request $request) { + // 表单中字段为 file + if ($request->file) { + // TODO: 这里只是存储在了 /tmp 临时目录下,用户需要根据个人需要存储到持久化存储服务,比如腾讯云的对象存储、文件存储等。 + $upload = $request->file->store('upload'); + $uploadFile = storage_path()."/app/".$upload; + } + + return response()->json([ + 'title' => 'serverless', + 'upload' => $uploadFile ?? null, + ]); +}); +``` diff --git a/example/.gitignore b/example/.gitignore index 0f7df0f..95812ec 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -10,3 +10,5 @@ Homestead.json Homestead.yaml npm-debug.log yarn-error.log + +/storage/ diff --git a/example/routes/api.php b/example/routes/api.php index bcb8b18..11c3605 100644 --- a/example/routes/api.php +++ b/example/routes/api.php @@ -17,3 +17,35 @@ Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); }); + +Route::get('/posts', function (Request $request) { + $input = $request->all(); + + return response()->json([ + 'title' => 'serverless', + 'get' => $input + ]); +}); + +Route::post('/posts', function (Request $request) { + $input = $request->all(); + + return response()->json([ + 'title' => 'serverless', + 'data' => $input + ]); +}); + +// upload file demo +Route::post('/upload', function (Request $request) { + // field file in form data + if ($request->file) { + $upload = $request->file->store('upload'); + $uploadFile = storage_path()."/app/".$upload; + } + + return response()->json([ + 'title' => 'serverless', + 'upload' => $uploadFile ?? null, + ]); +}); diff --git a/example/serverless.yml b/example/serverless.yml index ddbbf41..8d0ee3e 100644 --- a/example/serverless.yml +++ b/example/serverless.yml @@ -1,4 +1,3 @@ -org: orgDemo app: appDemo stage: dev component: laravel @@ -14,3 +13,4 @@ inputs: - http - https environment: release + isBase64Encoded: true diff --git a/serverless.component.yml b/serverless.component.yml index 476edd9..0206ee7 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: 0.1.2 +version: 0.2.0 author: 'Tencent Cloud, Inc' org: 'Tencent Cloud, Inc' description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. diff --git a/src/_shims/sl_handler.php b/src/_shims/sl_handler.php index 3b74977..ad75acc 100644 --- a/src/_shims/sl_handler.php +++ b/src/_shims/sl_handler.php @@ -2,6 +2,7 @@ use Illuminate\Contracts\Http\Kernel; use Illuminate\Http\Request; +use Illuminate\Support\Arr; define('LARAVEL_START', microtime(true)); define('TEXT_REG', '#\.html.*|\.js.*|\.css.*|\.html.*#'); @@ -10,79 +11,221 @@ // auto make dir /tmp/storage/framework/views system("mkdir -p /tmp/storage/framework/views"); +function consoleLog($prefix, $var) +{ + echo $prefix . ": " . json_encode($var) . "\n"; +} + /** * handler static files */ -function handlerStatic($path) +function handlerStatic($path, $isBase64Encoded) { - $filename = __DIR__ . "/public" . $path; - $handle = fopen($filename, "r"); - $contents = fread($handle, filesize($filename)); - fclose($handle); + $filename = __DIR__ . "/public" . $path; + $handle = fopen($filename, "r"); + $contents = fread($handle, filesize($filename)); + fclose($handle); - $base64Encode = false; + $base64Encode = false; + $headers = [ + 'Content-Type' => '', + 'Cache-Control' => "max-age=8640000", + 'Accept-Ranges' => 'bytes', + ]; + $body = $contents; + if ($isBase64Encoded || preg_match(BINARY_REG, $path)) { + $base64Encode = true; $headers = [ - 'Content-Type' => '', - 'Cache-Control' => "max-age=8640000", - 'Accept-Ranges' => 'bytes', + 'Content-Type' => '', + 'Cache-Control' => "max-age=86400", ]; - $body = $contents; - if (preg_match(BINARY_REG, $path)) { - $base64Encode = true; - $headers = [ - 'Content-Type' => '', - 'Cache-Control' => "max-age=86400", - ]; - $body = base64_encode($contents); - } + $body = base64_encode($contents); + } + return [ + "isBase64Encoded" => $base64Encode, + "statusCode" => 200, + "headers" => $headers, + "body" => $body, + ]; +} + +function initEnvironment($isBase64Encoded) +{ + $envName = ''; + if (file_exists(__DIR__ . "/.env")) { + $envName = '.env'; + } elseif (file_exists(__DIR__ . "/.env.production")) { + $envName = '.env.production'; + } elseif (file_exists(__DIR__ . "/.env.local")) { + $envName = ".env.local"; + } + if (!$envName) { return [ - "isBase64Encoded" => $base64Encode, - "statusCode" => 200, - "headers" => $headers, - "body" => $body, + 'isBase64Encoded' => $isBase64Encoded, + 'statusCode' => 500, + 'headers' => [ + 'Content-Type' => 'application/json' + ], + 'body' => $isBase64Encoded ? base64_encode([ + 'error' => "Dotenv config file not exist" + ]) : [ + 'error' => "Dotenv config file not exist" + ] ]; + } + + $dotenv = Dotenv\Dotenv::createImmutable(__DIR__, $envName); + $dotenv->load(); } -function handler($event, $context) +function decodeFormData($rawData) { - require __DIR__ . '/vendor/autoload.php'; + $files = array(); + $data = array(); + $boundary = substr($rawData, 0, strpos($rawData, "\r\n")); + // Fetch and process each part + $parts = array_slice(explode($boundary, $rawData), 1); + foreach ($parts as $part) { + // If this is the last part, break + if ($part == "--\r\n") { + break; + } + // Separate content from headers + $part = ltrim($part, "\r\n"); + list($rawHeaders, $content) = explode("\r\n\r\n", $part, 2); + $content = substr($content, 0, strlen($content) - 2); + // Parse the headers list + $rawHeaders = explode("\r\n", $rawHeaders); + $headers = array(); + foreach ($rawHeaders as $header) { + list($name, $value) = explode(':', $header); + $headers[strtolower($name)] = ltrim($value, ' '); + } + // Parse the Content-Disposition to get the field name, etc. + if (isset($headers['content-disposition'])) { + $filename = null; + preg_match('/^form-data; *name="([^"]+)"(; *filename="([^"]+)")?/', $headers['content-disposition'], $matches); + $fieldName = $matches[1]; + $fileName = (isset($matches[3]) ? $matches[3] : null); + // consoleLog('Upload Filename', $fileName); + // If we have a file, save it. Otherwise, save the data. + if ($fileName !== null) { + $localFileName = tempnam('/tmp', 'sfy'); + file_put_contents($localFileName, $content); + + $arr = array( + 'name' => $fileName, + 'type' => $headers['content-type'], + 'tmp_name' => $localFileName, + 'error' => 0, + 'size' => filesize($localFileName) + ); - $app = require __DIR__ . '/bootstrap/app.php'; + if (substr($fieldName, -2, 2) == '[]') { + $fieldName = substr($fieldName, 0, strlen($fieldName) - 2); + } - // init path - $path = str_replace("//", "/", $event->path); + if (array_key_exists($fieldName, $files)) { + array_push($files[$fieldName], $arr); + } else { + $files[$fieldName] = $arr; + } - if (preg_match(TEXT_REG, $path) || preg_match(BINARY_REG, $path)) { - return handlerStatic($path); + // register a shutdown function to cleanup the temporary file + register_shutdown_function(function () use ($localFileName) { + unlink($localFileName); + }); + } else { + parse_str($fieldName . '=__INPUT__', $parsedInput); + $dottedInput = Arr::dot($parsedInput); + $targetInput = Arr::add([], array_keys($dottedInput)[0], $content); + + $data = array_merge_recursive($data, $targetInput); + } } + } + return (object)([ + 'data' => $data, + 'files' => $files + ]); +} - // init body - $req = $event->body ?? ''; +function handler($event, $context) +{ + require __DIR__ . '/vendor/autoload.php'; - // init headers - $headers = $event->headers ?? []; - $headers = json_decode(json_encode($headers), true); + $isBase64Encoded = $event->isBase64Encoded; - // init data - $data = !empty($req) ? json_decode($req, true) : []; - // execute laravel app request, get response - $kernel = $app->make(Kernel::class); - $request = Request::create($path, $event->httpMethod, $data, [], [], $headers); - $response = $kernel->handle( - $request - ); + initEnvironment($isBase64Encoded); - // init content - $body = $response->getContent(); - $contentType = $response->headers->get('Content-Type'); + $app = require __DIR__ . '/bootstrap/app.php'; - return [ - 'isBase64Encoded' => false, - 'statusCode' => 200, - 'headers' => [ - 'Content-Type' => $contentType - ], - 'body' => $body - ]; + // change storage path to APP_STORAGE in dotenv + $app->useStoragePath( env( 'APP_STORAGE', base_path() . '/storage' ) ); + + + // init path + $path = str_replace("//", "/", $event->path); + + if (preg_match(TEXT_REG, $path) || preg_match(BINARY_REG, $path)) { + return handlerStatic($path, $isBase64Encoded); + } + + // init headers + $headers = $event->headers ?? []; + $headers = json_decode(json_encode($headers), true); + + // consoleLog("Event", $event); + + // init request data + $data = []; + $rawBody = $event->body ?? null; + if ($event->httpMethod === 'GET') { + $data = !empty($event->queryString) ? $event->queryString : []; + } else { + if ($isBase64Encoded) { + $rawBody = base64_decode($rawBody); + } + $contentType = $headers['Content-Type'] ?? $headers['content-type']; + if (preg_match('/multipart\/form-data/', $contentType)) { + $requestData = !empty($rawBody) ? decodeFormData($rawBody) : []; + consoleLog('Post File', $requestData); + $data = $requestData->data; + $files = $requestData->files; + } else if (preg_match('/application\/x-www-form-urlencoded/', $contentType)) { + if (!empty($rawBody)) { + mb_parse_str($rawBody, $data); + } + } else { + $data = !empty($rawBody) ? json_decode($rawBody, true) : []; + } + } + + // consoleLog('Request Data', $data); + // consoleLog('Raw Body', $rawBody); + + // execute laravel app request, get response + $kernel = $app->make(Kernel::class); + + $request = Request::create($path, $event->httpMethod, (array) $data, [], [], $headers, $rawBody); + if (!empty($files)) { + $request->files->add($files); + } + $response = $kernel->handle( + $request + ); + + // init content + $body = $response->getContent(); + $contentType = $response->headers->get('Content-Type'); + + return [ + 'isBase64Encoded' => $isBase64Encoded, + 'statusCode' => $response->getStatusCode() ?? 200, + 'headers' => [ + 'Content-Type' => $contentType + ], + 'body' => $isBase64Encoded ? base64_encode(($body)) : $body + ]; } diff --git a/src/package.json b/src/package.json index 850fa0c..6e7d032 100644 --- a/src/package.json +++ b/src/package.json @@ -1,7 +1,7 @@ { "dependencies": { "download": "^8.0.0", - "tencent-component-toolkit": "^1.19.8", + "tencent-component-toolkit": "^2.2.0", "type": "^2.1.0" } } diff --git a/src/serverless.js b/src/serverless.js index bdd8375..7a2c4cc 100644 --- a/src/serverless.js +++ b/src/serverless.js @@ -1,6 +1,6 @@ const { Component } = require('@serverless/core') -const { Scf, Apigw, Cns, Cam } = require('tencent-component-toolkit') -const { TypeError } = require('tencent-component-toolkit/src/utils/error') +const { Scf, Apigw } = require('tencent-component-toolkit') +const { ApiTypeError } = require('tencent-component-toolkit/lib/utils/error') const { uploadCodeToCos, getDefaultProtocol, prepareInputs, deepClone } = require('./utils') const CONFIGS = require('./config') @@ -9,7 +9,7 @@ class ServerlessComponent extends Component { const { tmpSecrets } = this.credentials.tencent if (!tmpSecrets || !tmpSecrets.TmpSecretId) { - throw new TypeError( + throw new ApiTypeError( 'CREDENTIAL', 'Cannot get secretId/Key, your account could be sub-account and does not have the access to use SLS_QcsRole, please make sure the role exists first, then visit https://cloud.tencent.com/document/product/1154/43006, follow the instructions to bind the role to your account.' ) @@ -27,18 +27,6 @@ class ServerlessComponent extends Component { } async deployFunction(credentials, inputs, regionList) { - if (!inputs.role) { - try { - const camClient = new Cam(credentials) - const roleExist = await camClient.CheckSCFExcuteRole() - if (roleExist) { - inputs.role = 'QCS_SCFExcuteRole' - } - } catch (e) { - // no op - } - } - const outputs = {} const appId = this.getAppId() @@ -91,34 +79,6 @@ class ServerlessComponent extends Component { return outputs } - // try to add dns record - async tryToAddDnsRecord(credentials, customDomains) { - try { - const cns = new Cns(credentials) - for (let i = 0; i < customDomains.length; i++) { - const item = customDomains[i] - if (item.domainPrefix) { - await cns.deploy({ - domain: item.subDomain.replace(`${item.domainPrefix}.`, ''), - records: [ - { - subDomain: item.domainPrefix, - recordType: 'CNAME', - recordLine: '默认', - value: item.cname, - ttl: 600, - mx: 10, - status: 'enable' - } - ] - }) - } - } - } catch (e) { - console.log('METHOD_tryToAddDnsRecord', e.message) - } - } - async deployApigateway(credentials, inputs, regionList) { if (inputs.isDisabled) { return {} @@ -156,10 +116,6 @@ class ServerlessComponent extends Component { } if (apigwOutput.customDomains) { - // TODO: need confirm add cns authentication - if (inputs.autoAddDnsRecord === true) { - // await this.tryToAddDnsRecord(credentials, apigwOutput.customDomains) - } outputs[curRegion].customDomains = apigwOutput.customDomains } this.state[curRegion] = { @@ -267,13 +223,6 @@ class ServerlessComponent extends Component { await Promise.all(removeHandlers) - if (this.state.cns) { - const cns = new Cns(credentials) - for (let i = 0; i < this.state.cns.length; i++) { - await cns.remove({ deleteList: this.state.cns[i].records }) - } - } - this.state = {} } } diff --git a/src/utils.js b/src/utils.js index 8be17c0..39f8264 100644 --- a/src/utils.js +++ b/src/utils.js @@ -5,7 +5,7 @@ const ensureObject = require('type/object/ensure') const ensureIterable = require('type/iterable/ensure') const ensureString = require('type/string/ensure') const download = require('download') -const { TypeError } = require('tencent-component-toolkit/src/utils/error') +const { ApiTypeError } = require('tencent-component-toolkit/lib/utils/error') const CONFIGS = require('./config') /* @@ -57,13 +57,13 @@ const getDefaultServiceDescription = () => { const validateTraffic = (num) => { if (getType(num) !== 'Number') { - throw new TypeError( + throw new ApiTypeError( `PARAMETER_${CONFIGS.compName.toUpperCase()}_TRAFFIC`, 'traffic must be a number' ) } if (num < 0 || num > 1) { - throw new TypeError( + throw new ApiTypeError( `PARAMETER_${CONFIGS.compName.toUpperCase()}_TRAFFIC`, 'traffic must be a number between 0 and 1' ) @@ -87,7 +87,7 @@ const getCodeZipPath = async (instance, inputs) => { filename: `${filename}.zip` }) } catch (e) { - throw new TypeError(`DOWNLOAD_TEMPLATE`, 'Download default template failed.') + throw new ApiTypeError(`DOWNLOAD_TEMPLATE`, 'Download default template failed.') } zipPath = `${downloadPath}/${filename}.zip` } else { @@ -236,7 +236,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { lastVersion: instance.state.lastVersion, timeout: tempFunctionConf.timeout ? tempFunctionConf.timeout : CONFIGS.timeout, memorySize: tempFunctionConf.memorySize ? tempFunctionConf.memorySize : CONFIGS.memorySize, - tags: ensureObject(tempFunctionConf.tags ? tempFunctionConf.tags : inputs.tag, { + tags: ensureObject(tempFunctionConf.tags ? tempFunctionConf.tags : inputs.tags, { default: null }) }) @@ -259,8 +259,8 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { } } - if (tempFunctionConf.vpcConfig) { - functionConf.vpcConfig = tempFunctionConf.vpcConfig + if (tempFunctionConf.vpcConfig || tempFunctionConf.vpc) { + functionConf.vpcConfig = tempFunctionConf.vpcConfig || tempFunctionConf.vpc } // 对apigw inputs进行标准化 @@ -270,12 +270,19 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { ? inputs.apigwConfig : {} const apigatewayConf = Object.assign(tempApigwConf, { - serviceId: inputs.serviceId || tempApigwConf.serviceId, + serviceId: inputs.serviceId || tempApigwConf.serviceId || tempApigwConf.id, region: regionList, isDisabled: tempApigwConf.isDisabled === true, fromClientRemark: fromClientRemark, - serviceName: inputs.serviceName || tempApigwConf.serviceName || getDefaultServiceName(instance), - serviceDesc: tempApigwConf.serviceDesc || getDefaultServiceDescription(instance), + serviceName: + inputs.serviceName || + tempApigwConf.serviceName || + tempApigwConf.name || + getDefaultServiceName(instance), + serviceDesc: + tempApigwConf.serviceDesc || + tempApigwConf.description || + getDefaultServiceDescription(instance), protocols: tempApigwConf.protocols || ['http'], environment: tempApigwConf.environment ? tempApigwConf.environment : 'release', customDomains: tempApigwConf.customDomains || [] @@ -285,7 +292,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { { path: tempApigwConf.path || '/', enableCORS: tempApigwConf.enableCORS, - serviceTimeout: tempApigwConf.serviceTimeout, + serviceTimeout: tempApigwConf.serviceTimeout || tempApigwConf.timeout, method: 'ANY', apiName: tempApigwConf.apiName || 'index', function: { From 2c921c77484b433e357510623cdc32ab1a8f55bf Mon Sep 17 00:00:00 2001 From: slsplus Date: Tue, 23 Feb 2021 07:42:37 +0000 Subject: [PATCH 49/54] chore(release): version 0.2.0 # [0.2.0](https://github.com/serverless-components/tencent-laravel/compare/v0.1.2...v0.2.0) (2021-02-23) ### Features * support post form data ([ea1af31](https://github.com/serverless-components/tencent-laravel/commit/ea1af31739596d818b99d7206c84180662dd24da)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 550d8d0..a09407d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [0.2.0](https://github.com/serverless-components/tencent-laravel/compare/v0.1.2...v0.2.0) (2021-02-23) + + +### Features + +* support post form data ([ea1af31](https://github.com/serverless-components/tencent-laravel/commit/ea1af31739596d818b99d7206c84180662dd24da)) + ## [0.1.2](https://github.com/serverless-components/tencent-laravel/compare/v0.1.1...v0.1.2) (2020-12-15) From db98f6ba368fabe898d42020b153eb88e9f30efd Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 23 Feb 2021 15:53:44 +0800 Subject: [PATCH 50/54] fix: support base64 encode --- example/serverless.yml | 1 - serverless.component.yml | 2 +- src/utils.js | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/serverless.yml b/example/serverless.yml index 8d0ee3e..78b5665 100644 --- a/example/serverless.yml +++ b/example/serverless.yml @@ -13,4 +13,3 @@ inputs: - http - https environment: release - isBase64Encoded: true diff --git a/serverless.component.yml b/serverless.component.yml index 0206ee7..660d9f4 100644 --- a/serverless.component.yml +++ b/serverless.component.yml @@ -1,5 +1,5 @@ name: laravel -version: 0.2.0 +version: 0.2.1 author: 'Tencent Cloud, Inc' org: 'Tencent Cloud, Inc' description: Deploy a serverless Laravel application on Tencent SCF and API Gateway. diff --git a/src/utils.js b/src/utils.js index 39f8264..d4f0530 100644 --- a/src/utils.js +++ b/src/utils.js @@ -295,6 +295,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { serviceTimeout: tempApigwConf.serviceTimeout || tempApigwConf.timeout, method: 'ANY', apiName: tempApigwConf.apiName || 'index', + isBase64Encoded: tempApigwConf.isBase64Encoded, function: { isIntegratedResponse: true, functionName: functionConf.name, From a6a31ed55af336cdce030f096ea3218d93816371 Mon Sep 17 00:00:00 2001 From: slsplus Date: Tue, 23 Feb 2021 07:57:51 +0000 Subject: [PATCH 51/54] chore(release): version 0.2.1 ## [0.2.1](https://github.com/serverless-components/tencent-laravel/compare/v0.2.0...v0.2.1) (2021-02-23) ### Bug Fixes * support base64 encode ([db98f6b](https://github.com/serverless-components/tencent-laravel/commit/db98f6ba368fabe898d42020b153eb88e9f30efd)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a09407d..8534a4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.2.1](https://github.com/serverless-components/tencent-laravel/compare/v0.2.0...v0.2.1) (2021-02-23) + + +### Bug Fixes + +* support base64 encode ([db98f6b](https://github.com/serverless-components/tencent-laravel/commit/db98f6ba368fabe898d42020b153eb88e9f30efd)) + # [0.2.0](https://github.com/serverless-components/tencent-laravel/compare/v0.1.2...v0.2.0) (2021-02-23) From 80a09872e2ce5b368d4e3afe803c82f32898bb6a Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 23 Feb 2021 16:20:31 +0800 Subject: [PATCH 52/54] chore: update example --- example/routes/api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/routes/api.php b/example/routes/api.php index 11c3605..5dcec38 100644 --- a/example/routes/api.php +++ b/example/routes/api.php @@ -36,10 +36,11 @@ ]); }); -// upload file demo +// 上传文件接口示例 Route::post('/upload', function (Request $request) { - // field file in form data + // 表单中字段为 file if ($request->file) { + // TODO: 这里只是将文件临时存储到 /tmp 下,用户需要根据个人需要存储到持久化服务,比如腾讯云的对象存储、文件存储等。 $upload = $request->file->store('upload'); $uploadFile = storage_path()."/app/".$upload; } From 4074ae2911ac24db3e44757e5b1ea51f16d38d55 Mon Sep 17 00:00:00 2001 From: yugasun Date: Tue, 23 Feb 2021 20:15:27 +0800 Subject: [PATCH 53/54] docs: update configure --- docs/configure.md | 23 +++++++++++------------ src/utils.js | 14 ++++++-------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index c62f349..2e66099 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -12,7 +12,6 @@ name: laravelDemo # 必选) 组件实例名称. inputs: region: ap-guangzhou # 云函数所在区域 - entryFile: sls.js # 自定义 server 的入口文件名,默认为 sls.js,如果不想修改文件名为 sls.js 可以自定义 src: # 部署src下的文件代码,并打包成zip上传到bucket上 src: ./ # 本地需要打包的文件目录 exclude: # 被排除的文件或目录 @@ -23,7 +22,7 @@ inputs: # object: cos.zip # bucket key 指定存储桶内的文件 functionConf: # 函数配置相关 name: webDemo # 云函数名称 - runtime: Nodejs10.15 # 运行环境 + runtime: Php7 # 运行环境 timeout: 10 # 超时时间,单位秒 eip: false # 是否固定出口IP memorySize: 128 # 内存大小,单位MB @@ -99,16 +98,16 @@ inputs: 函数配置 -| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | -| ----------- | :------: | :-------------------------- | :-----------: | :------------------------------------------------------------------------------ | -| runtime | 否 | string | `Nodejs10.15` | 执行环境, 支持: Nodejs6.10, Nodejs8.9, Nodejs10.15, Nodejs12.16 | -| timeout | 否 | number | `3` | 函数最长执行时间,单位为秒,可选值范围 1-900 秒,默认为 3 秒 | -| memorySize | 否 | number | `128` | 函数运行时内存大小,默认为 128M,可选范围 64、128MB-3072MB,并且以 128MB 为阶梯 | -| environment | 否 | [Environment](#Environment) | | 函数的环境变量 | -| vpc | 否 | [Vpc](#Vpc) | | 函数的 VPC 配置 | -| layers | 否 | [Layer](#Layer)[] | | 云函数绑定的 layer | -| tags | 否 | object | | 云函数标签,`key-value` 形式配置 | -| eip | 否 | boolean | `false` | 是否固定出口 IP | +| 参数名称 | 是否必选 | 类型 | 默认值 | 描述 | +| ----------- | :------: | :-------------------------- | :-----: | :------------------------------------------------------------------------------ | +| runtime | 否 | string | `Php7` | 执行环境, 支持: Php7,Php5 | +| timeout | 否 | number | `3` | 函数最长执行时间,单位为秒,可选值范围 1-900 秒,默认为 3 秒 | +| memorySize | 否 | number | `128` | 函数运行时内存大小,默认为 128M,可选范围 64、128MB-3072MB,并且以 128MB 为阶梯 | +| environment | 否 | [Environment](#Environment) | | 函数的环境变量 | +| vpc | 否 | [Vpc](#Vpc) | | 函数的 VPC 配置 | +| layers | 否 | [Layer](#Layer)[] | | 云函数绑定的 layer | +| tags | 否 | object | | 云函数标签,`key-value` 形式配置 | +| eip | 否 | boolean | `false` | 是否固定出口 IP | > 此处只是列举,`faas` 参数支持 [scf][scf-config] 组件的所有基础配置( `events` 除外) diff --git a/src/utils.js b/src/utils.js index d4f0530..66456c8 100644 --- a/src/utils.js +++ b/src/utils.js @@ -201,9 +201,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { object: inputs.srcOriginal && inputs.srcOriginal.object }, name: - ensureString(inputs.functionName, { isOptional: true }) || - stateFunctionName || - getDefaultFunctionName(), + tempFunctionConf.name || inputs.functionName || stateFunctionName || getDefaultFunctionName(), region: regionList, role: ensureString(tempFunctionConf.role ? tempFunctionConf.role : inputs.role, { default: '' @@ -234,8 +232,8 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { publish: inputs.publish, traffic: inputs.traffic, lastVersion: instance.state.lastVersion, - timeout: tempFunctionConf.timeout ? tempFunctionConf.timeout : CONFIGS.timeout, - memorySize: tempFunctionConf.memorySize ? tempFunctionConf.memorySize : CONFIGS.memorySize, + timeout: tempFunctionConf.timeout || CONFIGS.timeout, + memorySize: tempFunctionConf.memorySize || CONFIGS.memorySize, tags: ensureObject(tempFunctionConf.tags ? tempFunctionConf.tags : inputs.tags, { default: null }) @@ -270,14 +268,14 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { ? inputs.apigwConfig : {} const apigatewayConf = Object.assign(tempApigwConf, { - serviceId: inputs.serviceId || tempApigwConf.serviceId || tempApigwConf.id, + serviceId: tempApigwConf.serviceId || tempApigwConf.id || inputs.serviceId, region: regionList, isDisabled: tempApigwConf.isDisabled === true, fromClientRemark: fromClientRemark, serviceName: - inputs.serviceName || tempApigwConf.serviceName || tempApigwConf.name || + inputs.serviceName || getDefaultServiceName(instance), serviceDesc: tempApigwConf.serviceDesc || @@ -291,7 +289,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => { apigatewayConf.endpoints = [ { path: tempApigwConf.path || '/', - enableCORS: tempApigwConf.enableCORS, + enableCORS: tempApigwConf.enableCORS || tempApigwConf.cors, serviceTimeout: tempApigwConf.serviceTimeout || tempApigwConf.timeout, method: 'ANY', apiName: tempApigwConf.apiName || 'index', From 2fa7c2dfbc2955ed12a9e83dcc5c7fdbfde2d309 Mon Sep 17 00:00:00 2001 From: yugasun Date: Mon, 22 Mar 2021 16:11:12 +0800 Subject: [PATCH 54/54] docs: update readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 852ee93..1eebee9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +⚠️⚠️⚠️ 所有框架组件项目迁移到 [tencent-framework-components](https://github.com/serverless-components/tencent-framework-components). + [![Serverless PHP Laravel Tencent Cloud](https://img.serverlesscloud.cn/20191226/1577347087676-website_%E9%95%BF.png)](http://serverless.com) [![Build Status](https://github.com/serverless-components/tencent-laravel/workflows/Test/badge.svg)](https://github.com/serverless-components/tencent-laravel/actions?query=workflow:Test)