summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--composer.json11
-rw-r--r--php-symfony-contracts2.spec103
-rw-r--r--src/Cache/composer.json5
-rw-r--r--src/Deprecation/composer.json36
-rw-r--r--src/EventDispatcher/composer.json7
-rw-r--r--src/HttpClient/composer.json5
-rw-r--r--src/Service/composer.json5
-rw-r--r--src/Translation/composer.json5
9 files changed, 124 insertions, 54 deletions
diff --git a/Makefile b/Makefile
index 63d3b51..c93aa1e 100644
--- a/Makefile
+++ b/Makefile
@@ -9,4 +9,5 @@ composer:
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
+ test -d Deprecation && mv Deprecation/composer.json src/Deprecation && rmdir Deprecation
diff --git a/composer.json b/composer.json
index 4ac096e..eecf327 100644
--- a/composer.json
+++ b/composer.json
@@ -16,22 +16,23 @@
}
],
"require": {
- "php": ">=7.1.3",
+ "php": ">=7.2.5",
"psr/cache": "^1.0",
- "psr/container": "^1.0"
+ "psr/container": "^1.0",
+ "psr/event-dispatcher": "^1.0"
},
"require-dev": {
"symfony/polyfill-intl-idn": "^1.10"
},
"replace": {
"symfony/cache-contracts": "self.version",
+ "symfony/deprecation-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": "",
@@ -40,14 +41,16 @@
},
"autoload": {
"psr-4": { "Symfony\\Contracts\\": "" },
+ "files": [ "Deprecation/function.php" ],
"exclude-from-classmap": [
"**/Tests/"
]
},
"minimum-stability": "dev",
"extra": {
+ "branch-version": "2.3",
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-main": "2.3-dev"
}
}
}
diff --git a/php-symfony-contracts2.spec b/php-symfony-contracts2.spec
index c8c2986..15dc532 100644
--- a/php-symfony-contracts2.spec
+++ b/php-symfony-contracts2.spec
@@ -1,12 +1,15 @@
-# remirepo/fedora spec file for php-symfony-contracts
+# remirepo/fedora spec file for php-symfony-contracts2
#
-# Copyright (c) 2019 Remi Collet
+# Copyright (c) 2019-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit 011c20407c4b99d454f44021d023fb39ce23b73d
+
+%bcond_without tests
+
+%global gh_commit f7783bdec14b06c323d30a5f74ba70a17ec0ce81
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner symfony
%global gh_project contracts
@@ -17,51 +20,59 @@
%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
+%global major 2
+
+
+Name: php-%{pk_vendor}-%{pk_project}%{major}
+Version: 2.3.1
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
-Summary: A set of abstractions extracted out of the Symfony
+Summary: A set of abstractions extracted out of the Symfony, version %{major}
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}
+%if %{with tests}
# For tests
-BuildRequires: php(language) >= 7.1.3
+BuildRequires: php(language) >= 7.2.5
BuildRequires: php-reflection
+BuildRequires: php-intl
BuildRequires: php-json
BuildRequires: php-pcre
BuildRequires: php-spl
-BuildRequires: php-intl
+BuildRequires: php-zlib
# 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
+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)
+BuildRequires: (php-composer(psr/event-dispatcher) >= 1.0 with php-composer(psr/event-dispatcher) < 2)
+# remirepo:5
%else
BuildRequires: php-psr-cache
BuildRequires: php-psr-container
+BuildRequires: php-psr-event-dispatcher
+%endif
+%if 0%{?fedora} >= 31 || 0%{?rhel} >=9
+%global phpunit %{_bindir}/phpunit9
+%else
+%global phpunit %{_bindir}/phpunit8
%endif
-%global phpunit %{_bindir}/phpunit7
BuildRequires: %{phpunit}
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# From composer.json, "require": {
-# "php": ">=7.1.3"
+# "php": ">=7.2.5"
# "psr/cache": "^1.0",
-# "psr/container": "^1.0"
-Requires: php(language) >= 7.1.3
+# "psr/container": "^1.0",
+# "psr/event-dispatcher": "^1.0"
+Requires: php(language) >= 7.2.5
# From composer.json, "suggest": {
-# "psr/event-dispatcher": "When using the EventDispatcher contracts",
# "symfony/cache-implementation": "",
# "symfony/event-dispatcher-implementation": "",
# "symfony/http-client-implementation": "",
@@ -71,28 +82,30 @@ Requires: php(language) >= 7.1.3
%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)
+Requires: (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
+# From phpcompatinfo report for version 2.3.1
Requires: php-reflection
+Requires: php-intl
Requires: php-json
Requires: php-pcre
Requires: php-spl
-Requires: php-intl
+Requires: php-zlib
# 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}/%{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}
+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}
+Provides: php-composer(%{pk_vendor}/deprecation-contracts) = %{version}
%description
@@ -101,13 +114,16 @@ 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
+Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-for i in */composer.json */LICENSE */README.md
+# sub CHANGELOG and README only refer to main file
+rm */*.md
+
+for i in */composer.json */LICENSE
do
mv $i $(dirname $i)_$(basename $i)
done
@@ -121,35 +137,37 @@ cat <<'AUTOLOAD' | tee autoload.php
require_once '%{php_home}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('%{ns_vendor}\\%{ns_project}\\', __DIR__);
-\Fedora\Autoloader\Dependencies::optional([
+\Fedora\Autoloader\Dependencies::required([
'%{php_home}/Psr/Cache/autoload.php',
'%{php_home}/Psr/Container/autoload.php',
'%{php_home}/Psr/EventDispatcher/autoload.php',
+ __DIR__ . '/Deprecation/function.php',
]);
AUTOLOAD
%install
-mkdir -p %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}
-for i in autoload.php Cache EventDispatcher HttpClient Service Translation
+mkdir -p %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}
+for i in autoload.php Cache EventDispatcher HttpClient Service Translation Deprecation
do
rm -f $i/.gitignore
- cp -pr $i %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/$i
+ cp -pr $i %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/$i
done
%check
-%if %{with_tests}
+%if %{with tests}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
-require_once '%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php';
+require_once '%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php';
EOF
ret=0
-for cmd in php php71 php72 php73 php74; do
- if which $cmd; then
- $cmd %{phpunit} \
+for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit9} \
--no-coverage \
--verbose
fi
@@ -167,10 +185,17 @@ exit $ret
%doc *composer.json
%doc *.md
%dir %{php_home}/%{ns_vendor}/
- %{php_home}/%{ns_vendor}/%{ns_project}
+ %{php_home}/%{ns_vendor}/%{ns_project}%{major}
%changelog
+* Wed Oct 28 2020 Remi Collet <remi@remirepo.net> - 2.3.1-1
+- update to 2.3.1
+- rename to php-symfony-contracts2
+- install in /usr/share/php/Symfony/Contracts2
+- raise dependency on PHP 7.2.5
+- add symfony/deprecation-contracts
+
* Wed Sep 9 2020 Remi Collet <remi@remirepo.net> - 1.1.10-1
- update to 1.1.10
diff --git a/src/Cache/composer.json b/src/Cache/composer.json
index 97eabec..f95df70 100644
--- a/src/Cache/composer.json
+++ b/src/Cache/composer.json
@@ -16,7 +16,7 @@
}
],
"require": {
- "php": ">=7.1.3",
+ "php": ">=7.2.5",
"psr/cache": "^1.0"
},
"suggest": {
@@ -27,8 +27,9 @@
},
"minimum-stability": "dev",
"extra": {
+ "branch-version": "2.3",
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-main": "2.3-dev"
},
"thanks": {
"name": "symfony/contracts",
diff --git a/src/Deprecation/composer.json b/src/Deprecation/composer.json
new file mode 100644
index 0000000..27aa491
--- /dev/null
+++ b/src/Deprecation/composer.json
@@ -0,0 +1,36 @@
+{
+ "name": "symfony/deprecation-contracts",
+ "type": "library",
+ "description": "A generic function and convention to trigger deprecation notices",
+ "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"
+ },
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-version": "2.3",
+ "branch-alias": {
+ "dev-main": "2.3-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ }
+}
diff --git a/src/EventDispatcher/composer.json b/src/EventDispatcher/composer.json
index 862c256..36aeed0 100644
--- a/src/EventDispatcher/composer.json
+++ b/src/EventDispatcher/composer.json
@@ -16,10 +16,10 @@
}
],
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.2.5",
+ "psr/event-dispatcher": "^1"
},
"suggest": {
- "psr/event-dispatcher": "",
"symfony/event-dispatcher-implementation": ""
},
"autoload": {
@@ -27,8 +27,9 @@
},
"minimum-stability": "dev",
"extra": {
+ "branch-version": "2.3",
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-main": "2.3-dev"
},
"thanks": {
"name": "symfony/contracts",
diff --git a/src/HttpClient/composer.json b/src/HttpClient/composer.json
index 2382aa7..2dc9990 100644
--- a/src/HttpClient/composer.json
+++ b/src/HttpClient/composer.json
@@ -16,7 +16,7 @@
}
],
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.2.5"
},
"suggest": {
"symfony/http-client-implementation": ""
@@ -26,8 +26,9 @@
},
"minimum-stability": "dev",
"extra": {
+ "branch-version": "2.3",
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-main": "2.3-dev"
},
"thanks": {
"name": "symfony/contracts",
diff --git a/src/Service/composer.json b/src/Service/composer.json
index 58748f3..efbf399 100644
--- a/src/Service/composer.json
+++ b/src/Service/composer.json
@@ -16,7 +16,7 @@
}
],
"require": {
- "php": ">=7.1.3",
+ "php": ">=7.2.5",
"psr/container": "^1.0"
},
"suggest": {
@@ -27,8 +27,9 @@
},
"minimum-stability": "dev",
"extra": {
+ "branch-version": "2.3",
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-main": "2.3-dev"
},
"thanks": {
"name": "symfony/contracts",
diff --git a/src/Translation/composer.json b/src/Translation/composer.json
index 7a449e0..311c38b 100644
--- a/src/Translation/composer.json
+++ b/src/Translation/composer.json
@@ -16,7 +16,7 @@
}
],
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.2.5"
},
"suggest": {
"symfony/translation-implementation": ""
@@ -26,8 +26,9 @@
},
"minimum-stability": "dev",
"extra": {
+ "branch-version": "2.3",
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-main": "2.3-dev"
},
"thanks": {
"name": "symfony/contracts",