From f41069184281ff0ef3a046af87325fe752113a0f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 22 May 2019 10:19:52 +0200 Subject: [PATCH] [Contracts] split in one package per sub-contracts --- src/Symfony/Contracts/Cache/LICENSE | 19 +++++++++++ src/Symfony/Contracts/Cache/README.md | 9 +++++ src/Symfony/Contracts/Cache/composer.json | 34 +++++++++++++++++++ src/Symfony/Contracts/EventDispatcher/LICENSE | 19 +++++++++++ .../Contracts/EventDispatcher/README.md | 9 +++++ .../Contracts/EventDispatcher/composer.json | 34 +++++++++++++++++++ src/Symfony/Contracts/HttpClient/LICENSE | 19 +++++++++++ src/Symfony/Contracts/HttpClient/README.md | 9 +++++ .../Contracts/HttpClient/composer.json | 33 ++++++++++++++++++ src/Symfony/Contracts/README.md | 16 --------- src/Symfony/Contracts/Service/LICENSE | 19 +++++++++++ src/Symfony/Contracts/Service/README.md | 9 +++++ src/Symfony/Contracts/Service/composer.json | 34 +++++++++++++++++++ src/Symfony/Contracts/Translation/LICENSE | 19 +++++++++++ src/Symfony/Contracts/Translation/README.md | 9 +++++ .../Contracts/Translation/composer.json | 33 ++++++++++++++++++ src/Symfony/Contracts/composer.json | 8 +++++ 17 files changed, 316 insertions(+), 16 deletions(-) create mode 100644 src/Symfony/Contracts/Cache/LICENSE create mode 100644 src/Symfony/Contracts/Cache/README.md create mode 100644 src/Symfony/Contracts/Cache/composer.json create mode 100644 src/Symfony/Contracts/EventDispatcher/LICENSE create mode 100644 src/Symfony/Contracts/EventDispatcher/README.md create mode 100644 src/Symfony/Contracts/EventDispatcher/composer.json create mode 100644 src/Symfony/Contracts/HttpClient/LICENSE create mode 100644 src/Symfony/Contracts/HttpClient/README.md create mode 100644 src/Symfony/Contracts/HttpClient/composer.json create mode 100644 src/Symfony/Contracts/Service/LICENSE create mode 100644 src/Symfony/Contracts/Service/README.md create mode 100644 src/Symfony/Contracts/Service/composer.json create mode 100644 src/Symfony/Contracts/Translation/LICENSE create mode 100644 src/Symfony/Contracts/Translation/README.md create mode 100644 src/Symfony/Contracts/Translation/composer.json diff --git a/src/Symfony/Contracts/Cache/LICENSE b/src/Symfony/Contracts/Cache/LICENSE new file mode 100644 index 000000000000..3f853aaf35fe --- /dev/null +++ b/src/Symfony/Contracts/Cache/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +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/src/Symfony/Contracts/Cache/README.md b/src/Symfony/Contracts/Cache/README.md new file mode 100644 index 000000000000..58c589e9ea6e --- /dev/null +++ b/src/Symfony/Contracts/Cache/README.md @@ -0,0 +1,9 @@ +Symfony Cache Contracts +======================= + +A set of abstractions extracted out of the Symfony components. + +Can be used to build on semantics that the Symfony components proved useful - and +that already have battle tested implementations. + +See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/src/Symfony/Contracts/Cache/composer.json b/src/Symfony/Contracts/Cache/composer.json new file mode 100644 index 000000000000..d5d7e99b9ffe --- /dev/null +++ b/src/Symfony/Contracts/Cache/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/cache-contracts", + "type": "library", + "description": "Generic abstractions related to caching", + "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/cache": "", + "symfony/cache-implementation": "" + }, + "autoload": { + "psr-4": { "Symfony\\Contracts\\Cache\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + } +} diff --git a/src/Symfony/Contracts/EventDispatcher/LICENSE b/src/Symfony/Contracts/EventDispatcher/LICENSE new file mode 100644 index 000000000000..3f853aaf35fe --- /dev/null +++ b/src/Symfony/Contracts/EventDispatcher/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +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/src/Symfony/Contracts/EventDispatcher/README.md b/src/Symfony/Contracts/EventDispatcher/README.md new file mode 100644 index 000000000000..fb051c73fc74 --- /dev/null +++ b/src/Symfony/Contracts/EventDispatcher/README.md @@ -0,0 +1,9 @@ +Symfony EventDispatcher Contracts +================================= + +A set of abstractions extracted out of the Symfony components. + +Can be used to build on semantics that the Symfony components proved useful - and +that already have battle tested implementations. + +See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/src/Symfony/Contracts/EventDispatcher/composer.json b/src/Symfony/Contracts/EventDispatcher/composer.json new file mode 100644 index 000000000000..55802a491da6 --- /dev/null +++ b/src/Symfony/Contracts/EventDispatcher/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/event-dispatcher-contracts", + "type": "library", + "description": "Generic abstractions related to dispatching event", + "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" + }, + "autoload": { + "psr-4": { "Symfony\\Contracts\\EventDispatcher\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + } +} diff --git a/src/Symfony/Contracts/HttpClient/LICENSE b/src/Symfony/Contracts/HttpClient/LICENSE new file mode 100644 index 000000000000..3f853aaf35fe --- /dev/null +++ b/src/Symfony/Contracts/HttpClient/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +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/src/Symfony/Contracts/HttpClient/README.md b/src/Symfony/Contracts/HttpClient/README.md new file mode 100644 index 000000000000..01f8118949bd --- /dev/null +++ b/src/Symfony/Contracts/HttpClient/README.md @@ -0,0 +1,9 @@ +Symfony HttpClient Contracts +============================ + +A set of abstractions extracted out of the Symfony components. + +Can be used to build on semantics that the Symfony components proved useful - and +that already have battle tested implementations. + +See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/src/Symfony/Contracts/HttpClient/composer.json b/src/Symfony/Contracts/HttpClient/composer.json new file mode 100644 index 000000000000..4dc9b2d38ce1 --- /dev/null +++ b/src/Symfony/Contracts/HttpClient/composer.json @@ -0,0 +1,33 @@ +{ + "name": "symfony/http-client-contracts", + "type": "library", + "description": "Generic abstractions related to HTTP clients", + "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": "^7.1.3" + }, + "suggest": { + "symfony/http-client-implementation": "" + }, + "autoload": { + "psr-4": { "Symfony\\Contracts\\HttpClient\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + } +} diff --git a/src/Symfony/Contracts/README.md b/src/Symfony/Contracts/README.md index 66a465f226d1..480c2a90e7da 100644 --- a/src/Symfony/Contracts/README.md +++ b/src/Symfony/Contracts/README.md @@ -44,22 +44,6 @@ providing abstractions that are useful on their own while still compatible with implementations provided by Symfony. Although not the main target, we hope that the declared contracts will directly or indirectly contribute to the PHP-FIG. -### Why isn't this package split into several packages? - -Putting all interfaces in one package eases discoverability and dependency -management. Instead of dealing with a myriad of small packages and the -corresponding matrix of versions, you just need to deal with one package and one -version. Also when using IDE autocompletion or just reading the source code, it -makes it easier to figure out which contracts are provided. - -There are two downsides to this approach: you may have unused files in your -`vendor/` directory, and in the future, it will be impossible to use two -different sub-namespaces in different major versions of the package. For the -"unused files" downside, it has no practical consequences: their file sizes are -very small, and there is no performance overhead at all since they are never -loaded. For major versions, this package follows the Symfony BC + deprecation -policies, with an additional restriction to never remove deprecated interfaces. - Resources --------- diff --git a/src/Symfony/Contracts/Service/LICENSE b/src/Symfony/Contracts/Service/LICENSE new file mode 100644 index 000000000000..3f853aaf35fe --- /dev/null +++ b/src/Symfony/Contracts/Service/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +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/src/Symfony/Contracts/Service/README.md b/src/Symfony/Contracts/Service/README.md new file mode 100644 index 000000000000..d033a439b9a9 --- /dev/null +++ b/src/Symfony/Contracts/Service/README.md @@ -0,0 +1,9 @@ +Symfony Service Contracts +========================= + +A set of abstractions extracted out of the Symfony components. + +Can be used to build on semantics that the Symfony components proved useful - and +that already have battle tested implementations. + +See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/src/Symfony/Contracts/Service/composer.json b/src/Symfony/Contracts/Service/composer.json new file mode 100644 index 000000000000..0832b82cb151 --- /dev/null +++ b/src/Symfony/Contracts/Service/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/service-contracts", + "type": "library", + "description": "Generic abstractions related to writting services", + "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/container": "", + "symfony/service-implementation": "" + }, + "autoload": { + "psr-4": { "Symfony\\Contracts\\Service\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + } +} diff --git a/src/Symfony/Contracts/Translation/LICENSE b/src/Symfony/Contracts/Translation/LICENSE new file mode 100644 index 000000000000..3f853aaf35fe --- /dev/null +++ b/src/Symfony/Contracts/Translation/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +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/src/Symfony/Contracts/Translation/README.md b/src/Symfony/Contracts/Translation/README.md new file mode 100644 index 000000000000..6c693ce0b35f --- /dev/null +++ b/src/Symfony/Contracts/Translation/README.md @@ -0,0 +1,9 @@ +Symfony Translation Contracts +============================= + +A set of abstractions extracted out of the Symfony components. + +Can be used to build on semantics that the Symfony components proved useful - and +that already have battle tested implementations. + +See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/src/Symfony/Contracts/Translation/composer.json b/src/Symfony/Contracts/Translation/composer.json new file mode 100644 index 000000000000..09749d35f585 --- /dev/null +++ b/src/Symfony/Contracts/Translation/composer.json @@ -0,0 +1,33 @@ +{ + "name": "symfony/translation-contracts", + "type": "library", + "description": "Generic abstractions related to translation", + "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": "^7.1.3" + }, + "suggest": { + "symfony/translation-implementation": "" + }, + "autoload": { + "psr-4": { "Symfony\\Contracts\\Translation\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + } +} diff --git a/src/Symfony/Contracts/composer.json b/src/Symfony/Contracts/composer.json index 001148094942..f78ba697db26 100644 --- a/src/Symfony/Contracts/composer.json +++ b/src/Symfony/Contracts/composer.json @@ -23,9 +23,17 @@ "psr/container": "^1.0", "symfony/polyfill-intl-idn": "^1.10" }, + "replace": { + "symfony/cache-contracts": "self.version", + "symfony/event-dispatcher-contracts": "self.version", + "symfony/http-client-contracts": "self.version", + "symfony/service-contracts": "self.version", + "symfony/translation-contracts": "self.version" + }, "suggest": { "psr/cache": "When using the Cache contracts", "psr/container": "When using the Service contracts", + "psr/event-dispatcher": "When using the EventDispatcher contracts", "symfony/cache-implementation": "", "symfony/event-dispatcher-implementation": "", "symfony/http-client-implementation": "",