From 8f929c0ee3ea2f29a02eb720ce1b6aa145257439 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 11 Aug 2019 13:20:18 +0200 Subject: [PATCH] Dropped Integrations module and created LICENSE files for new modules --- composer.json | 6 ++---- config/config.php | 1 - module/Common/LICENSE | 21 +++++++++++++++++++ module/Common/README.md | 2 +- module/EventDispatcher/LICENSE | 21 +++++++++++++++++++ module/EventDispatcher/README.md | 13 ++++++++++++ .../config/dependencies.config.php | 16 -------------- module/Integrations/src/ConfigProvider.php | 14 ------------- module/IpGeolocation/LICENSE | 21 +++++++++++++++++++ module/IpGeolocation/README.md | 4 +++- ...sponseImplicitOptionsMiddlewareFactory.php | 2 +- ...seImplicitOptionsMiddlewareFactoryTest.php | 4 ++-- phpunit.xml.dist | 3 --- 13 files changed, 85 insertions(+), 43 deletions(-) create mode 100644 module/Common/LICENSE create mode 100644 module/EventDispatcher/LICENSE create mode 100644 module/EventDispatcher/README.md delete mode 100644 module/Integrations/config/dependencies.config.php delete mode 100644 module/Integrations/src/ConfigProvider.php create mode 100644 module/IpGeolocation/LICENSE rename module/{Integrations => Rest}/src/Middleware/EmptyResponseImplicitOptionsMiddlewareFactory.php (87%) rename module/{Integrations => Rest}/test/Middleware/EmptyResponseImplicitOptionsMiddlewareFactoryTest.php (87%) diff --git a/composer.json b/composer.json index 2ed59701..bedf3f9a 100644 --- a/composer.json +++ b/composer.json @@ -75,8 +75,7 @@ "Shlinkio\\Shlink\\Core\\": "module/Core/src", "Shlinkio\\Shlink\\Common\\": "module/Common/src", "Shlinkio\\Shlink\\EventDispatcher\\": "module/EventDispatcher/src", - "Shlinkio\\Shlink\\IpGeolocation\\": "module/IpGeolocation/src/", - "Shlinkio\\Shlink\\Integrations\\": "module/Integrations/src/" + "Shlinkio\\Shlink\\IpGeolocation\\": "module/IpGeolocation/src/" }, "files": [ "module/Common/functions/functions.php", @@ -97,8 +96,7 @@ "module/Common/test-db" ], "ShlinkioTest\\Shlink\\EventDispatcher\\": "module/EventDispatcher/test", - "ShlinkioTest\\Shlink\\IpGeolocation\\": "module/IpGeolocation/test", - "ShlinkioTest\\Shlink\\Integrations\\": "module/Integrations/test" + "ShlinkioTest\\Shlink\\IpGeolocation\\": "module/IpGeolocation/test" } }, "scripts": { diff --git a/config/config.php b/config/config.php index f6297fd8..d5776eef 100644 --- a/config/config.php +++ b/config/config.php @@ -18,7 +18,6 @@ return (new ConfigAggregator\ConfigAggregator([ ExpressiveErrorHandler\ConfigProvider::class, Common\ConfigProvider::class, IpGeolocation\ConfigProvider::class, - Integrations\ConfigProvider::class, Core\ConfigProvider::class, CLI\ConfigProvider::class, Rest\ConfigProvider::class, diff --git a/module/Common/LICENSE b/module/Common/LICENSE new file mode 100644 index 00000000..31778387 --- /dev/null +++ b/module/Common/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Alejandro Celaya + +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/module/Common/README.md b/module/Common/README.md index 0804f249..d4dc4815 100644 --- a/module/Common/README.md +++ b/module/Common/README.md @@ -6,7 +6,7 @@ Most of the elements it provides require a [PSR-11] container, and it's easy to ## Install -Install this library using composer +Install this library using composer: composer require shlinkio/shlink-common diff --git a/module/EventDispatcher/LICENSE b/module/EventDispatcher/LICENSE new file mode 100644 index 00000000..31778387 --- /dev/null +++ b/module/EventDispatcher/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Alejandro Celaya + +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/module/EventDispatcher/README.md b/module/EventDispatcher/README.md new file mode 100644 index 00000000..47938c12 --- /dev/null +++ b/module/EventDispatcher/README.md @@ -0,0 +1,13 @@ +# Shlink Event Dispatcher + +This library provides a PSR-14 EventDispatcher which is capable of dispatching both regular listeners and async listeners which are run using [swoole]'s task system. + +Most of the elements it provides require a [PSR-11] container, and it's easy to integrate on [expressive] applications thanks to the `ConfigProvider` it includes. + +## Install + +Install this library using composer: + + composer require shlinkio/shlink-event-dispatcher + +> This library is also an expressive module which provides its own `ConfigProvider`. Add it to your configuration to get everything automatically set up. diff --git a/module/Integrations/config/dependencies.config.php b/module/Integrations/config/dependencies.config.php deleted file mode 100644 index d2944e54..00000000 --- a/module/Integrations/config/dependencies.config.php +++ /dev/null @@ -1,16 +0,0 @@ - [ - 'factories' => [ - ImplicitOptionsMiddleware::class => Middleware\EmptyResponseImplicitOptionsMiddlewareFactory::class, - ], - ], - -]; diff --git a/module/Integrations/src/ConfigProvider.php b/module/Integrations/src/ConfigProvider.php deleted file mode 100644 index bcbab248..00000000 --- a/module/Integrations/src/ConfigProvider.php +++ /dev/null @@ -1,14 +0,0 @@ - ./module/IpGeolocation/test - - ./module/Integrations/test -