From d91c90aae29a5d7be8f3f6e92cc9b9f72f8b63bd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 31 Mar 2021 12:08:34 +0200 Subject: update to 2.2.1 raise dependency on PHP 7.2 switch to phpunit9 --- composer.json | 24 ++++++++++++++++++++++++ makesrc.sh | 1 + php-di-phpdoc-reader.spec | 33 +++++++++++++++++++-------------- 3 files changed, 44 insertions(+), 14 deletions(-) create mode 100644 composer.json create mode 120000 makesrc.sh 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 +# Copyright (c) 2016-2021 Shawn Iwinski # # 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 - 2.2.1-1 +- update to 2.2.1 +- raise dependency on PHP 7.2 +- switch to phpunit9 + * Wed May 10 2017 Valentin Collet - 2.0.1-4 - Switch to fedora/autoloader -- cgit