summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-11-22 08:01:01 +0100
committerRemi Collet <fedora@famillecollet.com>2016-11-22 08:01:01 +0100
commitc5888ac6f126b7e65ffcf14df4c04a2a51f51de0 (patch)
tree14a8d2a3dd2a64eaa65143468310f32fe6924e9c
parent0034c513066b79a196d4980c481353b28dc320d6 (diff)
php-phpspec-prophecy: 1.6.2
-rw-r--r--composer.json11
-rw-r--r--php-phpspec-prophecy-autoload.php12
-rw-r--r--php-phpspec-prophecy.spec47
3 files changed, 44 insertions, 26 deletions
diff --git a/composer.json b/composer.json
index 23131b2..f10958f 100644
--- a/composer.json
+++ b/composer.json
@@ -22,11 +22,12 @@
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
"sebastian/comparator": "^1.1",
"doctrine/instantiator": "^1.0.2",
- "sebastian/recursion-context": "^1.0"
+ "sebastian/recursion-context": "^1.0|^2.0"
},
"require-dev": {
- "phpspec/phpspec": "^2.0"
+ "phpspec/phpspec": "^2.0",
+ "phpunit/phpunit": "^4.8 || ^5.6.5"
},
"autoload": {
@@ -35,6 +36,12 @@
}
},
+ "autoload-dev": {
+ "psr-4": {
+ "Fixtures\\Prophecy\\": "fixtures"
+ }
+ },
+
"extra": {
"branch-alias": {
"dev-master": "1.6.x-dev"
diff --git a/php-phpspec-prophecy-autoload.php b/php-phpspec-prophecy-autoload.php
index 54effef..12f47cb 100644
--- a/php-phpspec-prophecy-autoload.php
+++ b/php-phpspec-prophecy-autoload.php
@@ -3,17 +3,9 @@
// Rely on include_path as in PHPUnit dependencies + circular dependencies
-// Use Symfony autoloader
-if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
- if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
- require_once 'Symfony/Component/ClassLoader/ClassLoader.php';
- }
+require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
- $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
- $fedoraClassLoader->register();
-}
-
-$fedoraClassLoader->addPrefix('Prophecy\\', dirname(__DIR__));
+\Fedora\Autoloader\Autoload::addPsr4('Prophecy\\', __DIR__);
// Dependencies
require_once 'Doctrine/Instantiator/autoload.php';
diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec
index b76d7b7..9e520f5 100644
--- a/php-phpspec-prophecy.spec
+++ b/php-phpspec-prophecy.spec
@@ -7,7 +7,7 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 58a8137754bc24b25740d4281399a4a3596058e0
+%global gh_commit 6c52c2722f8460122f96f86346600e1077ce22cb
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpspec
%global gh_project prophecy
@@ -19,7 +19,7 @@
%endif
Name: php-phpspec-prophecy
-Version: 1.6.1
+Version: 1.6.2
Release: 1%{?dist}
Summary: Highly opinionated mocking framework for PHP
@@ -36,9 +36,10 @@ BuildArch: noarch
%if %{with_tests}
# from composer.json, "require-dev": {
# "phpspec/phpspec": "^2.0"
+# "phpunit/phpunit": "^4.8 || ^5.6.5"
BuildRequires: php-composer(phpspec/phpspec) >= 2.0
-# For autoloader
-BuildRequires: php-composer(symfony/class-loader)
+# Autoloader
+BuildRequires: php-composer(fedora/autoloader)
%endif
# from composer.json, "requires": {
@@ -46,14 +47,14 @@ BuildRequires: php-composer(symfony/class-loader)
# "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
# "sebastian/comparator": "^1.1",
# "doctrine/instantiator": "^1.0.2",
-# "sebastian/recursion-context": "^1.0"
+# "sebastian/recursion-context": "^1.0|^2.0"
Requires: php(language) >= 5.3
Requires: php-composer(phpdocumentor/reflection-docblock) >= 2.0
Requires: php-composer(phpdocumentor/reflection-docblock) < 4
Requires: php-composer(sebastian/comparator) >= 1.1
Requires: php-composer(sebastian/comparator) < 2
Requires: php-composer(sebastian/recursion-context) >= 1.0
-Requires: php-composer(sebastian/recursion-context) < 2
+Requires: php-composer(sebastian/recursion-context) < 3
# use 1.0.4 to ensure we have the autoloader
Requires: php-composer(doctrine/instantiator) >= 1.0.4
Requires: php-composer(doctrine/instantiator) < 2
@@ -61,8 +62,8 @@ Requires: php-composer(doctrine/instantiator) < 2
Requires: php-pcre
Requires: php-reflection
Requires: php-spl
-# For autoloader
-Requires: php-composer(symfony/class-loader)
+# Autoloader
+Requires: php-composer(fedora/autoloader)
Provides: php-composer(phpspec/prophecy) = %{version}
@@ -93,17 +94,30 @@ cp -pr src/* %{buildroot}%{_datadir}/php
%check
%if %{with_tests}
+: ignore failed tests with phpspec 3.0
+rm spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php
+
+# 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
-
-if which php70; then
- php70 \
- -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- %{_bindir}/phpspec \
- run --format pretty --verbose --no-ansi || :
+# remirepo:2
fi
+exit $ret
%else
: Test suite disabled
%endif
@@ -123,6 +137,11 @@ rm -rf %{buildroot}
%changelog
+* Tue Nov 22 2016 Remi Collet <remi@fedoraproject.org> - 1.6.2-1
+- update to 1.6.2
+- allow sebastian/recursion-context 2.0
+- switch to fedora/autoloader
+
* Tue Jun 7 2016 Remi Collet <remi@fedoraproject.org> - 1.6.1-1
- update to 1.6.1