summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--composer.json6
-rw-r--r--php-phpspec.spec44
-rw-r--r--phpspec-autoload.php13
4 files changed, 44 insertions, 26 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ab5c4f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
index cedadf3..9daddc4 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
"php": "^5.6 || ^7.0",
"phpspec/prophecy": "^1.5",
"phpspec/php-diff": "^1.0.0",
- "sebastian/exporter": "^1.0 || ^2.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",
@@ -36,9 +36,9 @@
},
"require-dev": {
- "behat/behat": "^3.1",
+ "behat/behat": "^3.3",
"symfony/filesystem": "^3.0",
- "phpunit/phpunit": "^5.4",
+ "phpunit/phpunit": "^5.5|^6.0",
"ciaranmcnulty/versionbasedtestskipper": "^0.2.1"
},
diff --git a/php-phpspec.spec b/php-phpspec.spec
index ce60515..be98448 100644
--- a/php-phpspec.spec
+++ b/php-phpspec.spec
@@ -6,15 +6,15 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 97246d90708cf98983d95d609bbe6f4b039b8600
+%global gh_commit 1c77d11878c4bd475bc66f0eaa2686df0fcfa30f
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpspec
%global gh_project phpspec
#global prever beta3
Name: php-phpspec
-Version: 3.2.3
-Release: 3%{?dist}
+Version: 3.3.0
+Release: 1%{?dist}
Summary: Specification-oriented BDD framework for PHP
Group: Development/Libraries
@@ -27,12 +27,9 @@ Source1: %{gh_project}-autoload.php
# Use our autoloader
Patch0: %{gh_project}-3-rpm.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-composer(phpspec/prophecy) >= 1.4
BuildRequires: php-composer(phpspec/php-diff) >= 1.0.0
-BuildRequires: php-composer(sebastian/exporter) < 3
-BuildRequires: php-composer(sebastian/exporter) >= 1.0
BuildRequires: php-composer(symfony/console) >= 2.3.0
BuildRequires: php-composer(symfony/event-dispatcher) >= 2.1
BuildRequires: php-composer(symfony/finder) >= 2.1
@@ -40,14 +37,21 @@ BuildRequires: php-composer(symfony/process) >= 2.6
BuildRequires: php-composer(symfony/yaml) >= 2.1
BuildRequires: php-composer(doctrine/instantiator) >= 1.0.1
# From composer.json, require-dev
-# "behat/behat": "^3.1",
+# "behat/behat": "^3.3",
# "symfony/filesystem": "^3.0",
-# "phpunit/phpunit": "^5.4",
+# "phpunit/phpunit": "^5.5|^6.0",
# "ciaranmcnulty/versionbasedtestskipper": "^0.2.1"
BuildRequires: php-composer(symfony/filesystem) >= 2.1
-BuildRequires: php-composer(phpunit/phpunit) >= 5.4
+%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}
# Autoloader
-BuildRequires: php-composer(fedora/autoloader)
+BuildRequires: php-composer(fedora/autoloader) >= 1
# From composer.json, require
# "php": "^5.6 || ^7.0",
@@ -67,8 +71,11 @@ 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
-Requires: php-composer(sebastian/exporter) >= 1.0
+%if 0%{?fedora} >= 26
+Requires: php-composer(sebastian/exporter) < 4
+%else
Requires: php-composer(sebastian/exporter) < 3
+%endif
Requires: php-composer(symfony/console) >= 2.7
Requires: php-composer(symfony/console) < 4
Requires: php-composer(symfony/event-dispatcher) >= 2.7
@@ -83,7 +90,7 @@ Requires: php-composer(doctrine/instantiator) >= 1.0.1
Requires: php-composer(doctrine/instantiator) < 2
Requires: php-tokenizer
# Autoloader
-Requires: php-composer(fedora/autoloader)
+Requires: php-composer(fedora/autoloader) >= 1
# From phpcompatinfo report
Requires: php-pcntl
Requires: php-pcre
@@ -122,7 +129,6 @@ cp %{SOURCE1} src/PhpSpec/autoload.php
%install
# No namespace, so use a package specific dir
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{_datadir}/php
cp -pr src/PhpSpec %{buildroot}%{_datadir}/php/PhpSpec
@@ -155,7 +161,7 @@ if which php71; then
bin/phpspec \
run --format pretty --verbose --no-ansi
- php71 %{_bindir}/phpunit \
+ php71 %{_bindir}/phpunit6 \
--verbose \
--bootstrap %{buildroot}%{_datadir}/php/PhpSpec/autoload.php
@@ -167,18 +173,14 @@ if [ $run -eq 0 ]; then
bin/phpspec \
run --format pretty --verbose --no-ansi
-%{_bindir}/phpunit \
+%{phpunit} \
--verbose \
--bootstrap %{buildroot}%{_datadir}/php/PhpSpec/autoload.php
# remirepo:2
fi
-%clean
-rm -rf %{buildroot}
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc README.* CHANGES.*
@@ -188,6 +190,10 @@ rm -rf %{buildroot}
%changelog
+* Thu Apr 27 2017 Remi Collet <remi@remirepo.net> - 3.3.0-1
+- Update to 3.3.0
+- use phpunit6 on F26+
+
* Fri Mar 3 2017 Remi Collet <remi@remirepo.net> - 3.2.3-3
- fix autoloader for dep. with multiple versions
diff --git a/phpspec-autoload.php b/phpspec-autoload.php
index 8124ff4..13e657f 100644
--- a/phpspec-autoload.php
+++ b/phpspec-autoload.php
@@ -13,7 +13,12 @@ if (is_dir(getcwd().'/spec')) {
}
// Dependencies (Rely on include_path as in PHPUnit dependencies + circular dependencies)
-require_once 'phpspec/php-diff/autoload.php';
-require_once 'SebastianBergmann/Exporter/autoload.php';
-require_once 'Prophecy/autoload.php'; // After exporter to avoid newer version
-require_once 'Doctrine/Instantiator/autoload.php';
+\Fedora\Autoloader\Dependencies::required([
+ 'phpspec/php-diff/autoload.php',
+ 'Prophecy/autoload.php',
+ 'Doctrine/Instantiator/autoload.php',
+ [
+ 'SebastianBergmann/Exporter3/autoload.php',
+ 'SebastianBergmann/Exporter/autoload.php',
+ ],
+]);