# remirepo/fedora spec file for php-bartlett-PHP-Reflect # # Copyright (c) 2011-2019 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 54eef325e8d1c7d7384573d6a6dc2b28ea1b44f0 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20150331 %global gh_owner llaville %global gh_project php-reflect %global upstream_version 5.0.0 %global upstream_prever beta1 %if %{bootstrap} %global with_tests 0%{?_with_tests:1} %else %global with_tests 0%{!?_without_tests:1} %endif %global sym_prefix php-symfony4 %global phpunit %{_bindir}/phpunit7 Name: php-bartlett-PHP-Reflect Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} Release: 1%{?dist} Summary: Adds the ability to reverse-engineer PHP License: BSD URL: http://php5.laurent-laville.org/reflect/ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz # Fix autoloader path # Fix version and avoir jean85/pretty-package-versions (relying on composer.lock) Source1: %{name}-autoload.php # Enable cache plugin Patch0: %{name}-rpm.patch BuildArch: noarch BuildRequires: php(language) >= 7.1 %if %{with_tests} # to run test suite BuildRequires: %{phpunit} # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(sebastian/version) >= 1.0 with php-composer(sebastian/version) < 3) BuildRequires: (php-composer(nikic/php-parser) >= 4.0 with php-composer(nikic/php-parser) < 5) BuildRequires: (php-composer(doctrine/collections) >= 1.4 with php-composer(doctrine/collections) < 2) BuildRequires: (php-composer(seld/jsonlint) >= 1.1 with php-composer(seld/jsonlint) < 2) BuildRequires: (php-composer(justinrainbow/json-schema) >= 1.3 with php-composer(justinrainbow/json-schema) < 2) BuildRequires: (php-composer(monolog/monolog) >= 1.10 with php-composer(monolog/monolog) < 2) BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) BuildRequires: (php-composer(league/tactician) >= 1.0 with php-composer(league/tactician) < 2) BuildRequires: (php-composer(zendframework/zenddiagnostics) >= 1.4 with php-composer(zendframework/zenddiagnostics) < 2) BuildRequires: (php-composer(doctrine/cache) >= 1.3 with php-composer(doctrine/cache) < 2) # "require-dev": { # "monolog/monolog": "~1.10", # "andrewsville/php-token-reflection": "^1.4" BuildRequires: (php-composer(monolog/monolog) >= 1.10 with php-composer(monolog/monolog) < 2) BuildRequires: (php-composer(andrewsville/php-token-reflection) >= 1.4 with php-composer(andrewsville/php-token-reflection) < 2) # remirepo:25 %else BuildRequires: php-composer(sebastian/version) >= 1.0 BuildRequires: php-composer(sebastian/version) < 3 BuildRequires: php-nikic-php-parser4 BuildRequires: php-composer(doctrine/collections) >= 1.4 BuildRequires: php-composer(doctrine/collections) < 2 BuildRequires: php-composer(seld/jsonlint) >= 1.1 BuildRequires: php-composer(seld/jsonlint) < 2 BuildRequires: php-composer(justinrainbow/json-schema) >= 1.3 BuildRequires: php-composer(justinrainbow/json-schema) < 2 BuildRequires: php-composer(monolog/monolog) >= 1.10 BuildRequires: php-composer(monolog/monolog) < 2 BuildRequires: php-composer(psr/log) >= 1.0 BuildRequires: php-composer(psr/log) < 2 BuildRequires: php-composer(league/tactician) < 2 BuildRequires: php-composer(league/tactician) >= 1.0 BuildRequires: php-composer(zendframework/zenddiagnostics) < 2 BuildRequires: php-composer(zendframework/zenddiagnostics) >= 1.4 BuildRequires: php-composer(doctrine/cache) < 2 BuildRequires: php-composer(doctrine/cache) >= 1.3 BuildRequires: php-composer(monolog/monolog) < 2 BuildRequires: php-composer(monolog/monolog) >= 1.10 BuildRequires: php-composer(andrewsville/php-token-reflection) < 2 BuildRequires: php-composer(andrewsville/php-token-reflection) >= 1.4 %endif BuildRequires: %{sym_prefix}-event-dispatcher BuildRequires: %{sym_prefix}-finder BuildRequires: %{sym_prefix}-console BuildRequires: %{sym_prefix}-stopwatch BuildRequires: %{sym_prefix}-dependency-injection # For our autoloader BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require": { # "php": "^7.1", # "ext-tokenizer": "*", # "ext-pcre": "*", # "ext-spl": "*", # "ext-json": "*", # "ext-date": "*", # "ext-reflection": "*", # "sebastian/version": "^1.0|^2.0", # "nikic/php-parser": "^4.0", # "doctrine/collections": "^1.4", # "symfony/event-dispatcher": "^3.0|^4.0", # "symfony/finder": "^3.0|^4.0", # "symfony/console": "^3.0|^4.0", # "symfony/stopwatch": "^3.0|^4.0", # "symfony/dependency-injection": "^3.0|^4.0", # "justinrainbow/json-schema": "^1.3", # "seld/jsonlint": "^1.1" # "psr/log": "^1.0", # "league/tactician": "^1.0", # "jean85/pretty-package-versions": "^1.2", # "zendframework/zenddiagnostics": "^1.4" Requires: php(language) >= 7.1 Requires: php-cli Requires: php-reflection Requires: php-date Requires: php-json Requires: php-pcre Requires: php-phar Requires: php-spl Requires: php-tokenizer # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(sebastian/version) >= 1.0 with php-composer(sebastian/version) < 3) Requires: (php-composer(nikic/php-parser) >= 4.0 with php-composer(nikic/php-parser) < 5) Requires: (php-composer(doctrine/collections) >= 1.4 with php-composer(doctrine/collections) < 2) Requires: (php-composer(seld/jsonlint) >= 1.1 with php-composer(seld/jsonlint) < 2) Requires: (php-composer(justinrainbow/json-schema) >= 1.3 with php-composer(justinrainbow/json-schema) < 2) Requires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) Requires: (php-composer(league/tactician) >= 1.0 with php-composer(league/tactician) < 2) Requires: (php-composer(zendframework/zenddiagnostics) >= 1.4 with php-composer(zendframework/zenddiagnostics) < 2) # Mandatory for our patch Requires: (php-composer(doctrine/cache) >= 1.3 with php-composer(doctrine/cache) < 2) # remirepo:20 %else Requires: php-composer(sebastian/version) >= 1.0 Requires: php-composer(sebastian/version) < 3 Requires: php-nikic-php-parser4 Requires: php-composer(doctrine/collections) >= 1.4 Requires: php-composer(doctrine/collections) < 2 Requires: php-composer(seld/jsonlint) >= 1.1 Requires: php-composer(seld/jsonlint) < 2 Requires: php-composer(justinrainbow/json-schema) >= 1.3 Requires: php-composer(justinrainbow/json-schema) < 2 Requires: php-composer(psr/log) >= 1.0 Requires: php-composer(psr/log) < 2 Requires: php-composer(league/tactician) < 2 Requires: php-composer(league/tactician) >= 1.0 Requires: php-composer(zendframework/zenddiagnostics) < 2 Requires: php-composer(zendframework/zenddiagnostics) >= 1.4 # Mandatory for our patch Requires: php-composer(doctrine/cache) >= 1.3 Requires: php-composer(doctrine/cache) < 2 %endif Requires: %{sym_prefix}-event-dispatcher Requires: %{sym_prefix}-finder Requires: %{sym_prefix}-console Requires: %{sym_prefix}-stopwatch Requires: %{sym_prefix}-dependency-injection # "suggest": { # "doctrine/cache": "Allow caching results" # "bartlett/phpunit-loggertestlistener": "Allow logging unit tests to your favorite PSR-3 logger interface" %if ! %{bootstrap} %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(bartlett/umlwriter) >= 1.0 with php-composer(bartlett/umlwriter) < 2) Suggests: php-composer(monolog/monolog) %else Requires: php-composer(bartlett/umlwriter) >= 1.0 Requires: php-composer(bartlett/umlwriter) < 2 %endif %endif # For our autoloader Requires: php-composer(fedora/autoloader) Obsoletes: php-channel-bartlett <= 1.3 Provides: php-composer(bartlett/php-reflect) = %{version} %description PHP_Reflect adds the ability to reverse-engineer classes, interfaces, functions, constants and more, by connecting php callbacks to other tokens. Documentation: http://php5.laurent-laville.org/reflect/manual/current/en/ %prep %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -b .rpm find . -name \*.rpm -delete -print # Use package version sed -e 's/@VERSION@/%{upstream_version}%{?upstream_prever}/' \ -i src/Reflect/Presentation/Console/Application.php cp %{SOURCE1} src/Reflect/autoload.php %build # Nothing %install mkdir -p %{buildroot}%{_datadir}/php cp -pr src %{buildroot}%{_datadir}/php/Bartlett install -D -p -m 755 bin/phpreflect %{buildroot}%{_bindir}/phpreflect install -D -p -m 644 bin/phpreflect.json.dist %{buildroot}%{_sysconfdir}/phpreflect.json install -D -p -m 644 bin/phpreflect.1 %{buildroot}%{_mandir}/man1/phpreflect.1 %check %if %{with_tests} sed -e 's:@BUILDROOT@:%{buildroot}:' -i tests/bootstrap.php if [ -f /etc/phpreflect.json ]; then : skip as getJsonConfigFilename rm tests/EnvironmentTest.php fi ret=0 for cmdarg in "php %{phpunit}" php71 php72 php73; do if which $cmdarg; then set $cmdarg $1 ${2:-%{_bindir}/phpunit7} \ --verbose || ret=1 fi done exit $ret %else : Test suite disabled %endif %post if [ -x %{_bindir}/pear ]; then %{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \ bartlett.laurent-laville.org/PHP_Reflect >/dev/null || : fi %files %{!?_licensedir:%global license %%doc} %license LICENSE %doc composer.json README.* %config(noreplace) %{_sysconfdir}/phpreflect.json %{_bindir}/phpreflect %{_datadir}/php/Bartlett/Reflect* %{_mandir}/man1/phpreflect.1* %changelog * Mon Apr 15 2019 Remi Collet - 5.0.0~beta1-1 - update to 5.0.0-beta1 * Tue Apr 9 2019 Remi Collet - 5.0.0~alpha3-1 - update to 5.0.0-alpha3 - add dependency on league/tactician - add dependency on zendframework/zenddiagnostics - drop dependency on phpdocumentor/reflection-docblock - open https://github.com/llaville/php-reflect/pull/32 fix typo in Appplication * Mon Jan 21 2019 Remi Collet - 5.0.0~alpha1-1 - update to 5.0.0-alpha1 - raise dependency on PHP 7.1 - raise dependency on nikic/php-parser 4.0 - only Symfony 4 and PHPUnit 7 * Sun Dec 9 2018 Remi Collet - 4.3.0-2 - Fedora: switch to symfony4 only, see #1657328 * Mon Nov 26 2018 Remi Collet - 4.3.0-1 - update to 4.3.0 - use range dependencies - raise dependency on nikic/php-parser 3.1 - raise dependency on doctrine/collections 1.4 - add dependency on psr/log - allow Symfony 4 - switch to phpunit7 * Tue Dec 19 2017 Remi Collet - 4.2.2-2 - fix autoloader to ensure nikic/php-parser v2 is used * Thu Dec 14 2017 Remi Collet - 4.2.2-1 - Update to 4.2.2 * Tue Dec 12 2017 Remi Collet - 4.2.1-2 - fix regression with cache configuration from https://github.com/llaville/php-reflect/pull/27 * Tue Dec 12 2017 Remi Collet - 4.2.1-1 - Update to 4.2.1 (no change) - raise dependency on PHP 5.5 * Tue Dec 12 2017 Remi Collet - 4.2.0-1 - Update to 4.2.0 - only require a single Symfony version * Thu Oct 5 2017 Remi Collet - 4.1.0-2 - fix autoloader for Symfony 3, FTBFS from Koschei * Thu May 4 2017 Remi Collet - 4.1.0-1 - Update to 4.1.0 - raise dependency on nikic/php-parser >= 2.1 - raise dependency on phpdocumentor/reflection-docblock >= 3 - allow symfony 3 * Thu Apr 13 2017 Shawn Iwinski - 4.0.2-3 - Add max versions to BuildRequires - Prepare for Symfony 3 - Prepare for php-phpdocumentor-reflection-docblock => php-phpdocumentor-reflection-docblock2 dependency rename * Mon Oct 31 2016 Remi Collet - 4.0.2-2 - switch to fedora/autoloader * Fri Sep 23 2016 Remi Collet - 4.0.2-1 - update to 4.0.2 * Wed Aug 10 2016 Remi Collet - 4.0.1-2 - fix test suite to work with all Monolog versions from https://github.com/llaville/php-reflect/pull/22 * Wed Jul 6 2016 Remi Collet - 4.0.1-1 - update to 4.0.1 - rewrite autoloader * Mon Apr 18 2016 Remi Collet - 1.1.0-3 - allow sebastian/version 2.0 - run test suite with both PHP 5 and 7 when available * Sat Dec 5 2015 Remi Collet - 4.0.0-1 - update to 4.0.0 - raise dependency on nikic/php-parser >= 1.4 - raise dependency on PHP >= 5.4 * Tue Sep 29 2015 Remi Collet - 3.1.2-1 - update to 3.1.2 * Fri Jun 26 2015 Remi Collet - 3.1.1-3 - rewrite autoloader * Sun Jun 21 2015 Remi Collet - 3.1.1-2 - fix autoloader * Thu Jun 18 2015 Remi Collet - 3.1.1-1 - update to 3.1.1 * Mon May 11 2015 Remi Collet - 3.1.0-1 - update to 3.1.0 * Thu Apr 16 2015 Remi Collet - 3.0.1-1 - update to 3.0.1 - raise dependency on nikic/php-parser >= 1.2.2 * Sat Apr 4 2015 Remi Collet - 3.0.0-2 - add cache plugin in default configuration * Fri Apr 3 2015 Remi Collet - 3.0.0-1 - update to 3.0.0 - cleanup EL-5 stuff * Tue Mar 31 2015 Remi Collet - 3.0.0-0.13.20150331git7efd1d0 - pull latest upstream changes * Tue Mar 31 2015 Remi Collet - 3.0.0-0.12.20150330git2c88d1a - pull latest upstream changes * Tue Mar 24 2015 Remi Collet - 3.0.0-0.11.RC2 - update to 3.0.0 RC2 - add dependency on bartlett/umlwriter * Thu Mar 12 2015 Remi Collet - 3.0.0-0.10.RC1 - update to 3.0.0 RC1 * Thu Feb 26 2015 Remi Collet - 3.0.0-0.9.20150226gitaab371c - update to 3.0.0 beta3 * Mon Feb 23 2015 Remi Collet - 3.0.0-0.8.20150219gite7f804e - fix output * Sun Feb 22 2015 Remi Collet - 3.0.0-0.7.20150219gite7f804e - fix reported version * Sun Feb 22 2015 Remi Collet - 3.0.0-0.6.20150219gite7f804e - update to 3.0.0 beta2 * Wed Feb 04 2015 Remi Collet - 3.0.0-0.5.20150203gitb4b807b - update to 3.0.0 beta1 * Tue Jan 20 2015 Remi Collet - 3.0.0-0.4.20150118git398cdae - fix composer only code (pr #17) * Mon Jan 19 2015 Remi Collet - 3.0.0-0.3.20150118git398cdae - new 3.0 snapshot * Fri Jan 16 2015 Remi Collet - 3.0.0-0.2.20150115git0189a64 - update to 3.0.0 alpha3 * Tue Jan 6 2015 Remi Collet - 3.0.0-0.1.20150105git51f7968 - update to 3.0.0 alpha2 - drop dependency on phpunit/php-timer - add dependencies on php-pdo_sqlite, doctrine/collections, symfony/stopwatch, symfony/dependency-injection and phpdocumentor/reflection-docblock * Mon Jan 5 2015 Remi Collet - 2.6.2-1 - Update to 2.6.2 - open https://github.com/llaville/php-reflect/pull/16 * Thu Dec 4 2014 Remi Collet - 2.6.1-1 - Update to 2.6.1 * Thu Nov 13 2014 Remi Collet - 2.6.0-1 - Update to 2.6.0 - add dependency on justinrainbow/json-schema * Thu Oct 16 2014 Remi Collet - 2.5.0-1 - Update to 2.5.0 - add dependency on sebastian/version * Fri Sep 19 2014 Remi Collet - 2.4.0-1 - Update to 2.4.0 * Fri Aug 22 2014 Remi Collet - 2.3.0-1 - Update to 2.3.0 - add dependency on seld/jsonlint * Fri Jul 25 2014 Remi Collet - 2.2.0-2 - obsoletes php-channel-bartlett * Thu Jul 24 2014 Remi Collet - 2.2.0-1 - Update to 2.2.0 * Wed Jul 23 2014 Remi Collet - 2.2.0-0.1.fe9d18d - Test build of upcoming 2.2.0 - add manpage * Tue Jul 8 2014 Remi Collet - 2.1.0-1 - Update to 2.1.0 * Mon May 26 2014 Remi Collet - 2.0.0-2 - fix dependencies * Mon May 12 2014 Remi Collet - 2.0.0-1 - Update to 2.0.0 - sources from github - patch autoloader to not rely on composer - drop documentation (link to online doc in description) * Sat Oct 12 2013 Remi Collet - 1.9.0-1 - Update to 1.9.0 - raise dependency on PHP >= 5.3 * Mon Sep 23 2013 Remi Collet - 1.8.1-1 - Update to 1.8.1 * Fri Sep 20 2013 Remi Collet - 1.8.0-1 - Update to 1.8.0 * Wed Jun 26 2013 Remi Collet - 1.7.0-1 - Update to 1.7.0 * Sat Apr 06 2013 Remi Collet - 1.6.2-1 - Update to 1.6.2 * Tue Feb 26 2013 Remi Collet - 1.6.1-1 - Update to 1.6.1 * Fri Feb 22 2013 Remi Collet - 1.6.0-1 - Version 1.6.0 (stable) - API 1.6.0 (stable) - html documentation is now provided by upstream * Mon Nov 26 2012 Remi Collet - 1.5.0-2 - generate documentation using asciidoc, without phing * Mon Nov 26 2012 Remi Collet - 1.5.0-1 - Version 1.5.0 (stable) - API 1.5.0 (stable) - drop documentation build * Tue Oct 30 2012 Remi Collet - 1.4.3-1 - Version 1.4.3 (stable) - API 1.4.0 (stable) * Tue Aug 14 2012 Remi Collet - 1.4.2-2 - rebuildt for new pear_testdir * Wed Aug 01 2012 Remi Collet - 1.4.2-1 - Version 1.4.2 (stable) - API 1.4.0 (stable) * Fri Jul 20 2012 Fedora Release Engineering - 1.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Feb 17 2012 Remi Collet - 1.3.0-2 - bump release * Fri Feb 17 2012 Remi Collet - 1.3.0-1 - Version 1.3.0 (stable) - API 1.3.0 (stable) * Sun Feb 05 2012 Remi Collet - 1.2.0-1 - Version 1.2.0 (stable) - API 1.2.0 (stable) * Sat Jan 14 2012 Fedora Release Engineering - 1.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Fri Nov 11 2011 Remi Collet - 1.1.0-1 - Version 1.1.0 (stable) - API 1.1.0 (stable) * Mon Sep 19 2011 Remi Collet - 1.0.2-2 - remove unused .js and improve installation of generated doc - use buildroot macro * Mon Jul 18 2011 Remi Collet - 1.0.2-1 - Version 1.0.2 (stable) - API 1.0.0 (stable) * Thu Jun 16 2011 Remi Collet - 1.0.1-1 - Version 1.0.1 (stable) - API 1.0.0 (stable) * Thu Jun 02 2011 Remi Collet - 1.0.0-1 - Version 1.0.0 (stable) - API 1.0.0 (stable) - add HTML documentation * Tue Apr 26 2011 Remi Collet - 1.0.0-0.1.RC1 - Version 1.0.0RC1 (beta) - API 1.0.0 (beta) * Sun Apr 17 2011 Remi Collet - 0.7.0-1 - Version 0.7.0 (beta) - API 0.7.0 (beta) * Mon Apr 11 2011 Remi Collet - 0.6.0-1 - Version 0.6.0 (beta) - API 0.6.0 (beta) * Wed Apr 06 2011 Remi Collet - 0.5.1-1 - Version 0.5.1 (beta) - API 0.5.0 (beta) * Fri Mar 25 2011 Remi Collet - 0.5.0-1 - Version 0.5.0 (beta) - API 0.5.0 (beta) * Fri Feb 25 2011 Remi Collet - 0.4.0-1 - Version 0.4.0 (beta) - Initial RPM package