summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json24
l---------makesrc.sh1
-rw-r--r--php-di-phpdoc-reader.spec33
3 files changed, 44 insertions, 14 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..64d7262
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,24 @@
+{
+ "name": "php-di/phpdoc-reader",
+ "type": "library",
+ "description": "PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)",
+ "keywords": ["phpdoc", "reflection"],
+ "license": "MIT",
+ "autoload": {
+ "psr-4": {
+ "PhpDocReader\\": "src/PhpDocReader"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "UnitTest\\PhpDocReader\\": "tests/"
+ }
+ },
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.5|^9.0",
+ "mnapoli/hard-mode": "~0.3.0"
+ }
+}
diff --git a/makesrc.sh b/makesrc.sh
new file mode 120000
index 0000000..fca4061
--- /dev/null
+++ b/makesrc.sh
@@ -0,0 +1 @@
+php-di-phpdoc-reader-get-source.sh \ No newline at end of file
diff --git a/php-di-phpdoc-reader.spec b/php-di-phpdoc-reader.spec
index ab45462..7004225 100644
--- a/php-di-phpdoc-reader.spec
+++ b/php-di-phpdoc-reader.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-di-phpdoc-reader
#
-# Copyright (c) 2016-2017 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2016-2021 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -10,25 +10,24 @@
# Please preserve changelog entries
#
+%bcond_without tests
+
%global github_owner PHP-DI
%global github_name PhpDocReader
-%global github_version 2.0.1
-%global github_commit 83f5ead159defccfa8e7092e5b6c1c533b326d68
+%global github_version 2.2.1
+%global github_commit 66daff34cbd2627740ffec9469ffbac9f8c8185c
%global composer_vendor php-di
%global composer_project phpdoc-reader
-# "php": ">=5.3.0"
-%global php_min_ver 5.3.0
-
-# Build using "--without tests" to disable tests
-%global with_tests 0%{!?_without_tests:1}
+# "php": ">=7.2.0"
+%global php_min_ver 7.2.0
%{!?phpdir: %global phpdir %{_datadir}/php}
Name: %{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 4%{?github_release}%{?dist}
+Release: 1%{?github_release}%{?dist}
Summary: Parses @var and @param values in PHP docblocks
Group: Development/Libraries
@@ -42,10 +41,10 @@ Source1: %{name}-get-source.sh
BuildArch: noarch
# Tests
-%if %{with_tests}
+%if %{with tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-composer(phpunit/phpunit)
+BuildRequires: phpunit9
## phpcompatinfo (computed from version 2.0.1)
BuildRequires: php-pcre
BuildRequires: php-reflection
@@ -104,7 +103,7 @@ cp -rp src/* %{buildroot}%{phpdir}/
%check
-%if %{with_tests}
+%if %{with tests}
: Create tests bootstrap
cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
@@ -113,9 +112,9 @@ require_once '%{buildroot}%{phpdir}/PhpDocReader/autoload.php';
BOOTSTRAP
: Run tests
-for cmd in php php56 php70 php71 php72; do
+for cmd in php php73 php74 php80; do
if which $cmd; then
- $cmd %{_bindir}/phpunit --verbose --bootstrap bootstrap.php
+ $cmd %{_bindir}/phpunit9 --verbose --bootstrap bootstrap.php
fi
done
%else
@@ -124,6 +123,7 @@ done
%files
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -132,6 +132,11 @@ done
%changelog
+* Wed Mar 31 2021 Remi Collet <remi@remirepo.net> - 2.2.1-1
+- update to 2.2.1
+- raise dependency on PHP 7.2
+- switch to phpunit9
+
* Wed May 10 2017 Valentin Collet <valentin@famillecollet.com> - 2.0.1-4
- Switch to fedora/autoloader