summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-09-04 11:54:18 +0200
committerRemi Collet <remi@remirepo.net>2017-09-04 11:54:18 +0200
commit837e0d2ef9930ac8199f152da3e75b4aefe8adc6 (patch)
tree9950d1fd7c7abed4902fbef77e20f75ff886ce13
parent76ad42f108a9f963a28ed8768f1e9d05a0aef884 (diff)
v1.7.1
-rw-r--r--composer.json4
-rwxr-xr-xmakesrc.sh28
-rw-r--r--php-phpspec-prophecy-upstream.patch27
-rw-r--r--php-phpspec-prophecy.spec52
4 files changed, 56 insertions, 55 deletions
diff --git a/composer.json b/composer.json
index 7918065..fc9ba78 100644
--- a/composer.json
+++ b/composer.json
@@ -19,7 +19,7 @@
"require": {
"php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
"sebastian/comparator": "^1.1|^2.0",
"doctrine/instantiator": "^1.0.2",
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
@@ -44,7 +44,7 @@
"extra": {
"branch-alias": {
- "dev-master": "1.6.x-dev"
+ "dev-master": "1.7.x-dev"
}
}
}
diff --git a/makesrc.sh b/makesrc.sh
new file mode 100755
index 0000000..87d223d
--- /dev/null
+++ b/makesrc.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+NAME=$(basename $PWD)
+OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec)
+PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec)
+VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec)
+COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec)
+SHORT=${COMMIT:0:7}
+
+echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n"
+
+echo "Cloning..."
+rm -rf $PROJECT-$COMMIT
+git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
+
+echo "Getting commit..."
+pushd $PROJECT-$COMMIT
+git checkout $COMMIT
+cp composer.json ../composer.json
+popd
+
+echo "Archiving..."
+tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
+
+echo "Cleaning..."
+rm -rf $PROJECT-$COMMIT
+
+echo "Done."
diff --git a/php-phpspec-prophecy-upstream.patch b/php-phpspec-prophecy-upstream.patch
deleted file mode 100644
index e293c3f..0000000
--- a/php-phpspec-prophecy-upstream.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From ddc426cb8851c551a79b6872929ced532c3af207 Mon Sep 17 00:00:00 2001
-From: Anyqax <mail@martinmenke.net>
-Date: Tue, 14 Jun 2016 12:55:22 +0200
-Subject: [PATCH] Fix incorrect method argument order
-
----
- src/Prophecy/Argument/Token/ObjectStateToken.php | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/Prophecy/Argument/Token/ObjectStateToken.php b/src/Prophecy/Argument/Token/ObjectStateToken.php
-index 8d93bfd..d771077 100644
---- a/src/Prophecy/Argument/Token/ObjectStateToken.php
-+++ b/src/Prophecy/Argument/Token/ObjectStateToken.php
-@@ -61,11 +61,11 @@ public function scoreArgument($argument)
- $actual = call_user_func(array($argument, $this->name));
-
- $comparator = $this->comparatorFactory->getComparatorFor(
-- $actual, $this->value
-+ $this->value, $actual
- );
-
- try {
-- $comparator->assertEquals($actual, $this->value);
-+ $comparator->assertEquals($this->value, $actual);
- return 8;
- } catch (ComparisonFailure $failure) {
- return false;
diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec
index 89aeafb..e2fa0eb 100644
--- a/php-phpspec-prophecy.spec
+++ b/php-phpspec-prophecy.spec
@@ -7,26 +7,27 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 93d39f1f7f9326d746203c7c056f300f7f126073
+%global gh_commit 15ea9ac619e37009edcda64089e3fa4cc88aa659
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpspec
%global gh_project prophecy
%if %{bootstrap}
# no test because of circular dependency with phpspec
-%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
+%global with_tests 0%{?_with_tests:1}
%else
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+%global with_tests 0%{!?_without_tests:1}
%endif
Name: php-phpspec-prophecy
-Version: 1.7.0
-Release: 4%{?dist}
+Version: 1.7.1
+Release: 1%{?dist}
Summary: Highly opinionated mocking framework for PHP
Group: Development/Libraries
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
+Source0: %{name}-%{version}-%{gh_short}.tgz
+Source2: makesrc.sh
# Autoloader
Source1: %{name}-autoload.php
@@ -43,12 +44,13 @@ BuildRequires: php-composer(fedora/autoloader)
# from composer.json, "requires": {
# "php": "^5.3|^7.0",
-# "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
+# "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
# "sebastian/comparator": "^1.1|^2.0",
# "doctrine/instantiator": "^1.0.2",
# "sebastian/recursion-context": "^1.0|^2.0|^3.0"
Requires: php(language) >= 5.3
Requires: php-composer(phpdocumentor/reflection-docblock) >= 2.0
+# ignore v4 for now
Requires: php-composer(phpdocumentor/reflection-docblock) < 4
Requires: php-composer(sebastian/comparator) >= 1.1
Requires: php-composer(sebastian/comparator) < 3
@@ -93,26 +95,20 @@ cp -pr src/* %{buildroot}%{_datadir}/php
%check
%if %{with_tests}
-# remirepo:13
-run=0
-ret=0
-if which php56; then
- php56 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1
- run=1
-fi
-if which php71; then
- php71 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/php \
- -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- %{_bindir}/phpspec \
- run --format pretty --verbose --no-ansi
-# remirepo:2
+phpspec --version
+VER=$(phpspec --version | sed -n -e 's/.* //;s/\..*$//;p')
+if [ $VER -ge 4 ]; then
+ : phpspec $VER is too recent
+ exit 0
fi
+
+ret=0
+for cmd in php php70 php71 php72; do
+ if which $cmd; then
+ $cmd -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
+ %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1
+ fi
+done
exit $ret
%else
: Test suite disabled
@@ -128,6 +124,10 @@ exit $ret
%changelog
+* Mon Sep 4 2017 Remi Collet <remi@remirepo.net> - 1.7.1-1
+- Update to 1.7.11
+- use git snapshot for sources
+
* Thu Apr 13 2017 Shawn Iwinski <shawn@iwin.ski> - 1.7.0-4
- Prepare for php-phpdocumentor-reflection-docblock =>
php-phpdocumentor-reflection-docblock2 dependency rename