From e3171d450d4e9bee305a9295d201d7816abe3f03 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 18 Oct 2013 09:43:45 +0200 Subject: [PATCH 01/19] update to 2.24.0 (cherry picked from commit 13d6b95e5b8019f91c3b0d2c3676f66e296553d8) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 10 +++++++--- sources | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2b657d6..f3abc87 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ package-*.xml /PHP_CompatInfo-2.21.0.tgz /PHP_CompatInfo-2.22.0.tgz /PHP_CompatInfo-2.23.1.tgz +/PHP_CompatInfo-2.24.0.tgz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index af4a7b5..b63d6c5 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -16,7 +16,7 @@ Name: php-bartlett-PHP-CompatInfo -Version: 2.23.1 +Version: 2.24.0 Release: 1%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -39,7 +39,7 @@ BuildRequires: php-pear(PEAR) >= 1.9.0 BuildRequires: php-channel(%{channel}) # to run test suite BuildRequires: php-pear(pear.phpunit.de/PHPUnit) >= 3.6.0 -BuildRequires: php-pear(%{channel}/PHP_Reflect) >= 1.8.0 +BuildRequires: php-pear(%{channel}/PHP_Reflect) >= 1.9.0 Requires(post): %{__pear} Requires(postun): %{__pear} @@ -51,7 +51,7 @@ Requires: php-pcre Requires: php-reflection Requires: php-spl Requires: php-pear(PEAR) >= 1.9.0 -Requires: php-pear(%{channel}/PHP_Reflect) >= 1.8.0 +Requires: php-pear(%{channel}/PHP_Reflect) >= 1.9.0 Requires: php-pear(%{channel}/PHP_Reflect) < 2 Requires: php-pear(Console_CommandLine) >= 1.2.0 # Optional @@ -166,6 +166,10 @@ fi %changelog +* Fri Oct 18 2013 Remi Collet - 2.24.0-1 +- update to 2.24.0 +- raise dependency, PHP_Reflect 1.9.0 + * Mon Sep 23 2013 Remi Collet - 2.23.1-1 - Update to 2.23.1 - raise dependencies: PHP 5.3.0, PHP_Reflect 1.8.0 (and < 2) diff --git a/sources b/sources index 910650b..928bf3b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7ded2ef550bf99ea703af79dfe0064c4 PHP_CompatInfo-2.23.1.tgz +a7f1f0fd7f7e6d5d512fc36973691e2e PHP_CompatInfo-2.24.0.tgz From d4ab3bfe4a8a0ab7046df6187bcc84b98ab17fee Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 14 Nov 2013 14:11:34 +0100 Subject: [PATCH 02/19] update to 2.25.0 (cherry picked from commit 964b5e01fd3217ea15591fddd948740e4c8219f9) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f3abc87..9c5537c 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ package-*.xml /PHP_CompatInfo-2.22.0.tgz /PHP_CompatInfo-2.23.1.tgz /PHP_CompatInfo-2.24.0.tgz +/PHP_CompatInfo-2.25.0.tgz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index b63d6c5..3fe18e5 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -16,7 +16,7 @@ Name: php-bartlett-PHP-CompatInfo -Version: 2.24.0 +Version: 2.25.0 Release: 1%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -166,6 +166,9 @@ fi %changelog +* Thu Nov 14 2013 Remi Collet - 2.25.0-1 +- Update to 2.25.0 + * Fri Oct 18 2013 Remi Collet - 2.24.0-1 - update to 2.24.0 - raise dependency, PHP_Reflect 1.9.0 diff --git a/sources b/sources index 928bf3b..0d6604e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a7f1f0fd7f7e6d5d512fc36973691e2e PHP_CompatInfo-2.24.0.tgz +e82d3df2ef505225e98836bf400bb335 PHP_CompatInfo-2.25.0.tgz From 35fd7de984760399c04ea3211fe89b26c8e5c8a8 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 13 Dec 2013 12:26:07 +0100 Subject: [PATCH 03/19] update to 2.26.0 (stable) for PHP 5.3.28, 5.4.23, 5.5.7 (cherry picked from commit 03acb3bb97a69f4ae87cdbd239c161a7330911c3) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9c5537c..7718758 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ package-*.xml /PHP_CompatInfo-2.23.1.tgz /PHP_CompatInfo-2.24.0.tgz /PHP_CompatInfo-2.25.0.tgz +/PHP_CompatInfo-2.26.0.tgz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 3fe18e5..537e7d0 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -16,7 +16,7 @@ Name: php-bartlett-PHP-CompatInfo -Version: 2.25.0 +Version: 2.26.0 Release: 1%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -166,6 +166,9 @@ fi %changelog +* Fri Dec 13 2013 Remi Collet - 2.26.0-1 +- Update to 2.26.0 (stable) + * Thu Nov 14 2013 Remi Collet - 2.25.0-1 - Update to 2.25.0 diff --git a/sources b/sources index 0d6604e..7ea53c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e82d3df2ef505225e98836bf400bb335 PHP_CompatInfo-2.25.0.tgz +ca6f0922e26119157efb891cd51d6c66 PHP_CompatInfo-2.26.0.tgz From 40eced1462e2bc3fcb71e448c2c529107a53698b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 22 May 2015 19:28:34 +0200 Subject: [PATCH 04/19] - update to 4.2.0 - raise dependency on bartlett/php-reflect 3.1 - add dependency on bartlett/umlwriter - add fedora-review-check script - handle --without tests option to skip test suite during build - add dependency on justinrainbow/json-schema - add dependency on sebastian/version - add dependency on seld/jsonlint --- .gitignore | 43 +--- PHP_CompatInfo-conf.patch | 18 -- fedora-review-check | 8 + php-bartlett-PHP-CompatInfo-4.2.0-rpm.patch | 140 ++++++++++++ php-bartlett-PHP-CompatInfo.spec | 223 ++++++++++---------- phpcompatinfo.1 | 149 ------------- sources | 2 +- 7 files changed, 274 insertions(+), 309 deletions(-) delete mode 100644 PHP_CompatInfo-conf.patch create mode 100755 fedora-review-check create mode 100644 php-bartlett-PHP-CompatInfo-4.2.0-rpm.patch delete mode 100644 phpcompatinfo.1 diff --git a/.gitignore b/.gitignore index 7718758..8b85b01 100644 --- a/.gitignore +++ b/.gitignore @@ -1,34 +1,11 @@ clog -*spec~ -package-*.xml -/PHP_CompatInfo-2.1.0.tgz -/PHP_CompatInfo-2.2.1.tgz -/PHP_CompatInfo-2.2.2.tgz -/PHP_CompatInfo-2.2.3.tgz -/PHP_CompatInfo-2.2.4.tgz -/PHP_CompatInfo-2.2.5.tgz -/PHP_CompatInfo-2.3.0.tgz -/PHP_CompatInfo-2.4.0.tgz -/PHP_CompatInfo-2.5.0.tgz -/PHP_CompatInfo-2.6.0.tgz -/PHP_CompatInfo-2.7.0.tgz -/PHP_CompatInfo-2.8.0.tgz -/PHP_CompatInfo-2.8.1.tgz -/PHP_CompatInfo-2.11.0.tgz -/PHP_CompatInfo-2.12.1.tgz -/PHP_CompatInfo-2.13.0.tgz -/PHP_CompatInfo-2.13.2.tgz -/PHP_CompatInfo-2.14.0.tgz -/PHP_CompatInfo-2.14.1.tgz -/PHP_CompatInfo-2.15.0.tgz -/PHP_CompatInfo-2.16.0.tgz -/PHP_CompatInfo-2.17.0.tgz -/PHP_CompatInfo-2.18.0.tgz -/PHP_CompatInfo-2.19.0.tgz -/PHP_CompatInfo-2.20.0.tgz -/PHP_CompatInfo-2.21.0.tgz -/PHP_CompatInfo-2.22.0.tgz -/PHP_CompatInfo-2.23.1.tgz -/PHP_CompatInfo-2.24.0.tgz -/PHP_CompatInfo-2.25.0.tgz -/PHP_CompatInfo-2.26.0.tgz +/php-compat-info-3.2.0.tar.gz +/php-compat-info-3.3.0.tar.gz +/php-compat-info-3.4.0.tar.gz +/php-compat-info-3.5.0.tar.gz +/php-compat-info-3.6.0.tar.gz +/php-compat-info-3.6.1.tar.gz +/php-compat-info-3.7.1.tar.gz +/php-compat-info-3.7.2.tar.gz +/php-compat-info-3.7.3.tar.gz +/php-compat-info-4.2.0-4026f69.tar.gz diff --git a/PHP_CompatInfo-conf.patch b/PHP_CompatInfo-conf.patch deleted file mode 100644 index 2aa82ae..0000000 --- a/PHP_CompatInfo-conf.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- PHP_CompatInfo-2.19.0/phpcompatinfo.xml.dist 2013-07-11 22:21:27.000000000 +0200 -+++ PHP_CompatInfo-2.19.0/phpcompatinfo.xml 2013-07-12 08:22:34.529605184 +0200 -@@ -5,13 +5,14 @@ - reportFileAppend="false" - cacheDriver="file" - recursive="false" -- fileExtensions="php, inc, phtml" -+ fileExtensions="php, inc, phtml, module, install" - consoleProgress="true" - verbose="false" - > - - - -+ /tmp/phpci-%{USER} - 1 - 86400 - diff --git a/fedora-review-check b/fedora-review-check new file mode 100755 index 0000000..cc72fc4 --- /dev/null +++ b/fedora-review-check @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ $# -eq 2 ] +then exec /usr/bin/phpcompatinfo analyser:run $2 --output $1 --no-ansi + +else echo "usage $0 logname dirname" + exit 1 +fi diff --git a/php-bartlett-PHP-CompatInfo-4.2.0-rpm.patch b/php-bartlett-PHP-CompatInfo-4.2.0-rpm.patch new file mode 100644 index 0000000..2f04774 --- /dev/null +++ b/php-bartlett-PHP-CompatInfo-4.2.0-rpm.patch @@ -0,0 +1,140 @@ +diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist +--- ./bin/phpcompatinfo.json.dist.rpm 2015-04-04 15:32:17.536201524 +0200 ++++ ./bin/phpcompatinfo.json.dist 2015-04-04 15:32:37.776282296 +0200 +@@ -6,6 +6,19 @@ + } + ], + "plugins": [ ++ { ++ "name": "Cache", ++ "class": "Bartlett\\Reflect\\Plugin\\CachePlugin", ++ "options": { ++ "adapter": "DoctrineCacheAdapter", ++ "backend": { ++ "class": "Doctrine\\Common\\Cache\\FilesystemCache", ++ "args": [ ++ "%{HOME}/.cache/php-reflect" ++ ] ++ } ++ } ++ } + ], + "analysers" : [ + ], +diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo +--- ./bin/phpcompatinfo.rpm 2015-04-04 08:52:23.000000000 +0200 ++++ ./bin/phpcompatinfo 2015-04-04 15:33:59.668609143 +0200 +@@ -16,8 +16,30 @@ if (\Phar::running()) { + putenv("BARTLETTRC=" . strtolower($appName) . '.json'); + } + } +-$loader = require_once $vendorDir . '/autoload.php'; +-$loader->setUseIncludePath(true); ++ ++putenv('BARTLETT_COMPATINFO_DB=/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite'); ++ ++$vendorDir = '/usr/share/php'; ++require_once $vendorDir . '/PhpParser/Autoloader.php'; ++PhpParser\Autoloader::register(); ++ ++require_once $vendorDir . '/SebastianBergmann/Version/Version.php'; ++ ++require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php'; ++use Symfony\Component\ClassLoader\UniversalClassLoader; ++ ++$loader = new UniversalClassLoader(); ++$loader->registerNamespaces(array( ++ 'Symfony\\Component' => $vendorDir, ++ 'Doctrine\\Common' => $vendorDir, ++ 'phpDocumentor\\Reflection' => $vendorDir, ++ 'Seld\\JsonLint' => $vendorDir, ++ 'JsonSchema' => $vendorDir, ++ 'Psr\\Log' => $vendorDir, ++ 'Monolog' => $vendorDir, ++ 'Bartlett' => $vendorDir, ++)); ++$loader->register(); + + if (PHP_SAPI !== 'cli') { + return; +@@ -28,5 +50,5 @@ use Bartlett\CompatInfo\Console\Applicat + + Environment::setScanDir(); + +-$application = new Application($appName, '4.2'); ++$application = new Application($appName, '@package_version@'); + $application->run(); +diff -up ./data/handleDB.php.rpm ./data/handleDB.php +--- ./data/handleDB.php.rpm 2015-04-04 08:52:23.000000000 +0200 ++++ ./data/handleDB.php 2015-04-04 15:31:55.188112331 +0200 +@@ -11,7 +11,18 @@ + * @since Release 4.0.0alpha3 + */ + +-require_once dirname(__DIR__) . '/vendor/autoload.php'; ++$baseDir = dirname(__DIR__); ++$vendorDir = '/usr/share/php'; ++require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php'; ++use Symfony\Component\ClassLoader\UniversalClassLoader; ++ ++$loader = new UniversalClassLoader(); ++$loader->registerNamespaces(array( ++ 'Symfony\\Component' => $vendorDir, ++ )); ++ ++$loader->register(); ++ + require_once __DIR__ . '/ReferenceCollection.php'; + + use Bartlett\CompatInfo\Reference\ExtensionFactory; +diff -up ./src/Bartlett/CompatInfo/Environment.php.rpm ./src/Bartlett/CompatInfo/Environment.php +--- ./src/Bartlett/CompatInfo/Environment.php.rpm 2015-04-04 08:52:23.000000000 +0200 ++++ ./src/Bartlett/CompatInfo/Environment.php 2015-04-04 15:31:55.188112331 +0200 +@@ -34,6 +34,10 @@ class Environment + */ + public static function initRefDb() + { ++ if ($database = getenv('BARTLETT_COMPATINFO_DB')) { ++ return new \PDO('sqlite:' . $database); ++ } ++ + $database = 'compatinfo.sqlite'; + $tempDir = sys_get_temp_dir() . '/bartlett'; + +diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +--- ./tests/bootstrap.php.rpm 2015-04-04 08:52:23.000000000 +0200 ++++ ./tests/bootstrap.php 2015-04-04 15:31:55.188112331 +0200 +@@ -1,8 +1,31 @@ + registerNamespaces(array( ++ 'Doctrine\\Common' => $vendorDir, ++ 'phpDocumentor\\Reflection' => $vendorDir, ++ 'Symfony\\Component' => $vendorDir, ++ 'Seld\\JsonLint' => $vendorDir, ++ 'JsonSchema' => $vendorDir, ++ 'Bartlett\\Reflect' => $vendorDir, ++ 'Bartlett\\UmlWriter' => $vendorDir, ++ 'Bartlett\\Tests\\CompatInfo' => $baseDir . '/tests', ++ 'Bartlett' => $baseDir . '/src', ++ )); ++ ++$loader->register(); ++ ++# Class not catched by autoloader ++require $vendorDir . '/Bartlett/Reflect.php'; + require __DIR__ . '/Reference/GenericTest.php'; diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 537e7d0..405cd6e 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -1,67 +1,97 @@ -# spec file for php-bartlett-PHP-CompatInfo +# remirepo/fedora spec file for php-bartlett-PHP-CompatInfo # -# Copyright (c) 2011-2013 Remi Collet +# Copyright (c) 2011-2015 Remi Collet # License: CC-BY-SA -# http://creativecommons.org/licenses/by-sa/3.0/ +# http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} -%{!?pear_metadir: %global pear_metadir %{pear_phpdir}} -%global pear_name PHP_CompatInfo -%global channel bartlett.laurent-laville.org - -# TODO : link /usr/share/pear/data/PHP_CompatInfo/misc/jquery-min.js -# to system jquery when available, then fix License (BSD only) - +%global gh_commit 4026f69cd3d5f03467a58386a4a00225e3dc2544 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner llaville +%global gh_project php-compat-info +%global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 2.26.0 +Version: 4.2.0 Release: 1%{?dist} Summary: Find out version and the extensions required for a piece of code to run Group: Development/Libraries -# PHP-CompatInfo is BSD, bundled jquery is MIT (or GPL) -License: BSD and MIT +License: BSD URL: http://php5.laurent-laville.org/compatinfo/ -Source0: http://bartlett.laurent-laville.org/get/%{pear_name}-%{version}%{?prever}.tgz -Source1: https://raw.github.com/llaville/php-compat-info/master/misc/phpcompatinfo.1 +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?prever}-%{gh_short}.tar.gz +# Script for fedora-review +Source1: fedora-review-check -# Update configuration for best experience -# Reference = ALL known extension (instead of installed ones) -# Make cache / save_path user specific -# Add .install .module to fileExtensions (for drupal) -Patch0: %{pear_name}-conf.patch +# Autoloader for RPM - die composer ! +# and sqlite database path +Patch0: %{name}-4.2.0-rpm.patch BuildArch: noarch -BuildRequires: php(language) >= 5.3.0 -BuildRequires: php-pear(PEAR) >= 1.9.0 -BuildRequires: php-channel(%{channel}) +BuildRequires: php(language) >= 5.3.2 +BuildRequires: php-pdo_sqlite +BuildRequires: php-composer(bartlett/php-reflect) >= 3.1 +%if %{with_tests} # to run test suite -BuildRequires: php-pear(pear.phpunit.de/PHPUnit) >= 3.6.0 -BuildRequires: php-pear(%{channel}/PHP_Reflect) >= 1.9.0 +BuildRequires: %{_bindir}/phpunit +%endif -Requires(post): %{__pear} -Requires(postun): %{__pear} -Requires: php(language) >= 5.3.0 -Requires: php-date -Requires: php-dom +# From composer.json, "require" +# "php": ">=5.3.2", +# "ext-libxml": "*", +# "ext-pcre": "*", +# "ext-spl": "*", +# "ext-json": "*", +# "ext-pdo_sqlite": "*", +# "symfony/console": "~2.5", +# "bartlett/php-reflect": "~3.1", +Requires: php(language) >= 5.3.2 +Requires: php-cli +Requires: php-json Requires: php-libxml Requires: php-pcre -Requires: php-reflection +Requires: php-pdo_sqlite Requires: php-spl -Requires: php-pear(PEAR) >= 1.9.0 -Requires: php-pear(%{channel}/PHP_Reflect) >= 1.9.0 -Requires: php-pear(%{channel}/PHP_Reflect) < 2 -Requires: php-pear(Console_CommandLine) >= 1.2.0 -# Optional -Requires: php-pear(pear.phpunit.de/PHPUnit) >= 3.6.0 -Requires: php-pear(pear.phpunit.de/PHP_Timer) >= 1.0.0 -# Optional and not yet availalble php-pear(Net_Growl) >= 2.2.2 +Requires: php-composer(bartlett/php-reflect) >= 3.1 +Requires: php-composer(bartlett/php-reflect) < 4 +Requires: php-composer(symfony/console) >= 2.5 +Requires: php-composer(symfony/console) < 3 +# From composer.json, "require-dev": { +# "doctrine/cache": "~1.3", +# "psr/log": "~1.0", +# "monolog/monolog": "~1.10", +# "bartlett/monolog-callbackfilterhandler": "~1.0", +# "bartlett/monolog-growlhandler": "~1.0", +# "bartlett/phpunit-loggertestlistener": "~1.5", +# "bartlett/umlwriter": "~1.0" +# From composer.json, "suggest" +# "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2", +# "psr/log": "Allow logging events with the LogPlugin", +# "monolog/monolog": "Allow logging events with the LogPlugin", +# "bartlett/monolog-callbackfilterhandler": "Advanced filtering strategies for Monolog", +# "bartlett/monolog-growlhandler": "Sends notifications to Growl for Monolog", +# "bartlett/phpunit-loggertestlistener": "Allow logging unit tests to your favorite PSR-3 logger interface", +# "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)" +# "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2" +# "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)" +Requires: php-composer(doctrine/cache) +Requires: php-composer(bartlett/umlwriter) +# Required by autoloader +Requires: php-composer(nikic/php-parser) +Requires: php-composer(doctrine/collections) +Requires: php-composer(symfony/class-loader) +Requires: php-composer(symfony/event-dispatcher) +Requires: php-composer(symfony/finder) +Requires: php-composer(symfony/stopwatch) +Requires: php-composer(symfony/dependency-injection) +Requires: php-composer(phpdocumentor/reflection-docblock) +Requires: php-composer(seld/jsonlint) +Requires: php-composer(sebastian/version) +Requires: php-composer(justinrainbow/json-schema) -Provides: php-pear(%{channel}/%{pear_name}) = %{version}%{?prever} -Provides: phpci = %{version}%{?prever} -Provides: phpcompatinfo = %{version}%{?prever} +Provides: phpcompatinfo = %{version} +Provides: php-composer(bartlett/php-compatinfo) = %{version} %description @@ -70,102 +100,79 @@ version and extensions required for it to run. CLI version has many reports (extension, interface, class, function, constant) to display and ability to show content of dictionary references. -HTML Documentation: %{pear_docdir}/%{pear_name}/html/index.html +Documentation: http://php5.laurent-laville.org/compatinfo/manual/current/en/ %prep -%setup -q -c +%setup -q -n %{gh_project}-%{gh_commit} -cd %{pear_name}-%{version}%{?prever} +%patch0 -p1 -b .rpm -# Copy upstream default configuration -cp phpcompatinfo.xml.dist phpcompatinfo.xml -# Apply our changes -%patch0 -p1 -b .rpm +# Cleanup patched files +find src -name \*rpm -delete -print -cp ../package.xml %{name}.xml +# Set package version +sed -e 's/@package_version@/%{version}%{?prever}/' \ + -i $(find src -name \*.php) bin/phpcompatinfo %build -cd %{pear_name}-%{version}%{?prever} +: Generate the references database +%{_bindir}/php -d date.timezone=Europe/Paris data/handleDB.php db:init %install -cd %{pear_name}-%{version}%{?prever} -%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml +mkdir -p %{buildroot}%{_datadir}/php +cp -pr src/Bartlett %{buildroot}%{_datadir}/php/Bartlett -# Clean up unnecessary files -rm -rf %{buildroot}%{pear_metadir}/.??* +install -D -p -m 755 bin/phpcompatinfo %{buildroot}%{_bindir}/phpcompatinfo +install -D -p -m 644 bin/phpcompatinfo.json.dist %{buildroot}%{_sysconfdir}/phpcompatinfo.json +install -D -p -m 644 bin/phpcompatinfo.1 %{buildroot}%{_mandir}/man1/phpcompatinfo.1 +install -D -p -m 644 data/compatinfo.sqlite %{buildroot}%{_datadir}/%{name}/compatinfo.sqlite -# Install XML package description -mkdir -p %{buildroot}%{pear_xmldir} -install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} - -# Create default package configuration -install -pm 644 phpcompatinfo.xml %{buildroot}%{pear_cfgdir}/%{pear_name}/ - -# Install the man page -mkdir -p %{buildroot}%{_mandir}/man1 -install -pm 644 %{SOURCE1} %{buildroot}%{_mandir}/man1/phpcompatinfo.1 - -# Keep old phpci command for compatibility (will be remove later) -cd %{buildroot}%{_bindir} -ln -s phpcompatinfo phpci +install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/fedora-review-check +%if %{with_tests} %check -cd %{pear_name}-%{version}%{?prever} - -%if 0%{?rhel} == 6 -# php-5.3.3-CVE-2012-0057.patch add new constants from php 5.3.9 -# so drop this test which fails with -# Constant 'XSL_SECPREF_CREATE_DIRECTORY', found in Reference (5.3.9,), exists. -rm -f tests/Reference/XslTest.php -%endif - -# OK, but incomplete or skipped tests! -# Tests: 810, Assertions: 10996, Skipped: 80, when most extensions installed -# Tests: 551, Assertions: 6833, Skipped: 378, in mock -# Reference tests need some fixes for EL-5, so ignore result for now %{_bindir}/phpunit \ - -d date.timezone=UTC \ + --include-path src \ -d memory_limit=-1 \ - --bootstrap %{buildroot}%{pear_phpdir}/Bartlett/PHP/CompatInfo/Autoload.php \ -%if 0%{?rhel} < 6 && 0%{?fedora} < 8 - tests || exit 0 -%else - tests +%if 0%{?fedora} < 21 + || exit 0 +%endif %endif %post -%{__pear} install --nodeps --soft --force --register-only \ - %{pear_xmldir}/%{name}.xml >/dev/null || : - -%postun -if [ $1 -eq 0 ] ; then - %{__pear} uninstall --nodeps --ignore-errors --register-only \ - %{channel}/%{pear_name} >/dev/null || : +if [ -x %{_bindir}/pear ]; then + %{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \ + bartlett.laurent-laville.org/PHP_CompatInfo >/dev/null || : fi %files -%doc %{pear_docdir}/%{pear_name} -%dir %{pear_cfgdir}/%{pear_name} -# Editable configuration -%config(noreplace) %{pear_cfgdir}/%{pear_name}/phpcompatinfo.xml -# Default configuration -%{pear_cfgdir}/%{pear_name}/phpcompatinfo.xml.dist -%{pear_xmldir}/%{name}.xml -%{pear_phpdir}/Bartlett/PHP/Compat* -%{pear_testdir}/%{pear_name} -%{pear_datadir}/%{pear_name} -%{_bindir}/phpci +%{!?_licensedir:%global license %%doc} +%license LICENSE +%doc composer.json README.* +%config(noreplace) %{_sysconfdir}/phpcompatinfo.json %{_bindir}/phpcompatinfo -%{_mandir}/man1/phpcompatinfo.* +%{_datadir}/php/Bartlett/CompatInfo +%{_mandir}/man1/phpcompatinfo.1* +%{_datadir}/%{name} %changelog +* Tue May 19 2015 Remi Collet - 4.2.0-1 +- update to 4.2.0 +- raise dependency on bartlett/php-reflect 3.1 +- add dependency on bartlett/umlwriter +- add fedora-review-check script +- handle --without tests option to skip test suite during build +- add dependency on justinrainbow/json-schema +- add dependency on sebastian/version +- add dependency on seld/jsonlint + * Fri Dec 13 2013 Remi Collet - 2.26.0-1 - Update to 2.26.0 (stable) diff --git a/phpcompatinfo.1 b/phpcompatinfo.1 deleted file mode 100644 index 0a0f32b..0000000 --- a/phpcompatinfo.1 +++ /dev/null @@ -1,149 +0,0 @@ -'\" t -.\" Title: phpcompatinfo -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 05/28/2013 -.\" Manual: \ \& -.\" Source: \ \& -.\" Language: English -.\" -.TH "PHPCOMPATINFO" "1" "05/28/2013" "\ \&" "\ \&" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -phpcompatinfo \- parse any data source to find out the minimum version and extensions required for it to run -.SH "SYNOPSIS" -.sp -\fBphpcompatinfo\fR [\fIOPTIONS\fR] \fICOMMAND\fR [\fIOPTS\fR] [\fIDATASOURCE\fR] -.SH "DESCRIPTION" -.sp -The phpcompatinfo(1) command parse any \fIDATASOURCE\fR to find out the minimum PHP version and extensions required\&. -.SH "OPTIONS" -.PP -\fB\-\-configuration\fR=\fIXMLFILE\fR -.RS 4 -Read configuration options from -\fIXMLFILE\fR\&. All command line options will overrides those that are defined in this xml file\&. -.RE -.PP -\fB\-\-no\-configuration\fR -.RS 4 -Ignore default configuration files: -\fIphpcompatinfo\&.xml\fR, -\fIphpcompatinfo\&.xml\&.dist\fR\&. -.RE -.PP -\fB\-d, \-\-ini\-set\fR=\fIINI_SET\fR -.RS 4 -Sets a php\&.ini directive value\&. This option may be specified more than once\&. -.RE -.PP -\fB\-v, \-\-verbose\fR -.RS 4 -Verbosely print processing information and warning messages\&. -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -[\fITOPIC\fR] \-h, \-\-help*:: Print help TOPIC\&. -\fItopic\fR\fB\-\-help\fR -will print help content about a topic, -\fB\-\-help\fR -summarizes phpcompatinfo syntax\&. -.RE -.RE -.PP -\fB\-\-version\fR -.RS 4 -Print program version number\&. -.RE -.SH "PRINT COMMAND" -.sp -The phpcompatinfo(1) \fIPRINT\fR command is used to find out minimum php version to run data source code provided\&. Syntax: -.sp -.if n \{\ -.RS 4 -.\} -.nf -phpcompatinfo print [OPTION] DATA_SOURCE -.fi -.if n \{\ -.RE -.\} -.sp -Where: -.PP -\fBOPTION\fR -.RS 4 -phpcompatinfo(1) -\fB\-\-report\fR -option specifying the type of result to print on stdout\&. See -\fB\-\-help\-report\fR -option for valid choices\&. -.RE -.PP -\fBDATA_SOURCE\fR -.RS 4 -The source path to scan\&. -.RE -.sp -The commands perform as follows: -.PP -\fBprint\fR -.RS 4 -Print report on stdout or into a file if -\fB\-\-report\-file\fR -option is in effect\&. -.RE -.SH "EXIT STATUS" -.PP -\fB0\fR -.RS 4 -Success -.RE -.PP -\fB1\fR -.RS 4 -Failure (syntax or usage error; configuration error; unexpected error)\&. -.RE -.SH "BUGS" -.sp -Report any issue at https://github\&.com/llaville/php\-compat\-info/issues -.SH "AUTHORS" -.sp -PHP_CompatInfo was originally written by Davey Shafik in 2004\&. -.sp -Remi Collet, contributor of many extensions reference and unit tests, joined the project since version 2\&.0\&.0RC2 -.sp -This CLI version was introduced and written by Laurent Laville\&. -.SH "SEE ALSO" -.sp -Main web site: http://php5\&.laurent\-laville\&.org/compatinfo/ -.SH "COPYRIGHT" -.sp -Copyright (C) 2010\-2013 Laurent Laville\&. -.SH "LICENSE" -.sp -Free use of this software is granted under the terms of the BSD 3\-clause license\&. diff --git a/sources b/sources index 7ea53c8..1684989 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ca6f0922e26119157efb891cd51d6c66 PHP_CompatInfo-2.26.0.tgz +64324284bb811c9d185f41b5e5109a32 php-compat-info-4.2.0-4026f69.tar.gz From 4f52135ce579f3299983bb695a1bb4578277020f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 16 Jun 2015 12:17:58 +0200 Subject: [PATCH 05/19] v 4.3.0 (cherry picked from commit b05884528337263e2366c2f9e79466cf1ef73dcc) --- .gitignore | 1 + ...atch => php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch | 2 +- php-bartlett-PHP-CompatInfo.spec | 10 +++++++--- sources | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) rename php-bartlett-PHP-CompatInfo-4.2.0-rpm.patch => php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch (99%) diff --git a/.gitignore b/.gitignore index 8b85b01..0eb7ee7 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ clog /php-compat-info-3.7.2.tar.gz /php-compat-info-3.7.3.tar.gz /php-compat-info-4.2.0-4026f69.tar.gz +/php-compat-info-4.3.0-c4bfef8.tar.gz diff --git a/php-bartlett-PHP-CompatInfo-4.2.0-rpm.patch b/php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch similarity index 99% rename from php-bartlett-PHP-CompatInfo-4.2.0-rpm.patch rename to php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch index 2f04774..36e02b5 100644 --- a/php-bartlett-PHP-CompatInfo-4.2.0-rpm.patch +++ b/php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch @@ -61,7 +61,7 @@ diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo Environment::setScanDir(); --$application = new Application($appName, '4.2'); +-$application = new Application($appName, '4.3'); +$application = new Application($appName, '@package_version@'); $application->run(); diff -up ./data/handleDB.php.rpm ./data/handleDB.php diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 405cd6e..83330f1 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -6,14 +6,14 @@ # # Please, preserve the changelog entries # -%global gh_commit 4026f69cd3d5f03467a58386a4a00225e3dc2544 +%global gh_commit c4bfef85fe799d2079f98f7b3e46d021bc739069 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner llaville %global gh_project php-compat-info %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 4.2.0 +Version: 4.3.0 Release: 1%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -26,7 +26,7 @@ Source1: fedora-review-check # Autoloader for RPM - die composer ! # and sqlite database path -Patch0: %{name}-4.2.0-rpm.patch +Patch0: %{name}-4.3.0-rpm.patch BuildArch: noarch BuildRequires: php(language) >= 5.3.2 @@ -138,6 +138,7 @@ install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name} %{_bindir}/phpunit \ --include-path src \ -d memory_limit=-1 \ + --verbose \ %if 0%{?fedora} < 21 || exit 0 %endif @@ -163,6 +164,9 @@ fi %changelog +* Tue Jun 16 2015 Remi Collet - 4.6.0-1 +- update to 4.3.0 + * Tue May 19 2015 Remi Collet - 4.2.0-1 - update to 4.2.0 - raise dependency on bartlett/php-reflect 3.1 diff --git a/sources b/sources index 1684989..e3c96e1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -64324284bb811c9d185f41b5e5109a32 php-compat-info-4.2.0-4026f69.tar.gz +0ff66371f36d4a4a85f37d9cdbc23605 php-compat-info-4.3.0-c4bfef8.tar.gz From 9e9909ae01cb4e8ecf4fc97238f651bce52c70b3 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 20 Jul 2015 15:02:20 +0200 Subject: [PATCH 06/19] v4.4.0 + new autoloader (cherry picked from commit 9e001907de02f01ff86bfdbf68da61aad513ec39) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch | 140 -------------------- php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch | 120 +++++++++++++++++ php-bartlett-PHP-CompatInfo-autoload.php | 22 +++ php-bartlett-PHP-CompatInfo-upstream.patch | 48 +++++++ php-bartlett-PHP-CompatInfo.spec | 59 +++++---- sources | 2 +- 7 files changed, 225 insertions(+), 167 deletions(-) delete mode 100644 php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch create mode 100644 php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch create mode 100644 php-bartlett-PHP-CompatInfo-autoload.php create mode 100644 php-bartlett-PHP-CompatInfo-upstream.patch diff --git a/.gitignore b/.gitignore index 0eb7ee7..777af61 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ clog /php-compat-info-3.7.3.tar.gz /php-compat-info-4.2.0-4026f69.tar.gz /php-compat-info-4.3.0-c4bfef8.tar.gz +/php-compat-info-4.4.0-92ee634.tar.gz diff --git a/php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch b/php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch deleted file mode 100644 index 36e02b5..0000000 --- a/php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch +++ /dev/null @@ -1,140 +0,0 @@ -diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist ---- ./bin/phpcompatinfo.json.dist.rpm 2015-04-04 15:32:17.536201524 +0200 -+++ ./bin/phpcompatinfo.json.dist 2015-04-04 15:32:37.776282296 +0200 -@@ -6,6 +6,19 @@ - } - ], - "plugins": [ -+ { -+ "name": "Cache", -+ "class": "Bartlett\\Reflect\\Plugin\\CachePlugin", -+ "options": { -+ "adapter": "DoctrineCacheAdapter", -+ "backend": { -+ "class": "Doctrine\\Common\\Cache\\FilesystemCache", -+ "args": [ -+ "%{HOME}/.cache/php-reflect" -+ ] -+ } -+ } -+ } - ], - "analysers" : [ - ], -diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo ---- ./bin/phpcompatinfo.rpm 2015-04-04 08:52:23.000000000 +0200 -+++ ./bin/phpcompatinfo 2015-04-04 15:33:59.668609143 +0200 -@@ -16,8 +16,30 @@ if (\Phar::running()) { - putenv("BARTLETTRC=" . strtolower($appName) . '.json'); - } - } --$loader = require_once $vendorDir . '/autoload.php'; --$loader->setUseIncludePath(true); -+ -+putenv('BARTLETT_COMPATINFO_DB=/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite'); -+ -+$vendorDir = '/usr/share/php'; -+require_once $vendorDir . '/PhpParser/Autoloader.php'; -+PhpParser\Autoloader::register(); -+ -+require_once $vendorDir . '/SebastianBergmann/Version/Version.php'; -+ -+require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php'; -+use Symfony\Component\ClassLoader\UniversalClassLoader; -+ -+$loader = new UniversalClassLoader(); -+$loader->registerNamespaces(array( -+ 'Symfony\\Component' => $vendorDir, -+ 'Doctrine\\Common' => $vendorDir, -+ 'phpDocumentor\\Reflection' => $vendorDir, -+ 'Seld\\JsonLint' => $vendorDir, -+ 'JsonSchema' => $vendorDir, -+ 'Psr\\Log' => $vendorDir, -+ 'Monolog' => $vendorDir, -+ 'Bartlett' => $vendorDir, -+)); -+$loader->register(); - - if (PHP_SAPI !== 'cli') { - return; -@@ -28,5 +50,5 @@ use Bartlett\CompatInfo\Console\Applicat - - Environment::setScanDir(); - --$application = new Application($appName, '4.3'); -+$application = new Application($appName, '@package_version@'); - $application->run(); -diff -up ./data/handleDB.php.rpm ./data/handleDB.php ---- ./data/handleDB.php.rpm 2015-04-04 08:52:23.000000000 +0200 -+++ ./data/handleDB.php 2015-04-04 15:31:55.188112331 +0200 -@@ -11,7 +11,18 @@ - * @since Release 4.0.0alpha3 - */ - --require_once dirname(__DIR__) . '/vendor/autoload.php'; -+$baseDir = dirname(__DIR__); -+$vendorDir = '/usr/share/php'; -+require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php'; -+use Symfony\Component\ClassLoader\UniversalClassLoader; -+ -+$loader = new UniversalClassLoader(); -+$loader->registerNamespaces(array( -+ 'Symfony\\Component' => $vendorDir, -+ )); -+ -+$loader->register(); -+ - require_once __DIR__ . '/ReferenceCollection.php'; - - use Bartlett\CompatInfo\Reference\ExtensionFactory; -diff -up ./src/Bartlett/CompatInfo/Environment.php.rpm ./src/Bartlett/CompatInfo/Environment.php ---- ./src/Bartlett/CompatInfo/Environment.php.rpm 2015-04-04 08:52:23.000000000 +0200 -+++ ./src/Bartlett/CompatInfo/Environment.php 2015-04-04 15:31:55.188112331 +0200 -@@ -34,6 +34,10 @@ class Environment - */ - public static function initRefDb() - { -+ if ($database = getenv('BARTLETT_COMPATINFO_DB')) { -+ return new \PDO('sqlite:' . $database); -+ } -+ - $database = 'compatinfo.sqlite'; - $tempDir = sys_get_temp_dir() . '/bartlett'; - -diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./tests/bootstrap.php.rpm 2015-04-04 08:52:23.000000000 +0200 -+++ ./tests/bootstrap.php 2015-04-04 15:31:55.188112331 +0200 -@@ -1,8 +1,31 @@ - registerNamespaces(array( -+ 'Doctrine\\Common' => $vendorDir, -+ 'phpDocumentor\\Reflection' => $vendorDir, -+ 'Symfony\\Component' => $vendorDir, -+ 'Seld\\JsonLint' => $vendorDir, -+ 'JsonSchema' => $vendorDir, -+ 'Bartlett\\Reflect' => $vendorDir, -+ 'Bartlett\\UmlWriter' => $vendorDir, -+ 'Bartlett\\Tests\\CompatInfo' => $baseDir . '/tests', -+ 'Bartlett' => $baseDir . '/src', -+ )); -+ -+$loader->register(); -+ -+# Class not catched by autoloader -+require $vendorDir . '/Bartlett/Reflect.php'; - require __DIR__ . '/Reference/GenericTest.php'; diff --git a/php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch b/php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch new file mode 100644 index 0000000..dd91593 --- /dev/null +++ b/php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch @@ -0,0 +1,120 @@ +diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist +--- ./bin/phpcompatinfo.json.dist.rpm 2015-07-11 10:04:30.000000000 +0200 ++++ ./bin/phpcompatinfo.json.dist 2015-07-13 09:06:15.108698079 +0200 +@@ -6,6 +6,19 @@ + } + ], + "plugins": [ ++ { ++ "name": "Cache", ++ "class": "Bartlett\\Reflect\\Plugin\\CachePlugin", ++ "options": { ++ "adapter": "DoctrineCacheAdapter", ++ "backend": { ++ "class": "Doctrine\\Common\\Cache\\FilesystemCache", ++ "args": [ ++ "%{HOME}/.cache/php-reflect" ++ ] ++ } ++ } ++ } + ], + "analysers" : [ + ], +diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo +--- ./bin/phpcompatinfo.rpm 2015-07-11 10:04:30.000000000 +0200 ++++ ./bin/phpcompatinfo 2015-07-13 09:06:15.114698099 +0200 +@@ -1,23 +1,12 @@ + #!/usr/bin/env php + setUseIncludePath(true); + + if (\Phar::running()) { + if ($home) { +@@ -35,18 +24,10 @@ if (PHP_SAPI !== 'cli') { + return; + } + +-if (\Phar::running()) { +- try { +- Bartlett\CompatInfo\Environment::checkRequirements(); +- } catch (\RuntimeException $e) { +- die ($e->getMessage()); +- } +-} +- + use Bartlett\Reflect\Environment; + use Bartlett\CompatInfo\Console\Application; + + Environment::setScanDir(); + +-$application = new Application($appName, '4.3'); ++$application = new Application($appName, '@package_version@'); + $application->run(); +diff -up ./data/handleDB.php.rpm ./data/handleDB.php +--- ./data/handleDB.php.rpm 2015-07-11 10:04:30.000000000 +0200 ++++ ./data/handleDB.php 2015-07-13 09:06:15.108698079 +0200 +@@ -11,7 +11,8 @@ + * @since Release 4.0.0alpha3 + */ + +-require_once dirname(__DIR__) . '/vendor/autoload.php'; ++require_once __DIR__ . '/../src/Bartlett/CompatInfo/autoload.php'; ++ + require_once __DIR__ . '/ReferenceCollection.php'; + + use Bartlett\CompatInfo\Reference\ExtensionFactory; +diff -up ./src/Bartlett/CompatInfo/Environment.php.rpm ./src/Bartlett/CompatInfo/Environment.php +--- ./src/Bartlett/CompatInfo/Environment.php.rpm 2015-07-13 09:10:10.271476463 +0200 ++++ ./src/Bartlett/CompatInfo/Environment.php 2015-07-13 09:10:52.422615982 +0200 +@@ -36,6 +36,12 @@ class Environment + */ + public static function initRefDb() + { ++ if (($database = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($database)) { ++ return new \PDO('sqlite:' . $database); ++ } else if (file_exists($database = '/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite')) { ++ return new \PDO('sqlite:' . $database); ++ } ++ + $database = 'compatinfo.sqlite'; + $tempDir = sys_get_temp_dir() . '/bartlett'; + +diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +--- ./tests/bootstrap.php.rpm 2015-07-11 10:04:30.000000000 +0200 ++++ ./tests/bootstrap.php 2015-07-13 09:06:15.108698079 +0200 +@@ -1,8 +1,11 @@ + addPrefix('Bartlett\\Tests\\CompatInfo', $baseDir . '/tests'); + ++putenv('BARTLETT_COMPATINFO_DB='.dirname(__DIR__).'/data/compatinfo.sqlite'); ++# Class not catched by autoloader + require __DIR__ . '/Reference/GenericTest.php'; diff --git a/php-bartlett-PHP-CompatInfo-autoload.php b/php-bartlett-PHP-CompatInfo-autoload.php new file mode 100644 index 0000000..62dd824 --- /dev/null +++ b/php-bartlett-PHP-CompatInfo-autoload.php @@ -0,0 +1,22 @@ +register(); +} +$fedoraClassLoader->addPrefixes(array( + 'Bartlett\\CompatInfo' => dirname(dirname(__DIR__)), +)); + +// Dependencies +require_once $vendorDir . '/Bartlett/Reflect/autoload.php'; diff --git a/php-bartlett-PHP-CompatInfo-upstream.patch b/php-bartlett-PHP-CompatInfo-upstream.patch new file mode 100644 index 0000000..07a04ab --- /dev/null +++ b/php-bartlett-PHP-CompatInfo-upstream.patch @@ -0,0 +1,48 @@ +From 392b4889f236326115516c680415cef5c02a5c23 Mon Sep 17 00:00:00 2001 +From: Laurent Laville +Date: Tue, 14 Jul 2015 21:00:38 +0200 +Subject: [PATCH] fixed issue GH-206 + +--- + data/references/Intl1.classes.json | 8 -------- + data/references/Intl5.classes.json | 8 ++++++++ + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/data/references/Intl1.classes.json b/data/references/Intl1.classes.json +index 568bf5d..d9abb1c 100644 +--- a/data/references/Intl1.classes.json ++++ b/data/references/Intl1.classes.json +@@ -17,14 +17,6 @@ + }, + { + "ext_name_fk": 32, +- "name": "IntlException", +- "ext_min": "1.0.0beta", +- "ext_max": "", +- "php_min": "5.2.0", +- "php_max": "" +- }, +- { +- "ext_name_fk": 32, + "name": "Locale", + "ext_min": "1.0.0beta", + "ext_max": "", +diff --git a/data/references/Intl5.classes.json b/data/references/Intl5.classes.json +index 8ad32c5..b5fdfb5 100644 +--- a/data/references/Intl5.classes.json ++++ b/data/references/Intl5.classes.json +@@ -70,5 +70,13 @@ + "ext_max": "", + "php_min": "5.5.0", + "php_max": "" ++ }, ++ { ++ "ext_name_fk": 32, ++ "name": "IntlException", ++ "ext_min": "5.5.0", ++ "ext_max": "", ++ "php_min": "5.5.0", ++ "php_max": "" + } + ] +\ No newline at end of file diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 83330f1..df62337 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -6,35 +6,45 @@ # # Please, preserve the changelog entries # -%global gh_commit c4bfef85fe799d2079f98f7b3e46d021bc739069 +%{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} +%global gh_commit 92ee6348c3059c614b58d9927a21a778b5d7b97e %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner llaville %global gh_project php-compat-info %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 4.3.0 -Release: 1%{?dist} +Version: 4.4.0 +Release: 2%{?dist} Summary: Find out version and the extensions required for a piece of code to run Group: Development/Libraries License: BSD URL: http://php5.laurent-laville.org/compatinfo/ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?prever}-%{gh_short}.tar.gz + # Script for fedora-review Source1: fedora-review-check # Autoloader for RPM - die composer ! -# and sqlite database path -Patch0: %{name}-4.3.0-rpm.patch +Source2: %{name}-autoload.php + +# Autoload and sqlite database path +Patch0: %{name}-4.4.0-rpm.patch + +# Upstream fix for Intl reference +Patch1: %{name}-upstream.patch BuildArch: noarch BuildRequires: php(language) >= 5.3.2 -BuildRequires: php-pdo_sqlite -BuildRequires: php-composer(bartlett/php-reflect) >= 3.1 %if %{with_tests} # to run test suite BuildRequires: %{_bindir}/phpunit +BuildRequires: php-pdo_sqlite +BuildRequires: php-composer(bartlett/php-reflect) >= 3.1 +# For our patch / autoloader +BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-bartlett-PHP-Reflect >= 3.1.1-3 %endif # From composer.json, "require" @@ -75,20 +85,9 @@ Requires: php-composer(symfony/console) < 3 # "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)" # "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2" # "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)" -Requires: php-composer(doctrine/cache) -Requires: php-composer(bartlett/umlwriter) # Required by autoloader -Requires: php-composer(nikic/php-parser) -Requires: php-composer(doctrine/collections) Requires: php-composer(symfony/class-loader) -Requires: php-composer(symfony/event-dispatcher) -Requires: php-composer(symfony/finder) -Requires: php-composer(symfony/stopwatch) -Requires: php-composer(symfony/dependency-injection) -Requires: php-composer(phpdocumentor/reflection-docblock) -Requires: php-composer(seld/jsonlint) -Requires: php-composer(sebastian/version) -Requires: php-composer(justinrainbow/json-schema) +Requires: php-bartlett-PHP-Reflect >= 3.1.1-3 Provides: phpcompatinfo = %{version} Provides: php-composer(bartlett/php-compatinfo) = %{version} @@ -107,6 +106,8 @@ Documentation: http://php5.laurent-laville.org/compatinfo/manual/current/en/ %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -b .rpm +%patch1 -p1 -b .upstream +cp %{SOURCE2} src/Bartlett/CompatInfo/autoload.php # Cleanup patched files find src -name \*rpm -delete -print @@ -135,13 +136,14 @@ install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name} %if %{with_tests} %check -%{_bindir}/phpunit \ - --include-path src \ - -d memory_limit=-1 \ - --verbose \ -%if 0%{?fedora} < 21 - || exit 0 +%if "%{php_version}" < "5.5" +# https://github.com/llaville/php-compat-info/issues/206 +rm tests/Reference/Extension/IntlExtensionTest.php %endif + +%{_bindir}/phpunit \ + --include-path %{buildroot}%{_datadir}/php \ + -d memory_limit=1G %endif @@ -164,7 +166,12 @@ fi %changelog -* Tue Jun 16 2015 Remi Collet - 4.6.0-1 +* Mon Jul 20 2015 Remi Collet - 4.4.0-2 +- add upstream patch for Intl reference +- update to 4.4.0 +- rewrite autoloader + +* Tue Jun 16 2015 Remi Collet - 4.3.0-1 - update to 4.3.0 * Tue May 19 2015 Remi Collet - 4.2.0-1 diff --git a/sources b/sources index e3c96e1..d6c5224 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0ff66371f36d4a4a85f37d9cdbc23605 php-compat-info-4.3.0-c4bfef8.tar.gz +1b7bfea58869c2121eadb7a9af340b6e php-compat-info-4.4.0-92ee634.tar.gz From 2e297a35b7df008fd8cccfddfb36d87404064fd2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 6 Oct 2015 13:05:02 +0200 Subject: [PATCH 07/19] v4.5.0 (cherry picked from commit 8a67fc11786a43679f65dd2aced73b023151b161) --- .gitignore | 1 + ...hp-bartlett-PHP-CompatInfo-4.5.0-rpm.patch | 2 +- php-bartlett-PHP-CompatInfo.spec | 20 +++++++------------ sources | 2 +- 4 files changed, 10 insertions(+), 15 deletions(-) rename php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch => php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch (98%) diff --git a/.gitignore b/.gitignore index 777af61..0a73a9d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ clog /php-compat-info-4.2.0-4026f69.tar.gz /php-compat-info-4.3.0-c4bfef8.tar.gz /php-compat-info-4.4.0-92ee634.tar.gz +/php-compat-info-4.5.0-31d781a.tar.gz diff --git a/php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch b/php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch similarity index 98% rename from php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch rename to php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch index dd91593..60280df 100644 --- a/php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch +++ b/php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch @@ -69,7 +69,7 @@ diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo Environment::setScanDir(); --$application = new Application($appName, '4.3'); +-$application = new Application($appName, '4.5'); +$application = new Application($appName, '@package_version@'); $application->run(); diff -up ./data/handleDB.php.rpm ./data/handleDB.php diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index df62337..7a209db 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,15 +7,15 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 92ee6348c3059c614b58d9927a21a778b5d7b97e +%global gh_commit 31d781af6cf6113db85da8838bf25eb73e7b093e %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner llaville %global gh_project php-compat-info %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 4.4.0 -Release: 2%{?dist} +Version: 4.5.0 +Release: 1%{?dist} Summary: Find out version and the extensions required for a piece of code to run Group: Development/Libraries @@ -30,10 +30,7 @@ Source1: fedora-review-check Source2: %{name}-autoload.php # Autoload and sqlite database path -Patch0: %{name}-4.4.0-rpm.patch - -# Upstream fix for Intl reference -Patch1: %{name}-upstream.patch +Patch0: %{name}-4.5.0-rpm.patch BuildArch: noarch BuildRequires: php(language) >= 5.3.2 @@ -106,7 +103,6 @@ Documentation: http://php5.laurent-laville.org/compatinfo/manual/current/en/ %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -b .rpm -%patch1 -p1 -b .upstream cp %{SOURCE2} src/Bartlett/CompatInfo/autoload.php # Cleanup patched files @@ -136,11 +132,6 @@ install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name} %if %{with_tests} %check -%if "%{php_version}" < "5.5" -# https://github.com/llaville/php-compat-info/issues/206 -rm tests/Reference/Extension/IntlExtensionTest.php -%endif - %{_bindir}/phpunit \ --include-path %{buildroot}%{_datadir}/php \ -d memory_limit=1G @@ -166,6 +157,9 @@ fi %changelog +* Tue Oct 6 2015 Remi Collet - 4.5.0-1 +- update to 4.5.0 + * Mon Jul 20 2015 Remi Collet - 4.4.0-2 - add upstream patch for Intl reference - update to 4.4.0 diff --git a/sources b/sources index d6c5224..9ed1cb3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1b7bfea58869c2121eadb7a9af340b6e php-compat-info-4.4.0-92ee634.tar.gz +837673ac1811c45df8181e249221ace6 php-compat-info-4.5.0-31d781a.tar.gz From ba769b0fe45ca712758b73ca3f13eb08c00cb906 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 11 Oct 2015 19:22:19 +0200 Subject: [PATCH 08/19] v4.5.1 (cherry picked from commit 2ca788a28606c214c683b1f6bac6f80904000def) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0a73a9d..b5f4890 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ clog /php-compat-info-4.3.0-c4bfef8.tar.gz /php-compat-info-4.4.0-92ee634.tar.gz /php-compat-info-4.5.0-31d781a.tar.gz +/php-compat-info-4.5.1-e4c5d42.tar.gz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 7a209db..b36a67c 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,14 +7,14 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 31d781af6cf6113db85da8838bf25eb73e7b093e +%global gh_commit e4c5d42dce0820f59939bc7fbd2a8995bac66000 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner llaville %global gh_project php-compat-info %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 4.5.0 +Version: 4.5.1 Release: 1%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -157,6 +157,9 @@ fi %changelog +* Sun Oct 11 2015 Remi Collet - 4.5.1-1 +- update to 4.5.1 + * Tue Oct 6 2015 Remi Collet - 4.5.0-1 - update to 4.5.0 diff --git a/sources b/sources index 9ed1cb3..22d0fdb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -837673ac1811c45df8181e249221ace6 php-compat-info-4.5.0-31d781a.tar.gz +e6df4b0f3ef47efd63622ffe184fe248 php-compat-info-4.5.1-e4c5d42.tar.gz From 1b2f68553286f8228c6a34ca0b408e148454095b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 26 Nov 2015 14:22:42 +0100 Subject: [PATCH 09/19] v4.5.2 (cherry picked from commit 4b6f3ce768f6ed83a825687e17c7adc82bccd5e8) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b5f4890..3eb034d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ clog /php-compat-info-4.4.0-92ee634.tar.gz /php-compat-info-4.5.0-31d781a.tar.gz /php-compat-info-4.5.1-e4c5d42.tar.gz +/php-compat-info-4.5.2-4fc02f5.tar.gz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index b36a67c..4127329 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,14 +7,14 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit e4c5d42dce0820f59939bc7fbd2a8995bac66000 +%global gh_commit 4fc02f5dc9e07039e3baafe53a287547dd8675bd %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner llaville %global gh_project php-compat-info %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 4.5.1 +Version: 4.5.2 Release: 1%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -157,6 +157,9 @@ fi %changelog +* Wed Nov 25 2015 Remi Collet - 4.5.2-1 +- update to 4.5.2 + * Sun Oct 11 2015 Remi Collet - 4.5.1-1 - update to 4.5.1 diff --git a/sources b/sources index 22d0fdb..55c4e3a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e6df4b0f3ef47efd63622ffe184fe248 php-compat-info-4.5.1-e4c5d42.tar.gz +f0dd63c07ce9e18f0a6d812a317313dd php-compat-info-4.5.2-4fc02f5.tar.gz From 32e45d3eb32334ef6e10fb825e13be841aed1f96 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 29 Dec 2015 10:48:30 +0100 Subject: [PATCH 10/19] - update to 5.0.0 - raise dependency on bartlett/php-reflect ~4.0 - raise minimal php version to 5.4 - add dependency on bartlett/php-compatinfo-db (cherry picked from commit c42d0cce9f8f6b20e0e5830d731fdeafe974f378) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch | 120 ------------------ ...bartlett-PHP-CompatInfo-5.0.0-autoload.php | 1 + php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch | 85 +++++++++++++ php-bartlett-PHP-CompatInfo.spec | 40 +++--- sources | 2 +- 6 files changed, 113 insertions(+), 136 deletions(-) delete mode 100644 php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch rename php-bartlett-PHP-CompatInfo-autoload.php => php-bartlett-PHP-CompatInfo-5.0.0-autoload.php (91%) create mode 100644 php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch diff --git a/.gitignore b/.gitignore index 3eb034d..539d8a3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ clog /php-compat-info-4.5.0-31d781a.tar.gz /php-compat-info-4.5.1-e4c5d42.tar.gz /php-compat-info-4.5.2-4fc02f5.tar.gz +/php-compat-info-5.0.0-1b65ee3.tar.gz diff --git a/php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch b/php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch deleted file mode 100644 index 60280df..0000000 --- a/php-bartlett-PHP-CompatInfo-4.5.0-rpm.patch +++ /dev/null @@ -1,120 +0,0 @@ -diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist ---- ./bin/phpcompatinfo.json.dist.rpm 2015-07-11 10:04:30.000000000 +0200 -+++ ./bin/phpcompatinfo.json.dist 2015-07-13 09:06:15.108698079 +0200 -@@ -6,6 +6,19 @@ - } - ], - "plugins": [ -+ { -+ "name": "Cache", -+ "class": "Bartlett\\Reflect\\Plugin\\CachePlugin", -+ "options": { -+ "adapter": "DoctrineCacheAdapter", -+ "backend": { -+ "class": "Doctrine\\Common\\Cache\\FilesystemCache", -+ "args": [ -+ "%{HOME}/.cache/php-reflect" -+ ] -+ } -+ } -+ } - ], - "analysers" : [ - ], -diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo ---- ./bin/phpcompatinfo.rpm 2015-07-11 10:04:30.000000000 +0200 -+++ ./bin/phpcompatinfo 2015-07-13 09:06:15.114698099 +0200 -@@ -1,23 +1,12 @@ - #!/usr/bin/env php - setUseIncludePath(true); - - if (\Phar::running()) { - if ($home) { -@@ -35,18 +24,10 @@ if (PHP_SAPI !== 'cli') { - return; - } - --if (\Phar::running()) { -- try { -- Bartlett\CompatInfo\Environment::checkRequirements(); -- } catch (\RuntimeException $e) { -- die ($e->getMessage()); -- } --} -- - use Bartlett\Reflect\Environment; - use Bartlett\CompatInfo\Console\Application; - - Environment::setScanDir(); - --$application = new Application($appName, '4.5'); -+$application = new Application($appName, '@package_version@'); - $application->run(); -diff -up ./data/handleDB.php.rpm ./data/handleDB.php ---- ./data/handleDB.php.rpm 2015-07-11 10:04:30.000000000 +0200 -+++ ./data/handleDB.php 2015-07-13 09:06:15.108698079 +0200 -@@ -11,7 +11,8 @@ - * @since Release 4.0.0alpha3 - */ - --require_once dirname(__DIR__) . '/vendor/autoload.php'; -+require_once __DIR__ . '/../src/Bartlett/CompatInfo/autoload.php'; -+ - require_once __DIR__ . '/ReferenceCollection.php'; - - use Bartlett\CompatInfo\Reference\ExtensionFactory; -diff -up ./src/Bartlett/CompatInfo/Environment.php.rpm ./src/Bartlett/CompatInfo/Environment.php ---- ./src/Bartlett/CompatInfo/Environment.php.rpm 2015-07-13 09:10:10.271476463 +0200 -+++ ./src/Bartlett/CompatInfo/Environment.php 2015-07-13 09:10:52.422615982 +0200 -@@ -36,6 +36,12 @@ class Environment - */ - public static function initRefDb() - { -+ if (($database = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($database)) { -+ return new \PDO('sqlite:' . $database); -+ } else if (file_exists($database = '/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite')) { -+ return new \PDO('sqlite:' . $database); -+ } -+ - $database = 'compatinfo.sqlite'; - $tempDir = sys_get_temp_dir() . '/bartlett'; - -diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./tests/bootstrap.php.rpm 2015-07-11 10:04:30.000000000 +0200 -+++ ./tests/bootstrap.php 2015-07-13 09:06:15.108698079 +0200 -@@ -1,8 +1,11 @@ - addPrefix('Bartlett\\Tests\\CompatInfo', $baseDir . '/tests'); - -+putenv('BARTLETT_COMPATINFO_DB='.dirname(__DIR__).'/data/compatinfo.sqlite'); -+# Class not catched by autoloader - require __DIR__ . '/Reference/GenericTest.php'; diff --git a/php-bartlett-PHP-CompatInfo-autoload.php b/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php similarity index 91% rename from php-bartlett-PHP-CompatInfo-autoload.php rename to php-bartlett-PHP-CompatInfo-5.0.0-autoload.php index 62dd824..cf3b6a5 100644 --- a/php-bartlett-PHP-CompatInfo-autoload.php +++ b/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php @@ -20,3 +20,4 @@ $fedoraClassLoader->addPrefixes(array( // Dependencies require_once $vendorDir . '/Bartlett/Reflect/autoload.php'; +require_once $vendorDir . '/Bartlett/CompatInfoDb/autoload.php'; diff --git a/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch b/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch new file mode 100644 index 0000000..5a4a301 --- /dev/null +++ b/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch @@ -0,0 +1,85 @@ +diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist +--- ./bin/phpcompatinfo.json.dist.rpm 2015-12-05 10:11:45.000000000 +0100 ++++ ./bin/phpcompatinfo.json.dist 2015-12-07 09:08:39.785273332 +0100 +@@ -6,6 +6,19 @@ + } + ], + "plugins": [ ++ { ++ "name": "Cache", ++ "class": "Bartlett\\Reflect\\Plugin\\CachePlugin", ++ "options": { ++ "adapter": "DoctrineCacheAdapter", ++ "backend": { ++ "class": "Doctrine\\Common\\Cache\\FilesystemCache", ++ "args": [ ++ "%{HOME}/.cache/php-reflect" ++ ] ++ } ++ } ++ } + ], + "analysers" : [ + ], +diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo +--- ./bin/phpcompatinfo.rpm 2015-12-05 10:11:45.000000000 +0100 ++++ ./bin/phpcompatinfo 2015-12-07 09:14:17.072783363 +0100 +@@ -1,52 +1,21 @@ + #!/usr/bin/env php + setUseIncludePath(true); +- +-if (\Phar::running()) { +- if ($home) { +- // when optional resources are not embedded in phar distribution, +- // avoid PHP Warnings, and lookup first in global vendor dir (COMPOSER_HOME) if exists +- $classMapfiltered = $fallbackClassMap($loader->getClassMap(), 'Net_Growl'); +- $loader->addClassMap($classMapfiltered); +- +- // try to find PEAR Net_Growl classes package in folder $fallbackNetGrowlDir (see phar-stub.php) +- $loader->add(false, $fallbackNetGrowlDir); +- } ++require_once $vendorDir . '/Bartlett/CompatInfo/autoload.php'; ++if (!getenv("BARTLETTRC")) { ++ putenv("BARTLETTRC=" . strtolower($appName) . '.json'); + } + + if (PHP_SAPI !== 'cli') { + return; + } + +-if (\Phar::running()) { +- try { +- Bartlett\CompatInfoDb\Environment::checkRequirements(); +- } catch (\RuntimeException $e) { +- die ($e->getMessage()); +- } +-} +- + use Bartlett\Reflect\Environment; + use Bartlett\CompatInfo\Console\Application; + + Environment::setScanDir(); + +-$application = new Application($appName, '5.0'); ++$application = new Application($appName, '@package_version@'); + $application->run(); +diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 4127329..e8d7962 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,14 +7,14 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 4fc02f5dc9e07039e3baafe53a287547dd8675bd +%global gh_commit 1b65ee36ac475e2ce3a20fae612659ea933338c6 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner llaville %global gh_project php-compat-info %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 4.5.2 +Version: 5.0.0 Release: 1%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -27,41 +27,44 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit Source1: fedora-review-check # Autoloader for RPM - die composer ! -Source2: %{name}-autoload.php +Source2: %{name}-5.0.0-autoload.php # Autoload and sqlite database path -Patch0: %{name}-4.5.0-rpm.patch +Patch0: %{name}-5.0.0-rpm.patch BuildArch: noarch -BuildRequires: php(language) >= 5.3.2 +BuildRequires: php(language) >= 5.4.0 %if %{with_tests} # to run test suite BuildRequires: %{_bindir}/phpunit BuildRequires: php-pdo_sqlite -BuildRequires: php-composer(bartlett/php-reflect) >= 3.1 +BuildRequires: php-composer(bartlett/php-reflect) >= 4.0 +BuildRequires: php-composer(bartlett/php-compatinfo-db) >= 1.0 # For our patch / autoloader BuildRequires: php-composer(symfony/class-loader) -BuildRequires: php-bartlett-PHP-Reflect >= 3.1.1-3 %endif # From composer.json, "require" -# "php": ">=5.3.2", +# "php": ">=5.4.0", # "ext-libxml": "*", # "ext-pcre": "*", # "ext-spl": "*", # "ext-json": "*", # "ext-pdo_sqlite": "*", # "symfony/console": "~2.5", -# "bartlett/php-reflect": "~3.1", -Requires: php(language) >= 5.3.2 +# "bartlett/php-reflect": "~4.0", +# "bartlett/php-compatinfo-db": "~1.0" +Requires: php(language) >= 5.4.0 Requires: php-cli Requires: php-json Requires: php-libxml Requires: php-pcre Requires: php-pdo_sqlite Requires: php-spl -Requires: php-composer(bartlett/php-reflect) >= 3.1 -Requires: php-composer(bartlett/php-reflect) < 4 +Requires: php-composer(bartlett/php-reflect) >= 4.0 +Requires: php-composer(bartlett/php-reflect) < 5 +Requires: php-composer(bartlett/php-compatinfo-db) >= 1.0 +Requires: php-composer(bartlett/php-compatinfo-db) < 2 Requires: php-composer(symfony/console) >= 2.5 Requires: php-composer(symfony/console) < 3 # From composer.json, "require-dev": { @@ -114,8 +117,7 @@ sed -e 's/@package_version@/%{version}%{?prever}/' \ %build -: Generate the references database -%{_bindir}/php -d date.timezone=Europe/Paris data/handleDB.php db:init +# Nothing %install @@ -125,13 +127,15 @@ cp -pr src/Bartlett %{buildroot}%{_datadir}/php/Bartlett install -D -p -m 755 bin/phpcompatinfo %{buildroot}%{_bindir}/phpcompatinfo install -D -p -m 644 bin/phpcompatinfo.json.dist %{buildroot}%{_sysconfdir}/phpcompatinfo.json install -D -p -m 644 bin/phpcompatinfo.1 %{buildroot}%{_mandir}/man1/phpcompatinfo.1 -install -D -p -m 644 data/compatinfo.sqlite %{buildroot}%{_datadir}/%{name}/compatinfo.sqlite install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/fedora-review-check %if %{with_tests} %check +mkdir vendor +ln -s %{buildroot}%{_datadir}/php/Bartlett/CompatInfo/autoload.php vendor/ + %{_bindir}/phpunit \ --include-path %{buildroot}%{_datadir}/php \ -d memory_limit=1G @@ -157,6 +161,12 @@ fi %changelog +* Thu Dec 10 2015 Remi Collet - 5.0.0-1 +- update to 5.0.0 +- raise dependency on bartlett/php-reflect ~4.0 +- raise minimal php version to 5.4 +- add dependency on bartlett/php-compatinfo-db + * Wed Nov 25 2015 Remi Collet - 4.5.2-1 - update to 4.5.2 diff --git a/sources b/sources index 55c4e3a..61c1b2b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f0dd63c07ce9e18f0a6d812a317313dd php-compat-info-4.5.2-4fc02f5.tar.gz +c0c7dd953aac634e7456bdb4e1923aa4 php-compat-info-5.0.0-1b65ee3.tar.gz From 1f03d825ccc46659f5c3ea047c09e81d87bcf7fa Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 6 Jul 2016 17:02:08 +0200 Subject: [PATCH 11/19] - update to 5.0.1 - display DB version instead of build date (cherry picked from commit ca58628de33edda29639ce5beccb3be103cd3907) (cherry picked from commit abf404673465705e457d8306b6e7464a9fa4e7df) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch | 14 ++++++++++++++ php-bartlett-PHP-CompatInfo.spec | 21 +++++++++++++-------- sources | 2 +- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 539d8a3..dc8b6bb 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ clog /php-compat-info-4.5.1-e4c5d42.tar.gz /php-compat-info-4.5.2-4fc02f5.tar.gz /php-compat-info-5.0.0-1b65ee3.tar.gz +/php-compat-info-5.0.1-300a168.tar.gz diff --git a/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch b/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch index 5a4a301..ed5eed3 100644 --- a/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch +++ b/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch @@ -83,3 +83,17 @@ diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo +$application = new Application($appName, '@package_version@'); $application->run(); diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +--- ./src/Bartlett/CompatInfo/Console/Application.php.rpm 2016-03-09 18:38:00.713180108 +0100 ++++ ./src/Bartlett/CompatInfo/Console/Application.php 2016-03-09 18:36:09.737741387 +0100 +@@ -52,9 +52,10 @@ + $v = Environment::versionRefDb(); + + return sprintf( +- '%s version %s DB built %s', ++ '%s version %s DB version %s built %s', + $this->getName(), + $this->getVersion(), ++ $v['build.version'], + $v['build.string'] + ); + } diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index e8d7962..31827a9 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -1,21 +1,24 @@ # remirepo/fedora spec file for php-bartlett-PHP-CompatInfo # -# Copyright (c) 2011-2015 Remi Collet +# Copyright (c) 2011-2016 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 1b65ee36ac475e2ce3a20fae612659ea933338c6 +%global gh_commit 300a1689891aa97a6733ef496081ec394f53486b %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +#global gh_date 20151005 %global gh_owner llaville %global gh_project php-compat-info +#global prever RC2 %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 5.0.0 -Release: 1%{?dist} +Version: 5.0.1 +%global specrel 1 +Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run Group: Development/Libraries @@ -87,7 +90,6 @@ Requires: php-composer(symfony/console) < 3 # "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)" # Required by autoloader Requires: php-composer(symfony/class-loader) -Requires: php-bartlett-PHP-Reflect >= 3.1.1-3 Provides: phpcompatinfo = %{version} Provides: php-composer(bartlett/php-compatinfo) = %{version} @@ -104,6 +106,7 @@ Documentation: http://php5.laurent-laville.org/compatinfo/manual/current/en/ %prep %setup -q -n %{gh_project}-%{gh_commit} +#setup -q -n %{gh_project}-%{version} %patch0 -p1 -b .rpm cp %{SOURCE2} src/Bartlett/CompatInfo/autoload.php @@ -136,9 +139,7 @@ install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name} mkdir vendor ln -s %{buildroot}%{_datadir}/php/Bartlett/CompatInfo/autoload.php vendor/ -%{_bindir}/phpunit \ - --include-path %{buildroot}%{_datadir}/php \ - -d memory_limit=1G +%{_bindir}/phpunit --include-path %{buildroot}%{_datadir}/php --verbose %endif @@ -161,6 +162,10 @@ fi %changelog +* Wed Jul 6 2016 Remi Collet - 5.0.1-1 +- update to 5.0.1 +- display DB version instead of build date + * Thu Dec 10 2015 Remi Collet - 5.0.0-1 - update to 5.0.0 - raise dependency on bartlett/php-reflect ~4.0 diff --git a/sources b/sources index 61c1b2b..224774e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c0c7dd953aac634e7456bdb4e1923aa4 php-compat-info-5.0.0-1b65ee3.tar.gz +39dd2634b30358d36980638be65294c9 php-compat-info-5.0.1-300a168.tar.gz From 9c43afb170d9b385c99b30d6f582e191c02c22fc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 16 Dec 2016 08:01:12 +0100 Subject: [PATCH 12/19] update to 5.0.2 switch to fedora/autoloader (cherry picked from commit 4977ea87f577be055fda69fa281b94587a14e8ca) --- .gitignore | 1 + ...bartlett-PHP-CompatInfo-5.0.0-autoload.php | 20 +++++-------------- php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch | 16 +-------------- php-bartlett-PHP-CompatInfo.spec | 16 +++++++++------ sources | 2 +- 5 files changed, 18 insertions(+), 37 deletions(-) diff --git a/.gitignore b/.gitignore index dc8b6bb..e96d16d 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ clog /php-compat-info-4.5.2-4fc02f5.tar.gz /php-compat-info-5.0.0-1b65ee3.tar.gz /php-compat-info-5.0.1-300a168.tar.gz +/php-compat-info-5.0.2-49d6752.tar.gz diff --git a/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php b/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php index cf3b6a5..4297383 100644 --- a/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php +++ b/php-bartlett-PHP-CompatInfo-5.0.0-autoload.php @@ -3,21 +3,11 @@ * Autoloader for bartlett/php-compatinfo and its dependencies */ -$vendorDir = '/usr/share/php'; +require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; -// Use Symfony autoloader -if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) { - if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) { - require_once $vendorDir . '/Symfony/Component/ClassLoader/ClassLoader.php'; - } - - $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader(); - $fedoraClassLoader->register(); -} -$fedoraClassLoader->addPrefixes(array( - 'Bartlett\\CompatInfo' => dirname(dirname(__DIR__)), +\Fedora\Autoloader\Autoload::addPsr4('Bartlett\\CompatInfo\\', __DIR__); +\Fedora\Autoloader\Dependencies::required(array( + '/usr/share/php/Bartlett/Reflect/autoload.php', + '/usr/share/php/Bartlett/CompatInfoDb/autoload.php', )); -// Dependencies -require_once $vendorDir . '/Bartlett/Reflect/autoload.php'; -require_once $vendorDir . '/Bartlett/CompatInfoDb/autoload.php'; diff --git a/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch b/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch index ed5eed3..55a4c09 100644 --- a/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch +++ b/php-bartlett-PHP-CompatInfo-5.0.0-rpm.patch @@ -82,18 +82,4 @@ diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo -$application = new Application($appName, '5.0'); +$application = new Application($appName, '@package_version@'); $application->run(); -diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./src/Bartlett/CompatInfo/Console/Application.php.rpm 2016-03-09 18:38:00.713180108 +0100 -+++ ./src/Bartlett/CompatInfo/Console/Application.php 2016-03-09 18:36:09.737741387 +0100 -@@ -52,9 +52,10 @@ - $v = Environment::versionRefDb(); - - return sprintf( -- '%s version %s DB built %s', -+ '%s version %s DB version %s built %s', - $this->getName(), - $this->getVersion(), -+ $v['build.version'], - $v['build.string'] - ); - } + diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 31827a9..69b239b 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 300a1689891aa97a6733ef496081ec394f53486b +%global gh_commit 49d67523234b35697a0b5b6b2dd8e9b6a23f44cb %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151005 %global gh_owner llaville @@ -16,7 +16,7 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 5.0.1 +Version: 5.0.2 %global specrel 1 Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -42,9 +42,9 @@ BuildRequires: php(language) >= 5.4.0 BuildRequires: %{_bindir}/phpunit BuildRequires: php-pdo_sqlite BuildRequires: php-composer(bartlett/php-reflect) >= 4.0 -BuildRequires: php-composer(bartlett/php-compatinfo-db) >= 1.0 +BuildRequires: php-composer(bartlett/php-compatinfo-db) >= 1.15 # For our patch / autoloader -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require" @@ -66,7 +66,7 @@ Requires: php-pdo_sqlite Requires: php-spl Requires: php-composer(bartlett/php-reflect) >= 4.0 Requires: php-composer(bartlett/php-reflect) < 5 -Requires: php-composer(bartlett/php-compatinfo-db) >= 1.0 +Requires: php-composer(bartlett/php-compatinfo-db) >= 1.15 Requires: php-composer(bartlett/php-compatinfo-db) < 2 Requires: php-composer(symfony/console) >= 2.5 Requires: php-composer(symfony/console) < 3 @@ -89,7 +89,7 @@ Requires: php-composer(symfony/console) < 3 # "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2" # "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)" # Required by autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) Provides: phpcompatinfo = %{version} Provides: php-composer(bartlett/php-compatinfo) = %{version} @@ -162,6 +162,10 @@ fi %changelog +* Fri Dec 16 2016 Remi Collet - 5.0.2-1 +- update to 5.0.2 +- switch to fedora/autoloader + * Wed Jul 6 2016 Remi Collet - 5.0.1-1 - update to 5.0.1 - display DB version instead of build date diff --git a/sources b/sources index 224774e..1158ed2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -39dd2634b30358d36980638be65294c9 php-compat-info-5.0.1-300a168.tar.gz +SHA512 (php-compat-info-5.0.2-49d6752.tar.gz) = 900ed00366c4253d032a915ee95972aece04f11b6bfe323a75dc0183c308c89123296eec352d1424c4d65459dca2b95690f27db28de362c9bb0c22951715b2dc From 9f064b1f1ff9c2ae13d59f1f8e50450fb3b998c6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 11 Jan 2017 12:11:24 +0100 Subject: [PATCH 13/19] v5.0.3 (cherry picked from commit 7351443ec05d733785180447967417d464722ded) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e96d16d..5f46c20 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ clog /php-compat-info-5.0.0-1b65ee3.tar.gz /php-compat-info-5.0.1-300a168.tar.gz /php-compat-info-5.0.2-49d6752.tar.gz +/php-compat-info-5.0.3-8e875d5.tar.gz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 69b239b..49c5145 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -1,13 +1,13 @@ # remirepo/fedora spec file for php-bartlett-PHP-CompatInfo # -# Copyright (c) 2011-2016 Remi Collet +# Copyright (c) 2011-2017 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 49d67523234b35697a0b5b6b2dd8e9b6a23f44cb +%global gh_commit 8e875d5d8193045c33260e0af3840963c577089e %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151005 %global gh_owner llaville @@ -16,7 +16,7 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 5.0.2 +Version: 5.0.3 %global specrel 1 Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -162,6 +162,9 @@ fi %changelog +* Wed Jan 11 2017 Remi Collet - 5.0.3-1 +- update to 5.0.3 + * Fri Dec 16 2016 Remi Collet - 5.0.2-1 - update to 5.0.2 - switch to fedora/autoloader diff --git a/sources b/sources index 1158ed2..849063c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-compat-info-5.0.2-49d6752.tar.gz) = 900ed00366c4253d032a915ee95972aece04f11b6bfe323a75dc0183c308c89123296eec352d1424c4d65459dca2b95690f27db28de362c9bb0c22951715b2dc +SHA512 (php-compat-info-5.0.3-8e875d5.tar.gz) = 4c44e3a0952f9e57da710b1733227e7669d1b47a9a33458790114ec5171d19f133f6351a14ffff71340a3b2818d4077724599d1457ec4cd922b9d899979997a0 From 59d3487e615aafdc8e607f9a1d2e9c01307f6a77 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 17 Jan 2017 07:35:16 +0100 Subject: [PATCH 14/19] v5.0.4 (cherry picked from commit 35a7478a92abe87aa43531f193fdf61d463775ef) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5f46c20..dfcf2a0 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ clog /php-compat-info-5.0.1-300a168.tar.gz /php-compat-info-5.0.2-49d6752.tar.gz /php-compat-info-5.0.3-8e875d5.tar.gz +/php-compat-info-5.0.4-8a49d05.tar.gz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 49c5145..c046cf5 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 8e875d5d8193045c33260e0af3840963c577089e +%global gh_commit 8a49d050f417cf39325bc9170f101ed2a2fb9f2a %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151005 %global gh_owner llaville @@ -16,7 +16,7 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 5.0.3 +Version: 5.0.4 %global specrel 1 Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -162,6 +162,9 @@ fi %changelog +* Tue Jan 17 2017 Remi Collet - 5.0.4-1 +- update to 5.0.4 + * Wed Jan 11 2017 Remi Collet - 5.0.3-1 - update to 5.0.3 diff --git a/sources b/sources index 849063c..8dc5704 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-compat-info-5.0.3-8e875d5.tar.gz) = 4c44e3a0952f9e57da710b1733227e7669d1b47a9a33458790114ec5171d19f133f6351a14ffff71340a3b2818d4077724599d1457ec4cd922b9d899979997a0 +SHA512 (php-compat-info-5.0.4-8a49d05.tar.gz) = 7478daff7a3708a43f04dcc63f74bc947f52c4e485a847ea87deb9a93f984938d7b82ad28a96ba6349dbc92054e8b946854400241413ebb1d7f8dd287afaec4b From 0718351991e4eb400616594ff2a06eb6dd0cc5cf Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 17 Mar 2017 07:19:22 +0100 Subject: [PATCH 15/19] v5.0.5' (cherry picked from commit 3923cad3accdec0c57e63305bcedf97a522f5847) (cherry picked from commit 554bb0428efd192ef0c4bfa0a3ca13e92a11154b) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 18 ++++++++++++++---- sources | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index dfcf2a0..2226020 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ clog /php-compat-info-5.0.2-49d6752.tar.gz /php-compat-info-5.0.3-8e875d5.tar.gz /php-compat-info-5.0.4-8a49d05.tar.gz +/php-compat-info-5.0.5-cbd0389.tar.gz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index c046cf5..5e9fef9 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 8a49d050f417cf39325bc9170f101ed2a2fb9f2a +%global gh_commit cbd03899c8a48eb2f9274035c0770d83821905ab %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151005 %global gh_owner llaville @@ -16,9 +16,9 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 5.0.4 +Version: 5.0.5 %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: Find out version and the extensions required for a piece of code to run Group: Development/Libraries @@ -139,7 +139,14 @@ install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name} mkdir vendor ln -s %{buildroot}%{_datadir}/php/Bartlett/CompatInfo/autoload.php vendor/ -%{_bindir}/phpunit --include-path %{buildroot}%{_datadir}/php --verbose + +ret=0 +for cmd in php php56 php70 php71; do + if which $cmd; then + $cmd %{_bindir}/phpunit --include-path %{buildroot}%{_datadir}/php --verbose || ret=1 + fi +done +exit $ret %endif @@ -162,6 +169,9 @@ fi %changelog +* Fri Mar 17 2017 Remi Collet - 5.0.5-1 +- Update to 5.0.5 + * Tue Jan 17 2017 Remi Collet - 5.0.4-1 - update to 5.0.4 diff --git a/sources b/sources index 8dc5704..1d5658e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-compat-info-5.0.4-8a49d05.tar.gz) = 7478daff7a3708a43f04dcc63f74bc947f52c4e485a847ea87deb9a93f984938d7b82ad28a96ba6349dbc92054e8b946854400241413ebb1d7f8dd287afaec4b +SHA512 (php-compat-info-5.0.5-cbd0389.tar.gz) = 723cf06ebd8b952ddc205b27da4ff7cfb426edf1ee588fd34a07b291c132094a31264deb50b4a23db7de1f555419ba10ed0d1751e2f48f82d36e841d544fecd1 From 20b03a7bcb2e63622f388479fef9904fd229cc5c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 27 Mar 2017 14:33:34 +0200 Subject: [PATCH 16/19] v5.0.6 (cherry picked from commit abcab05db27441d647e86f3e73dccc6931508f7b) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2226020..cd67449 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ clog /php-compat-info-5.0.3-8e875d5.tar.gz /php-compat-info-5.0.4-8a49d05.tar.gz /php-compat-info-5.0.5-cbd0389.tar.gz +/php-compat-info-5.0.6-3878275.tar.gz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 5e9fef9..03ae86d 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit cbd03899c8a48eb2f9274035c0770d83821905ab +%global gh_commit 387827551032eda716e7a35f80a93a331fc724cc %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151005 %global gh_owner llaville @@ -16,7 +16,7 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 5.0.5 +Version: 5.0.6 %global specrel 1 Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -169,6 +169,9 @@ fi %changelog +* Mon Mar 27 2017 Remi Collet - 5.0.6-1 +- Update to 5.0.6 + * Fri Mar 17 2017 Remi Collet - 5.0.5-1 - Update to 5.0.5 diff --git a/sources b/sources index 1d5658e..db188ee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-compat-info-5.0.5-cbd0389.tar.gz) = 723cf06ebd8b952ddc205b27da4ff7cfb426edf1ee588fd34a07b291c132094a31264deb50b4a23db7de1f555419ba10ed0d1751e2f48f82d36e841d544fecd1 +SHA512 (php-compat-info-5.0.6-3878275.tar.gz) = 95dc0095c526274971e8e9951cb7bd0021776d82c9a6f4720c7e3ded8846d1dcfcc45c0b5ddc332fe4644f1af926fb8bce4367944ee435aa170a1498113c68a1 From 1a96271fc2281b8232c8d7be1e08dd36bc4760bd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 10 Jun 2017 11:01:18 +0200 Subject: [PATCH 17/19] v5.0.7 (cherry picked from commit 525e3a54bef8144b22a3190f08bc44a21b0363a4) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index cd67449..881e615 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ clog /php-compat-info-5.0.4-8a49d05.tar.gz /php-compat-info-5.0.5-cbd0389.tar.gz /php-compat-info-5.0.6-3878275.tar.gz +/php-compat-info-5.0.7-1a615a1.tar.gz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 03ae86d..55fe63e 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 387827551032eda716e7a35f80a93a331fc724cc +%global gh_commit 1a615a1da6ee539c6ce7444b85f764fe22e4194c %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151005 %global gh_owner llaville @@ -16,7 +16,7 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 5.0.6 +Version: 5.0.7 %global specrel 1 Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -141,7 +141,7 @@ ln -s %{buildroot}%{_datadir}/php/Bartlett/CompatInfo/autoload.php vendor/ ret=0 -for cmd in php php56 php70 php71; do +for cmd in php php56 php70 php71 php72; do if which $cmd; then $cmd %{_bindir}/phpunit --include-path %{buildroot}%{_datadir}/php --verbose || ret=1 fi @@ -169,6 +169,9 @@ fi %changelog +* Sat Jun 10 2017 Remi Collet - 5.0.7-1 +- Update to 5.0.7 + * Mon Mar 27 2017 Remi Collet - 5.0.6-1 - Update to 5.0.6 diff --git a/sources b/sources index db188ee..54450a2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-compat-info-5.0.6-3878275.tar.gz) = 95dc0095c526274971e8e9951cb7bd0021776d82c9a6f4720c7e3ded8846d1dcfcc45c0b5ddc332fe4644f1af926fb8bce4367944ee435aa170a1498113c68a1 +SHA512 (php-compat-info-5.0.7-1a615a1.tar.gz) = 6a9e992a51f829e6901899e3dda396bd48073b9ee93b149390329a12f44521714c5ad5486081abe10068c14b70cb9c3dc4e79ea3991f9c832ad8ea6523daf516 From 66c65bde75f825eee77fea85b535eb8d1eb99777 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 7 Aug 2017 09:04:34 +0200 Subject: [PATCH 18/19] v5.0.8 (cherry picked from commit 1222269665a66da401cacfb137467167301725a5) (cherry picked from commit 487e8ab4cdbc216d2cb45b091e916f398a9aceeb) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 881e615..931ddaf 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ clog /php-compat-info-5.0.5-cbd0389.tar.gz /php-compat-info-5.0.6-3878275.tar.gz /php-compat-info-5.0.7-1a615a1.tar.gz +/php-compat-info-5.0.8-18913e8.tar.gz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 55fe63e..6644e30 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 1a615a1da6ee539c6ce7444b85f764fe22e4194c +%global gh_commit 18913e8807d2ab02dea89b60e006ec395a131f0c %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151005 %global gh_owner llaville @@ -16,7 +16,7 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 5.0.7 +Version: 5.0.8 %global specrel 1 Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -56,7 +56,7 @@ BuildRequires: php-composer(fedora/autoloader) # "ext-pdo_sqlite": "*", # "symfony/console": "~2.5", # "bartlett/php-reflect": "~4.0", -# "bartlett/php-compatinfo-db": "~1.0" +# "bartlett/php-compatinfo-db": "~1.23" Requires: php(language) >= 5.4.0 Requires: php-cli Requires: php-json @@ -66,7 +66,7 @@ Requires: php-pdo_sqlite Requires: php-spl Requires: php-composer(bartlett/php-reflect) >= 4.0 Requires: php-composer(bartlett/php-reflect) < 5 -Requires: php-composer(bartlett/php-compatinfo-db) >= 1.15 +Requires: php-composer(bartlett/php-compatinfo-db) >= 1.23 Requires: php-composer(bartlett/php-compatinfo-db) < 2 Requires: php-composer(symfony/console) >= 2.5 Requires: php-composer(symfony/console) < 3 @@ -169,6 +169,9 @@ fi %changelog +* Mon Aug 7 2017 Remi Collet - 5.0.8-1 +- Update to 5.0.8 + * Sat Jun 10 2017 Remi Collet - 5.0.7-1 - Update to 5.0.7 diff --git a/sources b/sources index 54450a2..2a5c79b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-compat-info-5.0.7-1a615a1.tar.gz) = 6a9e992a51f829e6901899e3dda396bd48073b9ee93b149390329a12f44521714c5ad5486081abe10068c14b70cb9c3dc4e79ea3991f9c832ad8ea6523daf516 +SHA512 (php-compat-info-5.0.8-18913e8.tar.gz) = e8dec47646db29a222562c4ce9a8bde8cc1a114de7302ac511f1b1a98c74d7d353368b135f71bb9b86bddaf24e810dfc072e6103cf3cc5a68bbd06a0c13820d6 From d202705f630d1035ebcef123a0a75d92b8e755e7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 6 Dec 2017 15:38:48 +0100 Subject: [PATCH 19/19] v5.0.9 (cherry picked from commit a4524a321486d1acd4cc07a5f6bbf8bcae3fb279) --- .gitignore | 1 + php-bartlett-PHP-CompatInfo.spec | 25 ++++++++++++++----------- sources | 2 +- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 931ddaf..5352c1e 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ clog /php-compat-info-5.0.6-3878275.tar.gz /php-compat-info-5.0.7-1a615a1.tar.gz /php-compat-info-5.0.8-18913e8.tar.gz +/php-compat-info-5.0.9-23db55a.tar.gz diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 6644e30..4839a0d 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 18913e8807d2ab02dea89b60e006ec395a131f0c +%global gh_commit 23db55a1c8f8a078e691bc66524fcb73eabbcb2c %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151005 %global gh_owner llaville @@ -16,7 +16,7 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-bartlett-PHP-CompatInfo -Version: 5.0.8 +Version: 5.0.9 %global specrel 1 Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -55,8 +55,8 @@ BuildRequires: php-composer(fedora/autoloader) # "ext-json": "*", # "ext-pdo_sqlite": "*", # "symfony/console": "~2.5", -# "bartlett/php-reflect": "~4.0", -# "bartlett/php-compatinfo-db": "~1.23" +# "bartlett/php-reflect": "^4.0", +# "bartlett/php-compatinfo-db": "^1.23" Requires: php(language) >= 5.4.0 Requires: php-cli Requires: php-json @@ -71,13 +71,13 @@ Requires: php-composer(bartlett/php-compatinfo-db) < 2 Requires: php-composer(symfony/console) >= 2.5 Requires: php-composer(symfony/console) < 3 # From composer.json, "require-dev": { -# "doctrine/cache": "~1.3", -# "psr/log": "~1.0", -# "monolog/monolog": "~1.10", -# "bartlett/monolog-callbackfilterhandler": "~1.0", -# "bartlett/monolog-growlhandler": "~1.0", -# "bartlett/phpunit-loggertestlistener": "~1.5", -# "bartlett/umlwriter": "~1.0" +# "doctrine/cache": "^1.3", +# "psr/log": "^1.0", +# "monolog/monolog": "^1.10", +# "bartlett/monolog-callbackfilterhandler": "^1.0", +# "bartlett/monolog-growlhandler": "^1.0", +# "bartlett/phpunit-loggertestlistener": "^1.5", +# "bartlett/umlwriter": "^1.0" # From composer.json, "suggest" # "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2", # "psr/log": "Allow logging events with the LogPlugin", @@ -169,6 +169,9 @@ fi %changelog +* Wed Dec 6 2017 Remi Collet - 5.0.9-1 +- Update to 5.0.9 + * Mon Aug 7 2017 Remi Collet - 5.0.8-1 - Update to 5.0.8 diff --git a/sources b/sources index 2a5c79b..28ba720 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-compat-info-5.0.8-18913e8.tar.gz) = e8dec47646db29a222562c4ce9a8bde8cc1a114de7302ac511f1b1a98c74d7d353368b135f71bb9b86bddaf24e810dfc072e6103cf3cc5a68bbd06a0c13820d6 +SHA512 (php-compat-info-5.0.9-23db55a.tar.gz) = 143acef028404a49c479ca1bfd3157ceecfdb29c019539bc0183aa361cb861c8220287fd79b832550cfc6a4f0f3bda2a228ba23d03a01baf6603f3c76fe8c6b5