summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-09-06 07:50:07 +0200
committerRemi Collet <remi@remirepo.net>2018-09-06 07:50:07 +0200
commit013d41c747a6a2c6e785129a7baf3f6e39317e5f (patch)
treeefe6559ba8d6e84cb47fbdf5286191fabb67440a
parente8a0a8851e32b9c2debce9e63635ddad9da64d94 (diff)
update to 1.8.6HEADmaster
bundle php-http/psr7-integration-tests only used for tests
-rw-r--r--composer-psr7.json43
-rw-r--r--composer.json1
-rwxr-xr-xphp-http-psr7-integration-tests-get-source.sh70
-rw-r--r--php-zendframework-zend-diactoros.spec27
4 files changed, 136 insertions, 5 deletions
diff --git a/composer-psr7.json b/composer-psr7.json
new file mode 100644
index 0000000..83b1a99
--- /dev/null
+++ b/composer-psr7.json
@@ -0,0 +1,43 @@
+{
+ "name": "php-http/psr7-integration-tests",
+ "description": "Test suite for PSR7",
+ "license": "MIT",
+ "keywords": ["test", "psr-7"],
+ "homepage": "http://php-http.org",
+ "authors": [
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com"
+ }
+ ],
+ "require": {
+ "php": "^5.4 || ^7.0",
+ "psr/http-message": "^1.0",
+ "phpunit/phpunit": "^5.4 || ^6.0 || ^7.0"
+ },
+ "require-dev": {
+ "zendframework/zend-diactoros": "^1.8",
+ "guzzlehttp/psr7": "^1.4",
+ "slim/http": "^0.3",
+ "ringcentral/psr7": "^1.2",
+ "nyholm/psr7": "dev-master"
+ },
+ "autoload": {
+ "psr-4": {
+ "Http\\Psr7Test\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Http\\Psr7Test\\Tests\\": "tests/"
+ }
+ },
+ "scripts": {
+ "test": "vendor/bin/phpunit"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ }
+}
diff --git a/composer.json b/composer.json
index fd36a52..ddb91d9 100644
--- a/composer.json
+++ b/composer.json
@@ -30,6 +30,7 @@
"require-dev": {
"ext-dom": "*",
"ext-libxml": "*",
+ "php-http/psr7-integration-tests": "dev-master",
"phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7",
"zendframework/zend-coding-standard": "~1.0"
},
diff --git a/php-http-psr7-integration-tests-get-source.sh b/php-http-psr7-integration-tests-get-source.sh
new file mode 100755
index 0000000..dfa11c9
--- /dev/null
+++ b/php-http-psr7-integration-tests-get-source.sh
@@ -0,0 +1,70 @@
+#/bin/sh
+
+GIT=`which git`
+RPM=`which rpm`
+
+if [ -z "$GIT" ]
+then
+ echo "ERROR: 'git' command not found" 1>&2
+ exit 1
+elif [ -z "$RPM" ]
+then
+ echo "ERROR: 'rpm' command not found" 1>&2
+ exit 1
+fi
+
+function print {
+ echo -e "\e[0;33m>>>>> ${1}\e[0m"
+}
+
+if [ -x "$1" ]
+then
+ SPEC=$1
+else
+ SPEC=`ls *.spec | head -1`
+fi
+
+VERSION=`egrep '%global\s*github_psr7_version' $SPEC | awk '{print $3}'`
+
+GIT_OWNER=`egrep '%global\s*github_psr7_owner' $SPEC | awk '{print $3}'`
+GIT_NAME=`egrep '%global\s*github_psr7_name' $SPEC | awk '{print $3}'`
+GIT_COMMIT=`egrep '%global\s*github_psr7_commit' $SPEC | awk '{print $3}'`
+GIT_REPO=https://github.com/${GIT_OWNER}/${GIT_NAME}
+GIT_DIR=`echo $GIT_REPO | sed 's#.*/##'`
+NAME="$GIT_OWNER-$GIT_NAME"
+
+print "SPEC = $SPEC"
+print "NAME = $NAME"
+print "GIT_OWNER = $GIT_OWNER"
+print "GIT_NAME = $GIT_NAME"
+print "GIT_COMMIT = $GIT_COMMIT"
+print "GIT_REPO = $GIT_REPO"
+print "GIT_DIR = $GIT_DIR"
+
+TEMP_DIR=$(mktemp --dir)
+TAR_FILE=$PWD/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
+CMP_FILE=$PWD/composer-psr7.json
+
+pushd $TEMP_DIR
+ print "Cloning git repo..."
+ $GIT clone $GIT_REPO
+
+ pushd $GIT_DIR
+ print "Checking out commit..."
+ $GIT checkout $GIT_COMMIT
+ cp composer.json $CMP_FILE
+ popd
+
+ TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
+ print "TAR_DIR = $TAR_DIR"
+
+ mv $GIT_DIR $TAR_DIR
+
+ print "TAR_FILE = $TAR_FILE"
+
+ [ -e $TAR_FILE ] && rm -f $TAR_FILE
+ tar --exclude-vcs -czf $TAR_FILE $TAR_DIR
+ chmod 0644 $TAR_FILE
+popd
+
+rm -rf $TEMP_DIR
diff --git a/php-zendframework-zend-diactoros.spec b/php-zendframework-zend-diactoros.spec
index 1677894..e30842e 100644
--- a/php-zendframework-zend-diactoros.spec
+++ b/php-zendframework-zend-diactoros.spec
@@ -12,8 +12,13 @@
%global github_owner zendframework
%global github_name zend-diactoros
-%global github_version 1.8.5
-%global github_commit 3e4edb822c942f37ade0d09579cfbab11e2fee87
+%global github_version 1.8.6
+%global github_commit 20da13beba0dde8fb648be3cc19765732790f46e
+
+%global github_psr7_owner php-http
+%global github_psr7_name psr7-integration-tests
+%global github_psr7_version 0
+%global github_psr7_commit 5dfefb2da33ca24ae20c971b725c9a6fe7403008
%global composer_vendor zendframework
%global composer_project zend-diactoros
@@ -42,6 +47,9 @@ URL: https://zendframework.github.io/%{github_name}/
# Run php-zendframework-zend-diactoros-get-source.sh to create full source.
Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
Source1: %{name}-get-source.sh
+# Temporarily bundled, no release, only used for tests
+Source2: %{github_psr7_owner}-%{github_psr7_name}-%{github_psr7_version}-%{github_psr7_commit}.tar.gz
+Source3: %{github_psr7_owner}-%{github_psr7_name}-get-source.sh
BuildArch: noarch
# Tests
@@ -61,15 +69,18 @@ BuildRequires: php-composer(psr/http-message) >= %{psr_http_message_min_ver}
BuildRequires: %{phpunit}
BuildRequires: php-dom
BuildRequires: php-libxml
-## phpcompatinfo (computed from version 1.6.0)
+## phpcompatinfo (computed from version 1.8.6)
### NOTE: curl, gd, gmp, and shmop are all optional for
### ZendTest\Diactoros\StreamTest::getResourceFor67()
### (test/StreamTest.php) but the first one found wins
### so only curl is chosen as a requirement here.
BuildRequires: php-curl
+BuildRequires: php-dom
BuildRequires: php-json
+BuildRequires: php-libxml
BuildRequires: php-pcre
BuildRequires: php-reflection
+BuildRequires: php-shmop
BuildRequires: php-spl
%endif
## Autoloader
@@ -85,7 +96,7 @@ Requires: (php-composer(psr/http-message) >= %{psr_http_message_min_ver} wi
Requires: php-composer(psr/http-message) < %{psr_http_message_max_ver}
Requires: php-composer(psr/http-message) >= %{psr_http_message_min_ver}
%endif
-# phpcompatinfo (computed from version 1.4.1)
+# phpcompatinfo (computed from version 1.8.6)
Requires: php-json
Requires: php-pcre
Requires: php-spl
@@ -111,8 +122,9 @@ Autoloader: %{phpdir}/Zend/Diactoros/autoload.php
%prep
-%setup -qn %{github_name}-%{github_commit}
+%setup -qn %{github_name}-%{github_commit} -a2
+mv %{github_psr7_name}-%{github_psr7_commit} psr7
mv LICENSE.md LICENSE
@@ -147,6 +159,7 @@ cat <<'BOOTSTRAP' | tee bootstrap.php
require_once '%{buildroot}%{phpdir}/Zend/Diactoros/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\Diactoros\\', __DIR__.'/test');
+\Fedora\Autoloader\Autoload::addPsr4('Http\\Psr7Test\\', __DIR__.'/psr7/src');
\Fedora\Autoloader\Dependencies::required(array(
__DIR__.'/test/TestAsset/Functions.php',
@@ -183,6 +196,10 @@ exit $RETURN_CODE
%changelog
+* Thu Sep 6 2018 Remi Collet <remi@remirepo.net> - 1.8.6-1
+- update to 1.8.6
+- bundle php-http/psr7-integration-tests only used for tests
+
* Mon Aug 20 2018 Remi Collet <remi@remirepo.net> - 1.8.5-1
- update to 1.8.5