From 88b3ee8fd030742d337b287ffada1bde3a6006d9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 28 Oct 2020 14:45:46 +0100 Subject: duplicate v1 --- .gitignore | 8 ++ Makefile | 12 +++ composer.json | 53 ++++++++++ php-symfony-contracts2.spec | 199 ++++++++++++++++++++++++++++++++++++++ src/Cache/composer.json | 38 ++++++++ src/EventDispatcher/composer.json | 38 ++++++++ src/HttpClient/composer.json | 37 +++++++ src/Service/composer.json | 38 ++++++++ src/Translation/composer.json | 37 +++++++ 9 files changed, 460 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 composer.json create mode 100644 php-symfony-contracts2.spec create mode 100644 src/Cache/composer.json create mode 100644 src/EventDispatcher/composer.json create mode 100644 src/HttpClient/composer.json create mode 100644 src/Service/composer.json create mode 100644 src/Translation/composer.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc9aa8c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..63d3b51 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../../common/Makefile + +composer: + tar xf $(shell spectool -l $(NAME).spec | head -n 1 | sed -e 's:.* ::' | sed -e 's:.*/::') --strip-components=1 '*/composer.json' + test -d Cache && mv Cache/composer.json src/Cache && rmdir Cache + test -d EventDispatcher && mv EventDispatcher/composer.json src/EventDispatcher && rmdir EventDispatcher + test -d HttpClient && mv HttpClient/composer.json src/HttpClient && rmdir HttpClient + test -d Service && mv Service/composer.json src/Service && rmdir Service + test -d Translation && mv Translation/composer.json src/Translation && rmdir Translation + diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..4ac096e --- /dev/null +++ b/composer.json @@ -0,0 +1,53 @@ +{ + "name": "symfony/contracts", + "type": "library", + "description": "A set of abstractions extracted out of the Symfony components", + "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", + "psr/cache": "^1.0", + "psr/container": "^1.0" + }, + "require-dev": { + "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/event-dispatcher": "When using the EventDispatcher contracts", + "symfony/cache-implementation": "", + "symfony/event-dispatcher-implementation": "", + "symfony/http-client-implementation": "", + "symfony/service-implementation": "", + "symfony/translation-implementation": "" + }, + "autoload": { + "psr-4": { "Symfony\\Contracts\\": "" }, + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + } +} diff --git a/php-symfony-contracts2.spec b/php-symfony-contracts2.spec new file mode 100644 index 0000000..c8c2986 --- /dev/null +++ b/php-symfony-contracts2.spec @@ -0,0 +1,199 @@ +# remirepo/fedora spec file for php-symfony-contracts +# +# Copyright (c) 2019 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# +%global gh_commit 011c20407c4b99d454f44021d023fb39ce23b73d +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner symfony +%global gh_project contracts +# Packagist +%global pk_vendor %{gh_owner} +%global pk_project %{gh_project} +# Namespace +%global ns_vendor Symfony +%global ns_project Contracts +%global php_home %{_datadir}/php +# Test +%global with_tests 0%{!?_without_tests:1} + +Name: php-%{pk_vendor}-%{pk_project} +Version: 1.1.10 +Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist} +Summary: A set of abstractions extracted out of the Symfony + +License: MIT +URL: https://github.com/%{gh_owner}/%{gh_project} +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{?gh_short}.tar.gz + +BuildArch: noarch +%if %{with_tests} +# For tests +BuildRequires: php(language) >= 7.1.3 +BuildRequires: php-reflection +BuildRequires: php-json +BuildRequires: php-pcre +BuildRequires: php-spl +BuildRequires: php-intl +# From composer.json, "require-dev": { +# "symfony/polyfill-intl-idn": "^1.10" +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >=8 +BuildRequires: (php-composer(psr/cache) >= 1.0 with php-composer(psr/cache) < 2) +BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2) +# remirepo:4 +%else +BuildRequires: php-psr-cache +BuildRequires: php-psr-container +%endif +%global phpunit %{_bindir}/phpunit7 +BuildRequires: %{phpunit} +# Autoloader +BuildRequires: php-composer(fedora/autoloader) +%endif + +# From composer.json, "require": { +# "php": ">=7.1.3" +# "psr/cache": "^1.0", +# "psr/container": "^1.0" +Requires: php(language) >= 7.1.3 +# From composer.json, "suggest": { +# "psr/event-dispatcher": "When using the EventDispatcher contracts", +# "symfony/cache-implementation": "", +# "symfony/event-dispatcher-implementation": "", +# "symfony/http-client-implementation": "", +# "symfony/service-implementation": "", +# "symfony/translation-implementation": "" +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >=8 +Requires: (php-composer(psr/cache) >= 1.0 with php-composer(psr/cache) < 2) +Requires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2) +Recommends: (php-composer(psr/event-dispatcher) >= 1.0 with php-composer(psr/event-dispatcher) < 2) +# remirepo:5 +%else +Requires: php-psr-cache +Requires: php-psr-container +Requires: php-psr-event-dispatcher +%endif +# From phpcompatinfo report for version 1.1.0 +Requires: php-reflection +Requires: php-json +Requires: php-pcre +Requires: php-spl +Requires: php-intl +# Autoloader +Requires: php-composer(fedora/autoloader) + +Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} +Provides: php-composer(%{pk_vendor}/cache-contracts) = %{version} +Provides: php-composer(%{pk_vendor}/event-dispatcher-contracts) = %{version} +Provides: php-composer(%{pk_vendor}/http-client-contracts) = %{version} +Provides: php-composer(%{pk_vendor}/service-contracts) = %{version} +Provides: php-composer(%{pk_vendor}/translation-contracts) = %{version} + + +%description +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. + +Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php + + +%prep +%setup -q -n %{gh_project}-%{gh_commit} + +for i in */composer.json */LICENSE */README.md +do + mv $i $(dirname $i)_$(basename $i) +done + + +%build +: Create autoloader +cat <<'AUTOLOAD' | tee autoload.php + - 1.1.10-1 +- update to 1.1.10 + +* Thu Nov 21 2019 Remi Collet - 1.1.8-1 +- update to 1.1.8 +- psr/cache and psr/container are mandatory + +* Tue Nov 5 2019 Remi Collet - 1.1.7-1 +- update to 1.1.7 +- add missing EventDispatcher and HttpClient directories +- add weak dependency on psr/event-dispatcher + +* Thu Jun 6 2019 Remi Collet - 1.1.3-1 +- update to 1.1.3 + +* Mon Jun 3 2019 Remi Collet - 1.1.2-1 +- update to 1.1.2 (no change) + +* Tue May 28 2019 Remi Collet - 1.1.1-1 +- update to 1.1.1 + +* Thu May 16 2019 Remi Collet - 1.1.0-1 +- update to 1.1.0 + +* Mon Jan 7 2019 Remi Collet - 1.0.2-1 +- initial package, version 1.0.2 diff --git a/src/Cache/composer.json b/src/Cache/composer.json new file mode 100644 index 0000000..97eabec --- /dev/null +++ b/src/Cache/composer.json @@ -0,0 +1,38 @@ +{ + "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", + "psr/cache": "^1.0" + }, + "suggest": { + "symfony/cache-implementation": "" + }, + "autoload": { + "psr-4": { "Symfony\\Contracts\\Cache\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + } +} diff --git a/src/EventDispatcher/composer.json b/src/EventDispatcher/composer.json new file mode 100644 index 0000000..862c256 --- /dev/null +++ b/src/EventDispatcher/composer.json @@ -0,0 +1,38 @@ +{ + "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" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + } +} diff --git a/src/HttpClient/composer.json b/src/HttpClient/composer.json new file mode 100644 index 0000000..2382aa7 --- /dev/null +++ b/src/HttpClient/composer.json @@ -0,0 +1,37 @@ +{ + "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" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + } +} diff --git a/src/Service/composer.json b/src/Service/composer.json new file mode 100644 index 0000000..58748f3 --- /dev/null +++ b/src/Service/composer.json @@ -0,0 +1,38 @@ +{ + "name": "symfony/service-contracts", + "type": "library", + "description": "Generic abstractions related to writing 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", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "autoload": { + "psr-4": { "Symfony\\Contracts\\Service\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + } +} diff --git a/src/Translation/composer.json b/src/Translation/composer.json new file mode 100644 index 0000000..7a449e0 --- /dev/null +++ b/src/Translation/composer.json @@ -0,0 +1,37 @@ +{ + "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" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + } +} -- cgit