summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-08-07 14:37:21 +0200
committerRemi Collet <remi@remirepo.net>2017-08-07 14:37:21 +0200
commitf8640fa8de4ae152bf7d3f39eccede947225c3d6 (patch)
treeb749d223f2d35c06c3bb43160b6519e7299de399
parentaafdd610c6c68f2a30924e4ac54e42269825dd65 (diff)
v4.0.2
-rw-r--r--composer.json21
-rw-r--r--php-phpspec.spec69
-rw-r--r--phpspec-4-rpm.patch (renamed from phpspec-3-rpm.patch)12
-rw-r--r--phpspec-autoload.php5
4 files changed, 47 insertions, 60 deletions
diff --git a/composer.json b/composer.json
index 9daddc4..480ef28 100644
--- a/composer.json
+++ b/composer.json
@@ -22,24 +22,23 @@
],
"require": {
- "php": "^5.6 || ^7.0",
+ "php": "^7.0,<7.2",
"phpspec/prophecy": "^1.5",
"phpspec/php-diff": "^1.0.0",
"sebastian/exporter": "^1.0 || ^2.0 || ^3.0",
- "symfony/console": "^2.7 || ^3.0",
- "symfony/event-dispatcher": "^2.7 || ^3.0",
- "symfony/process": "^2.7 || ^3.0",
- "symfony/finder": "^2.7 || ^3.0",
- "symfony/yaml": "^2.7 || ^3.0",
- "doctrine/instantiator": "^1.0.1",
+ "symfony/console": "^3.2",
+ "symfony/event-dispatcher": "^3.2",
+ "symfony/process": "^3.2",
+ "symfony/finder": "^3.2",
+ "symfony/yaml": "^3.2",
+ "doctrine/instantiator": "^1.0.5",
"ext-tokenizer": "*"
},
"require-dev": {
"behat/behat": "^3.3",
- "symfony/filesystem": "^3.0",
- "phpunit/phpunit": "^5.5|^6.0",
- "ciaranmcnulty/versionbasedtestskipper": "^0.2.1"
+ "symfony/filesystem": "^3.2",
+ "phpunit/phpunit": "^5.7|^6.0"
},
"suggest": {
@@ -62,7 +61,7 @@
"extra": {
"branch-alias": {
- "dev-master": "3.0.x-dev"
+ "dev-master": "4.0.x-dev"
}
}
}
diff --git a/php-phpspec.spec b/php-phpspec.spec
index 5b22735..50ab37a 100644
--- a/php-phpspec.spec
+++ b/php-phpspec.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 2e969c7d8c6437490b7aa0ab51a3302d15bb7211
+%global gh_commit eae06d6b409fc1479e2f12d0a9ab1a88e2fda94c
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpspec
%global gh_project phpspec
@@ -14,18 +14,12 @@
# Only allow a single Symfony version
# to ensure components consistency
-%if 0%{?fedora} > 26
%global symfony_ns Symfony3
-%global symfony_min 3.0
+%global symfony_min 3.2
%global symfony_max 4
-%else
-%global symfony_ns Symfony
-%global symfony_min 2.7
-%global symfony_max 3
-%endif
Name: php-phpspec
-Version: 3.4.0
+Version: 4.0.2
Release: 1%{?dist}
Summary: Specification-oriented BDD framework for PHP
@@ -37,13 +31,16 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
Source1: %{gh_project}-autoload.php
# Use our autoloader
-Patch0: %{gh_project}-3-rpm.patch
+Patch0: %{gh_project}-4-rpm.patch
BuildArch: noarch
+BuildRequires: php(language) >= 7.0
BuildRequires: php-composer(phpspec/prophecy) < 2
BuildRequires: php-composer(phpspec/prophecy) >= 1.5
BuildRequires: php-composer(phpspec/php-diff) < 2
BuildRequires: php-composer(phpspec/php-diff) >= 1.0.0
+BuildRequires: php-composer(sebastian/exporter) < 4
+BuildRequires: php-composer(sebastian/exporter) >= 3
BuildRequires: php-composer(symfony/console) < %{symfony_max}
BuildRequires: php-composer(symfony/console) >= %{symfony_min}
BuildRequires: php-composer(symfony/event-dispatcher) < %{symfony_max}
@@ -58,45 +55,34 @@ BuildRequires: php-composer(doctrine/instantiator) < 2
BuildRequires: php-composer(doctrine/instantiator) >= 1.0.1
# From composer.json, require-dev
# "behat/behat": "^3.3",
-# "symfony/filesystem": "^3.0",
-# "phpunit/phpunit": "^5.5|^6.0",
-# "ciaranmcnulty/versionbasedtestskipper": "^0.2.1"
+# "symfony/filesystem": "^3.2",
+# "phpunit/phpunit": "^5.7|^6.0",
BuildRequires: php-composer(symfony/filesystem) < %{symfony_max}
BuildRequires: php-composer(symfony/filesystem) >= %{symfony_min}
-%if 0%{?fedora} >= 26
-BuildRequires: php-composer(sebastian/exporter) < 4
-%global phpunit %{_bindir}/phpunit6
-%else
-BuildRequires: php-composer(sebastian/exporter) < 3
-%global phpunit %{_bindir}/phpunit
-%endif
-BuildRequires: %{phpunit}
+BuildRequires: phpunit6
# Autoloader
BuildRequires: php-composer(fedora/autoloader) >= 1
# From composer.json, require
-# "php": "^5.6 || ^7.0",
+# "php": "^7.0,<7.2",
# "phpspec/prophecy": "^1.5",
# "phpspec/php-diff": "^1.0.0",
-# "sebastian/exporter": "^1.0 || ^2.0",
-# "symfony/console": "^2.7 || ^3.0",
-# "symfony/event-dispatcher": "^2.7 || ^3.0",
-# "symfony/process": "^2.7 || ^3.0",
-# "symfony/finder": "^2.7 || ^3.0",
-# "symfony/yaml": "^2.7 || ^3.0",
-# "doctrine/instantiator": "^1.0.1"
+# "sebastian/exporter": "^1.0 || ^2.0 || ^3.0",
+# "symfony/console": "^3.2",
+# "symfony/event-dispatcher": "^3.2",
+# "symfony/process": "^3.2",
+# "symfony/finder": "^3.2",
+# "symfony/yaml": "^3.2",
+# "doctrine/instantiator": "^1.0.5"
# "ext-tokenizer": "*"
-Requires: php(language) >= 5.6
+Requires: php(language) >= 7.0
Requires: php-composer(phpspec/prophecy) >= 1.5
Requires: php-composer(phpspec/prophecy) < 2
Requires: php-composer(phpspec/php-diff) >= 1.0.0
Requires: php-composer(phpspec/php-diff) < 2
-%if 0%{?fedora} >= 26
Requires: php-composer(sebastian/exporter) < 4
-%else
-Requires: php-composer(sebastian/exporter) < 3
-%endif
+Requires: php-composer(sebastian/exporter) >= 3
Requires: php-composer(symfony/console) < %{symfony_max}
Requires: php-composer(symfony/console) >= %{symfony_min}
Requires: php-composer(symfony/event-dispatcher) < %{symfony_max}
@@ -107,7 +93,7 @@ Requires: php-composer(symfony/process) < %{symfony_max}
Requires: php-composer(symfony/process) >= %{symfony_min}
Requires: php-composer(symfony/yaml) < %{symfony_max}
Requires: php-composer(symfony/yaml) >= %{symfony_min}
-Requires: php-composer(doctrine/instantiator) >= 1.0.1
+Requires: php-composer(doctrine/instantiator) >= 1.0.5
Requires: php-composer(doctrine/instantiator) < 2
Requires: php-tokenizer
# Autoloader
@@ -167,14 +153,13 @@ rm spec/PhpSpec/NamespaceProvider/ComposerPsrNamespaceProviderSpec.php
# PHP 7.2: https://github.com/phpspec/phpspec/issues/1094
-for cmd in "php %{phpunit}" "php56 %{_bindir}/phpunit" "php70 %{_bindir}/phpunit6" "php71 %{_bindir}/phpunit6"; do
+for cmd in php php70 php71 php72; do
if which $cmd; then
- set $cmd
- $1 -d include_path=.:%{buildroot}%{_datadir}/php \
+ $cmd -d include_path=.:%{buildroot}%{_datadir}/php \
bin/phpspec \
run --format pretty --verbose --no-ansi
- $1 $2 \
+ $cmd %{_bindir}/phpunit6 \
--verbose \
--bootstrap %{buildroot}%{_datadir}/php/PhpSpec/autoload.php
fi
@@ -191,6 +176,12 @@ done
%changelog
+* Mon Aug 7 2017 Remi Collet <remi@remirepo.net> - 4.0.2-1
+- Update to 4.0.2
+- raise dependency on symfony 3.2
+- raise dependency on PHP 7.0
+- switch to phpunit6
+
* Fri May 12 2017 Remi Collet <remi@remirepo.net> - 3.4.0-1
- Update to 3.4.0
diff --git a/phpspec-3-rpm.patch b/phpspec-4-rpm.patch
index 921d82e..90c39ae 100644
--- a/phpspec-3-rpm.patch
+++ b/phpspec-4-rpm.patch
@@ -1,9 +1,9 @@
-diff -up bin/phpspec.rpm bin/phpspec
---- bin/phpspec.rpm 2016-07-18 10:56:02.330062305 +0200
-+++ bin/phpspec 2016-07-18 10:57:56.042682157 +0200
+diff -up ./bin/phpspec.rpm ./bin/phpspec
+--- ./bin/phpspec.rpm 2017-08-07 14:29:54.960373739 +0200
++++ ./bin/phpspec 2017-08-07 14:31:11.824754323 +0200
@@ -3,24 +3,20 @@
- call_user_func(function ($version) {
+ (function ($version) {
- if (is_file($autoload = getcwd() . '/vendor/autoload.php')) {
- require $autoload;
@@ -35,5 +35,5 @@ diff -up bin/phpspec.rpm bin/phpspec
+
+ require_once 'PhpSpec/autoload.php';
- $app = new PhpSpec\Console\Application($version);
- $app->run();
+ (new PhpSpec\Console\Application($version))->run();
+
diff --git a/phpspec-autoload.php b/phpspec-autoload.php
index 1fbcc5d..066d8d7 100644
--- a/phpspec-autoload.php
+++ b/phpspec-autoload.php
@@ -16,8 +16,5 @@ if (is_dir(getcwd().'/spec')) {
'phpspec/php-diff/autoload.php',
'Prophecy/autoload.php',
'Doctrine/Instantiator/autoload.php',
- [
- 'SebastianBergmann/Exporter3/autoload.php',
- 'SebastianBergmann/Exporter/autoload.php',
- ],
+ 'SebastianBergmann/Exporter3/autoload.php',
]);