diff options
author | Remi Collet <remi@remirepo.net> | 2018-03-20 07:51:10 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-03-20 07:51:10 +0100 |
commit | b89a06e130faaceed92b4e682ecf7875b4a957f2 (patch) | |
tree | dbe7725f94e8a2f7d37de6be75b37064fed88180 | |
parent | f4058284506000a823c9a497635d4b5578751830 (diff) |
update to 1.2.1 (no change)
use range dependencies on F27+
allow Symfony 3
raise dependency on bartlett/php-reflect 4.0
-rw-r--r-- | composer.json | 10 | ||||
-rw-r--r-- | php-bartlett-umlwriter-autoload.php | 11 | ||||
-rw-r--r-- | php-bartlett-umlwriter-rpm.patch | 2 | ||||
-rw-r--r-- | php-bartlett-umlwriter.spec | 94 |
4 files changed, 64 insertions, 53 deletions
diff --git a/composer.json b/composer.json index 98f095d..1dcf297 100644 --- a/composer.json +++ b/composer.json @@ -10,13 +10,13 @@ "issues": "https://github.com/llaville/umlwriter/issues" }, "require": { - "php": ">=5.4.0", - "symfony/console": "~2.5|~3.0", - "sebastian/version": "~1.0|~2.0" + "php": "^5.4|^7.0", + "symfony/console": "^2.5|^3.0", + "sebastian/version": "^1.0|^2.0" }, "require-dev": { - "bartlett/php-reflect": "~4.0", - "andrewsville/php-token-reflection": "~1.4" + "bartlett/php-reflect": "^4.0", + "andrewsville/php-token-reflection": "^1.4" }, "suggest": { "bartlett/php-reflect": "Reverse-engine, default solution", diff --git a/php-bartlett-umlwriter-autoload.php b/php-bartlett-umlwriter-autoload.php index 47041a7..603a388 100644 --- a/php-bartlett-umlwriter-autoload.php +++ b/php-bartlett-umlwriter-autoload.php @@ -6,10 +6,13 @@ require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Bartlett\\UmlWriter\\', dirname(__DIR__)); -\Fedora\Autoloader\Dependencies::required(array( - '/usr/share/php/Symfony/Component/autoload.php', +\Fedora\Autoloader\Dependencies::required([ + '/usr/share/php/Bartlett/Reflect/autoload.php', + [ + '/usr/share/php/Symfony3/Component/autoload.php', + '/usr/share/php/Symfony/Component/autoload.php', + ], '/usr/share/php/TokenReflection/autoload.php', '/usr/share/php/SebastianBergmann/Version/autoload.php', - '/usr/share/php/Bartlett/Reflect/autoload.php', -)); +]); diff --git a/php-bartlett-umlwriter-rpm.patch b/php-bartlett-umlwriter-rpm.patch index 458af29..e3bac8e 100644 --- a/php-bartlett-umlwriter-rpm.patch +++ b/php-bartlett-umlwriter-rpm.patch @@ -26,6 +26,6 @@ diff -up ./bin/umlwriter.rpm ./bin/umlwriter + use Bartlett\UmlWriter\Console\Application; --$application = new Application($appName, '1.0'); +-$application = new Application($appName, '1.2'); +$application = new Application($appName, '@package_version@'); $application->run(); diff --git a/php-bartlett-umlwriter.spec b/php-bartlett-umlwriter.spec index e79ff00..23d192d 100644 --- a/php-bartlett-umlwriter.spec +++ b/php-bartlett-umlwriter.spec @@ -1,13 +1,13 @@ # remirepo/fedora spec file for php-bartlett-umlwriter # -# Copyright (c) 2015-2017 Remi Collet +# Copyright (c) 2015-2018 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit e4a204db7416ce49712978287f6c631b54c09008 +%global gh_commit 7f0e8ac9bd38a075fad7bf4001eddfd2505e4afc %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20150331 %global gh_owner llaville @@ -20,12 +20,11 @@ %endif Name: php-bartlett-umlwriter -Version: 1.2.0 +Version: 1.2.1 %global specrel 1 -Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} +Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Create UML class diagrams from your PHP source -Group: Development/Libraries License: BSD URL: http://php5.laurent-laville.org/umlwriter/ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?prever}-%{gh_short}.tar.gz @@ -40,45 +39,59 @@ BuildArch: noarch BuildRequires: php(language) >= 5.4.0 %if %{with_tests} BuildRequires: %{_bindir}/phpunit -BuildRequires: php-composer(symfony/console) >= 2.5 -BuildRequires: php-composer(sebastian/version) >= 1.0 -BuildRequires: php-composer(bartlett/php-reflect) >= 3.0 -BuildRequires: php-composer(andrewsville/php-token-reflection) >= 1.4 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(symfony/console) >= 2.5 with php-composer(symfony/console) < 4) +BuildRequires: (php-composer(sebastian/version) >= 1.0 with php-composer(sebastian/version) < 3) +BuildRequires: (php-composer(bartlett/php-reflect) >= 4.0 with php-composer(bartlett/php-reflect) < 5) +BuildRequires: (php-composer(andrewsville/php-token-reflection) >= 1.4 with php-composer(andrewsville/php-token-reflection) < 2) +# remirepo:6 +%else +BuildRequires: php-symfony-console >= 2.5 +BuildRequires: php-phpunit-Version >= 1.0 +BuildRequires: php-bartlett-PHP-Reflect >= 4.0 +BuildRequires: php-andrewsville-php-token-reflection >= 1.4 +%endif # For our patch / autoloader BuildRequires: php-composer(fedora/autoloader) -BuildRequires: php-bartlett-PHP-Reflect >= 3.1.1-3 -BuildRequires: php-andrewsville-php-token-reflection >= 1.4.0-5 %endif # From composer.json # "require": { -# "php": ">=5.4.0" -# "symfony/console": "~2.5|~3.0", -# "sebastian/version": "~1.0|~2.0" +# "php": "^5.4|^7.0" +# "symfony/console": "^2.5|^3.0", +# "sebastian/version": "^1.0|^2.0" Requires: php(language) >= 5.4.0 Requires: php-cli Requires: php-spl -Requires: php-composer(symfony/console) >= 2.5 -Requires: php-composer(symfony/console) < 3 -Requires: php-composer(sebastian/version) >= 1.0 -Requires: php-composer(sebastian/version) < 3 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(symfony/console) >= 2.5 with php-composer(symfony/console) < 4) +Requires: (php-composer(sebastian/version) >= 1.0 with php-composer(sebastian/version) < 3) +# remirepo:4 +%else +Requires: php-symfony-console >= 2.5 +Requires: php-phpunit-Version >= 1.0 +%endif # "require-dev": { -# "bartlett/php-reflect": "~4.0", -# "andrewsville/php-token-reflection": "~1.4" +# "bartlett/php-reflect": "^4.0", +# "andrewsville/php-token-reflection": "^1.4" # "suggest": { # "bartlett/php-reflect": "Reverse-engine, default solution", # "andrewsville/php-token-reflection": "Reverse-engine, alternative solution" %if ! %{bootstrap} -# No code change in 1.0.1/1.1.0, so ignore min version -Requires: php-composer(bartlett/php-reflect) >= 3.0 -Requires: php-composer(bartlett/php-reflect) < 5 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(bartlett/php-reflect) >= 4.0 with php-composer(bartlett/php-reflect) < 5) +Requires: (php-composer(andrewsville/php-token-reflection) >= 1.4 with php-composer(andrewsville/php-token-reflection) < 2) +# remirepo:4 +%else +Requires: php-bartlett-PHP-Reflect >= 4.0 +Requires: php-andrewsville-php-token-reflection >= 1.4 +%endif %endif -Requires: php-composer(andrewsville/php-token-reflection) >= 1.4 -Requires: php-composer(andrewsville/php-token-reflection) < 2 # For our patch / autoloader Requires: php-composer(fedora/autoloader) -Requires: php-bartlett-PHP-Reflect >= 3.1.1-3 -Requires: php-andrewsville-php-token-reflection >= 1.4.0-5 Provides: php-composer(bartlett/umlwriter) = %{version} @@ -120,23 +133,12 @@ install -Dpm 644 bin/umlwriter.1 %{buildroot}%{_mandir}/man1/umlwriter.1 %check %if %{with_tests} -# remirepo:11 -run=0 ret=0 -if which php56; then - php56 %{_bindir}/phpunit --bootstrap %{buildroot}%{_datadir}/php/Bartlett/UmlWriter/autoload.php || ret=1 - run=1 -fi -if which php71; then - php71 %{_bindir}/phpunit --bootstrap %{buildroot}%{_datadir}/php/Bartlett/UmlWriter/autoload.php || ret=1 - run=1 -fi -if [ $run -eq 0 ]; then -%{_bindir}/phpunit \ - --bootstrap %{buildroot}%{_datadir}/php/Bartlett/UmlWriter/autoload.php \ - --verbose -# remirepo:2 -fi +for cmd in php php70 php71 php72; do + if which $cmd; then + $cmd %{_bindir}/phpunit --bootstrap %{buildroot}%{_datadir}/php/Bartlett/UmlWriter/autoload.php || ret=1 + fi +done exit $ret %else : Test suite disabled @@ -154,6 +156,12 @@ exit $ret %changelog +* Tue Mar 20 2018 Remi Collet <remi@remirepo.net> - 1.2.1-1 +- update to 1.2.1 (no change) +- use range dependencies on F27+ +- allow Symfony 3 +- raise dependency on bartlett/php-reflect 4.0 + * Wed Mar 1 2017 Remi Collet <remi@remirepo.net> - 1.2.0-1 - update to 1.2.0 (no change) - add the command man page |