summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--php-pdepend-PHP-Depend-autoload.php13
-rw-r--r--php-pdepend-PHP-Depend.spec36
3 files changed, 32 insertions, 24 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/php-pdepend-PHP-Depend-autoload.php b/php-pdepend-PHP-Depend-autoload.php
index 4ddd5ba..947304d 100644
--- a/php-pdepend-PHP-Depend-autoload.php
+++ b/php-pdepend-PHP-Depend-autoload.php
@@ -4,6 +4,17 @@
require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('PDepend\\', __DIR__);
\Fedora\Autoloader\Dependencies::required(array(
- '/usr/share/php/Symfony/Component/autoload.php',
+ array(
+ '/usr/share/php/Symfony3/Component/DependencyInjection/autoload.php',
+ '/usr/share/php/Symfony/Component/DependencyInjection/autoload.php',
+ ),
+ array(
+ '/usr/share/php/Symfony3/Component/Filesystem/autoload.php',
+ '/usr/share/php/Symfony/Component/Filesystem/autoload.php',
+ ),
+ array(
+ '/usr/share/php/Symfony3/Component/Config/autoload.php',
+ '/usr/share/php/Symfony/Component/Config/autoload.php',
+ ),
));
diff --git a/php-pdepend-PHP-Depend.spec b/php-pdepend-PHP-Depend.spec
index 149b0ad..07ebec8 100644
--- a/php-pdepend-PHP-Depend.spec
+++ b/php-pdepend-PHP-Depend.spec
@@ -19,7 +19,7 @@
Name: php-pdepend-PHP-Depend
Version: 2.5.0
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: PHP_Depend design quality metrics for PHP package
Group: Development/Libraries
@@ -32,7 +32,6 @@ Source1: makesrc.sh
Source2: %{name}-autoload.php
Patch0: %{name}-rpm.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%if %{with_tests}
# From composer/json, "require-dev": {
@@ -41,8 +40,11 @@ BuildArch: noarch
# Test suite pass with PHPUnit 4.8.12 and PHPUnit 5.0.5
BuildRequires: php-composer(phpunit/phpunit) >= 4.0.0
BuildRequires: php(language) >= 5.3.7
+BuildRequires: php-composer(symfony/dependency-injection) < 4
BuildRequires: php-composer(symfony/dependency-injection) >= 2.3.0
+BuildRequires: php-composer(symfony/filesystem) < 4
BuildRequires: php-composer(symfony/filesystem) >= 2.3.0
+BuildRequires: php-composer(symfony/config) < 4
BuildRequires: php-composer(symfony/config) >= 2.3.0
BuildRequires: php-bcmath
BuildRequires: php-date
@@ -116,8 +118,6 @@ find src/test/php -name \*xml -exec sed -e 's:@package_version@:%{version}:' -i
%install
-rm -rf %{buildroot}
-
: Library
mkdir -p $(dirname %{buildroot}%{php_home})
cp -pr src/main/php/PDepend %{buildroot}%{php_home}
@@ -138,21 +138,13 @@ require '%{buildroot}%{php_home}/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('PDepend\\', __DIR__);
EOF
-# remirepo:11
ret=0
-run=0
-if which php71; then
- php71 %{_bindir}/phpunit -d memory_limit=1G --columns max || ret=1
- run=1
-fi
-if which php56; then
- php56 %{_bindir}/phpunit -d memory_limit=1G --columns max || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/phpunit -d memory_limit=1G --verbose
-# remirepo:2
-fi
+# PHP 7.2: count(): Parameter must be an array or an object that implements Countable
+for cmd in php php56 php70 php71; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit -d memory_limit=1G --verbose || ret=1
+ fi
+done
exit $ret
%else
: Test suite disabled
@@ -166,12 +158,7 @@ if [ -x %{_bindir}/pear ]; then
fi
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc composer.json
@@ -182,6 +169,9 @@ rm -rf %{buildroot}
%changelog
+* Wed May 10 2017 Remi Collet <remi@fedoraproject.org> - 2.5.0-3
+- adapt for Symfony v3
+
* Thu Jan 19 2017 Remi Collet <remi@fedoraproject.org> - 2.5.0-1
- update to 2.5.0