diff --git a/.gitignore b/.gitignore index 890f63b..4d8593e 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,8 @@ clog /php-bartlett-PHP-CompatInfo-5.3.0-5b58fb5.tar.gz /php-bartlett-PHP-CompatInfo-5.4.1-3e79a1a.tar.gz /php-bartlett-PHP-CompatInfo-5.4.2-456308c.tar.gz +/php-bartlett-PHP-CompatInfo-5.4.3-e4f9846.tar.gz +/php-bartlett-PHP-CompatInfo-5.4.4-85f8a27.tar.gz +/php-bartlett-PHP-CompatInfo-5.5.1-3829490.tar.gz +/php-bartlett-PHP-CompatInfo-5.5.2-547803e.tar.gz +/php-bartlett-PHP-CompatInfo-5.5.3-7353738.tar.gz diff --git a/php-bartlett-PHP-CompatInfo-5.4.2-rpm.patch b/php-bartlett-PHP-CompatInfo-5.4.2-rpm.patch deleted file mode 100644 index d77f69b..0000000 --- a/php-bartlett-PHP-CompatInfo-5.4.2-rpm.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo ---- ./bin/phpcompatinfo.rpm 2020-11-23 09:20:15.949928560 +0100 -+++ ./bin/phpcompatinfo 2020-11-23 09:23:44.418075703 +0100 -@@ -8,39 +8,13 @@ if (PHP_SAPI !== 'cli') { - - gc_disable(); // performance boost - --if (\Phar::running()) { -- $possibleAutoloadPaths = [ -- 'phar://phpcompatinfo.phar/vendor/autoload.php' -- ]; --} else { -- $possibleAutoloadPaths = [ -- // local dev repository -- __DIR__ . '/../vendor/autoload.php', -- // dependency -- __DIR__ . '/../../../../vendor/autoload.php', -- ]; --} -- --$isAutoloadFound = false; --foreach ($possibleAutoloadPaths as $possibleAutoloadPath) { -- if (file_exists($possibleAutoloadPath)) { -- require_once $possibleAutoloadPath; -- $isAutoloadFound = true; -- break; -- } --} -- --if ($isAutoloadFound === false) { -- throw new RuntimeException(sprintf( -- 'Unable to find "vendor/autoload.php" in "%s" paths.', -- implode('", "', $possibleAutoloadPaths) -- )); --} -+$vendorDir = '/usr/share/php/Bartlett/CompatInfo'; -+require_once $vendorDir . '/autoload.php'; - - use Bartlett\CompatInfo\Console\ApplicationInterface; - - /** @var \Symfony\Component\DependencyInjection\ContainerBuilder $container */ --$container = require dirname(__DIR__) . '/config/container.php'; -+$container = require $vendorDir . '/config/container.php'; - - $app = $container->get(ApplicationInterface::class); - $app->setContainer($container); -diff -up ./src/Bartlett/CompatInfo/Console/Application.php.rpm ./src/Bartlett/CompatInfo/Console/Application.php ---- ./src/Bartlett/CompatInfo/Console/Application.php.rpm 2020-11-20 13:00:53.000000000 +0100 -+++ ./src/Bartlett/CompatInfo/Console/Application.php 2020-11-23 09:21:14.242121292 +0100 -@@ -30,8 +30,6 @@ use Symfony\Component\DependencyInjectio - use Symfony\Component\EventDispatcher\EventDispatcher; - use Symfony\Component\EventDispatcher\EventDispatcherInterface ; - --use PackageVersions\Versions; -- - use Phar; - use function substr_count; - -@@ -78,14 +76,6 @@ class Application extends BaseApplicatio - $version = self::VERSION; - } elseif (substr_count($version, '.') === 2) { - // release is in X.Y.Z format -- } else { -- // composer or git strategy -- $version = Versions::getVersion('bartlett/php-compatinfo'); -- list($ver, ) = explode('@', $version); -- -- if (strpos($ver, 'dev') === false) { -- $version = $ver; -- } - } - parent::__construct(self::NAME, $version); - diff --git a/php-bartlett-PHP-CompatInfo-5.5.2-rpm.patch b/php-bartlett-PHP-CompatInfo-5.5.2-rpm.patch new file mode 100644 index 0000000..0ada6f5 --- /dev/null +++ b/php-bartlett-PHP-CompatInfo-5.5.2-rpm.patch @@ -0,0 +1,93 @@ +diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo +--- ./bin/phpcompatinfo.rpm 2021-04-12 09:54:09.000000000 +0200 ++++ ./bin/phpcompatinfo 2021-04-13 10:41:27.780928446 +0200 +@@ -8,12 +8,12 @@ if (PHP_SAPI !== 'cli') { + + gc_disable(); // performance boost + +-require_once dirname(__DIR__) . '/config/bootstrap.php'; ++require_once '/usr/share/php/Bartlett/CompatInfo/config/bootstrap.php'; + + use Bartlett\CompatInfo\Console\ApplicationInterface; + + /** @var \Symfony\Component\DependencyInjection\ContainerBuilder $container */ +-$container = require dirname(__DIR__) . '/config/container.php'; ++$container = require '/usr/share/php/Bartlett/CompatInfo/config/container.php'; + + $app = $container->get(ApplicationInterface::class); + $app->setContainer($container); +diff -up ./config/bootstrap.php.rpm ./config/bootstrap.php +--- ./config/bootstrap.php.rpm 2021-04-12 09:54:09.000000000 +0200 ++++ ./config/bootstrap.php 2021-04-13 10:41:27.780928446 +0200 +@@ -6,6 +6,8 @@ if (\Phar::running()) { + ]; + } else { + $possibleAutoloadPaths = [ ++ // RPM ++ __DIR__ . '/../autoload.php', + // local dev repository + __DIR__ . '/../vendor/autoload.php', + // dependency +diff -up ./config/set/default.php.rpm ./config/set/default.php +--- ./config/set/default.php.rpm 2021-04-12 09:54:09.000000000 +0200 ++++ ./config/set/default.php 2021-04-13 10:41:27.780928446 +0200 +@@ -33,7 +33,7 @@ use function Symfony\Component\Dependenc + */ + return static function (ContainerConfigurator $containerConfigurator): void + { +- $containerConfigurator->import(dirname(__DIR__,2) . '/vendor/bartlett/php-compatinfo-db/config/set/default.php'); ++ $containerConfigurator->import('/usr/share/php/Bartlett/CompatInfoDb/config/set/default.php'); + $containerConfigurator->import(__DIR__ . '/common.php'); + + $parameters = $containerConfigurator->parameters(); +diff -up ./src/Bartlett/CompatInfo/Console/Application.php.rpm ./src/Bartlett/CompatInfo/Console/Application.php +--- ./src/Bartlett/CompatInfo/Console/Application.php.rpm 2021-04-12 09:54:09.000000000 +0200 ++++ ./src/Bartlett/CompatInfo/Console/Application.php 2021-04-13 10:41:27.780928446 +0200 +@@ -30,8 +30,6 @@ use Symfony\Component\DependencyInjectio + use Symfony\Component\EventDispatcher\EventDispatcher; + use Symfony\Component\EventDispatcher\EventDispatcherInterface ; + +-use PackageVersions\Versions; +- + use Phar; + use function substr_count; + +@@ -78,14 +76,6 @@ class Application extends BaseApplicatio + $version = self::VERSION; + } elseif (substr_count($version, '.') === 2) { + // release is in X.Y.Z format +- } else { +- // composer or git strategy +- $version = Versions::getVersion('bartlett/php-compatinfo'); +- list($ver, ) = explode('@', $version); +- +- if (strpos($ver, 'dev') === false) { +- $version = $ver; +- } + } + parent::__construct(self::NAME, $version); + +diff -up ./tests/Reference/ParameterTest.php.rpm ./tests/Reference/ParameterTest.php +--- ./tests/Reference/ParameterTest.php.rpm 2021-04-12 09:54:09.000000000 +0200 ++++ ./tests/Reference/ParameterTest.php 2021-04-13 10:41:27.780928446 +0200 +@@ -42,7 +42,7 @@ final class ParameterTest extends SniffT + */ + public function functionProvider() + { +- $container = require __DIR__ . '/../../config/container.php'; ++ $container = require '@BUILDPATH@/config/container.php'; + $repository = $container->get(FunctionRepository::class); + $functions = []; + foreach ($repository->getAll() as $function) { +diff -up ./tests/TestCase.php.rpm ./tests/TestCase.php +--- ./tests/TestCase.php.rpm 2021-04-13 10:41:27.780928446 +0200 ++++ ./tests/TestCase.php 2021-04-13 10:43:04.778512016 +0200 +@@ -46,7 +46,7 @@ abstract class TestCase extends \PHPUnit + */ + protected function executeAnalysis(string $dataSource): array + { +- $container = require __DIR__ . '/../config/container.php'; ++ $container = require '@BUILDPATH@/config/container.php'; + $references = $container->get(ReferenceCollectionInterface::class); + $sniffs = $container->get(SniffCollection::class); + diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 5862466..2a76dfa 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-bartlett-PHP-CompatInfo # -# Copyright (c) 2011-2020 Remi Collet +# Copyright (c) 2011-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -11,7 +11,7 @@ %undefine __brp_mangle_shebangs %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit 456308cc09f2c78903195bbbf09886314950a083 +%global gh_commit 7353738b51e38b0763e2bf154d05c55ad2fdc105 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151005 %global gh_owner llaville @@ -19,16 +19,12 @@ #global prever RC2 %bcond_without tests -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -%global sym_prefix php-symfony3 -%else -%global sym_prefix php-symfony -%endif +%global upstream_version 5.5.3 +#global upstream_prever RC1 Name: php-bartlett-PHP-CompatInfo -Version: 5.4.2 -%global specrel 1 -Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} +Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} +Release: 1%{?dist} Summary: Find out version and the extensions required for a piece of code to run License: BSD @@ -38,17 +34,17 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Script for fedora-review Source1: fedora-review-check -# Autoload and sqlite database path +# Autoload and config path # avoid jean85/pretty-package-versions -Patch0: %{name}-5.4.2-rpm.patch +Patch0: %{name}-5.5.2-rpm.patch BuildArch: noarch -BuildRequires: php(language) >= 7.1.3 +BuildRequires: php(language) >= 7.2 %if %{with tests} # to run test suite BuildRequires: php-pdo_sqlite BuildRequires: (php-composer(bartlett/php-reflect) >= 4.4 with php-composer(bartlett/php-reflect) < 5) -BuildRequires: (php-composer(bartlett/php-compatinfo-db) >= 2.0 with php-composer(bartlett/php-compatinfo-db) < 3) +BuildRequires: (php-composer(bartlett/php-compatinfo-db) >= 3.4 with php-composer(bartlett/php-compatinfo-db) < 4) BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) BuildRequires: (php-composer(ramsey/uuid) >= 4.0 with php-composer(ramsey/uuid) < 5) BuildRequires: (php-composer(symfony/config) >= 4.4 with php-composer(symfony/config) < 6) @@ -59,14 +55,14 @@ BuildRequires: (php-composer(symfony/finder) >= 4.4 with php-comp BuildRequires: (php-composer(symfony/serializer) >= 4.4 with php-composer(symfony/serializer) < 6) BuildRequires: (php-composer(symfony/stopwatch) >= 4.4 with php-composer(symfony/stopwatch) < 6) BuildRequires: (php-composer(doctrine/collections) >= 1.4 with php-composer(doctrine/collections) < 2) -%global phpunit %{_bindir}/phpunit8 +%global phpunit %{_bindir}/phpunit9 BuildRequires: %{phpunit} # For our patch / autoloader BuildRequires: php-fedora-autoloader-devel %endif # From composer.json, "require" -# "php": "^7.1.3|^8.0", +# "php": "^7.2|^8.0", # "ext-libxml": "*", # "ext-pcre": "*", # "ext-spl": "*", @@ -74,7 +70,7 @@ BuildRequires: php-fedora-autoloader-devel # "ext-pdo": "*", # "ext-pdo_sqlite": "*", # "bartlett/php-reflect": "^4.4", -# "bartlett/php-compatinfo-db": "^2.0", +# "bartlett/php-compatinfo-db": "^3.4", # "doctrine/collections": "^1.4", # "composer/package-versions-deprecated": "^1.8", # "psr/log": "^1.0", @@ -86,7 +82,7 @@ BuildRequires: php-fedora-autoloader-devel # "symfony/dependency-injection": "^4.4|^5.0", # "symfony/serializer": "^4.4|^5.0", # "symfony/stopwatch": "^4.4|^5.0" -Requires: php(language) >= 7.1.3 +Requires: php(language) >= 7.2 Requires: php-cli Requires: php-json Requires: php-libxml @@ -95,7 +91,7 @@ Requires: php-pdo Requires: php-pdo_sqlite Requires: php-spl Requires: (php-composer(bartlett/php-reflect) >= 4.4 with php-composer(bartlett/php-reflect) < 5) -Requires: (php-composer(bartlett/php-compatinfo-db) >= 2.0 with php-composer(bartlett/php-compatinfo-db) < 3) +Requires: (php-composer(bartlett/php-compatinfo-db) >= 3.4 with php-composer(bartlett/php-compatinfo-db) < 4) Requires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) Requires: (php-composer(ramsey/uuid) >= 4.0 with php-composer(ramsey/uuid) < 5) Requires: (php-composer(symfony/config) >= 4.4 with php-composer(symfony/config) < 6) @@ -105,7 +101,7 @@ Requires: (php-composer(symfony/event-dispatcher) >= 4.4 with php-comp Requires: (php-composer(symfony/finder) >= 4.4 with php-composer(symfony/finder) < 6) Requires: (php-composer(symfony/serializer) >= 4.4 with php-composer(symfony/serializer) < 6) Requires: (php-composer(symfony/stopwatch) >= 4.4 with php-composer(symfony/stopwatch) < 6) -Requires: (php-composer(doctrine/collections) >= 1.4 with php-composer(doctrine/collections) < 2) +Requires: (php-composer(doctrine/collections) >= 1.4 with php-composer(doctrine/collections) < 2) # Required by autoloader Requires: php-composer(fedora/autoloader) @@ -170,11 +166,10 @@ find src -name \*rpm -delete -print # fix path in configuration sed -e 's:src/Bartlett/CompatInfo/::' -i config/set/*php mv config src/Bartlett/CompatInfo/config -# for tests -ln -s src/Bartlett/CompatInfo/config config # Check package version FILE=src/Bartlett/CompatInfo/Console/Application.php +sed -e 's/5.5.1/%{version}/' -i $FILE grep " VERSION" $FILE grep %{version} $FILE @@ -195,19 +190,21 @@ install -D -p -m 755 %{SOURCE1} %{buildroot}%{_datadir}/%{name} %if %{with tests} %check -mkdir vendor -cat << 'EOF' | tee vendor/autoload.php +mkdir config +cat << 'EOF' | tee config/bootstrap.php - 5.5.3-1 +- update to 5.5.3 + +* Tue Apr 13 2021 Remi Collet - 5.5.2-1 +- update to 5.5.2 + +* Mon Mar 15 2021 Remi Collet - 5.5.1-1 +- update to 5.5.1 +- raise dependency on PHP 7.2 +- raise dependency on bartlett/php-compatinfo-db 3.4 + +* Mon Feb 15 2021 Remi Collet - 5.4.3-1 +- update to 5.4.3 + * Mon Nov 23 2020 Remi Collet - 5.4.2-1 - update to 5.4.2 diff --git a/sources b/sources index 5ad4082..054f865 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-bartlett-PHP-CompatInfo-5.4.2-456308c.tar.gz) = d44aa858c4a7d5ac8581056ea772f745e7a3c395c575f2d77a4130412935645cb06dd7135e196ceec1ca249bcd0c546e55f3126a75d83160ee2cb2cf094303a1 +SHA512 (php-bartlett-PHP-CompatInfo-5.5.3-7353738.tar.gz) = ae0d12353505763a55594d98a9856a277f4badd5f654a031c156f3da45f81de7b05920d076f7d3ebcd396050514d57a8ed3655ebe79a54558af81e6c28a91973