summaryrefslogtreecommitdiffstats
path: root/php-bartlett-PHP-CompatInfo.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-bartlett-PHP-CompatInfo.spec')
-rw-r--r--php-bartlett-PHP-CompatInfo.spec52
1 files changed, 29 insertions, 23 deletions
diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec
index 362aa93..2dbe617 100644
--- a/php-bartlett-PHP-CompatInfo.spec
+++ b/php-bartlett-PHP-CompatInfo.spec
@@ -11,7 +11,7 @@
%undefine __brp_mangle_shebangs
%{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)}
-%global gh_commit e3b01295c0c46c3b751ef4a01dc41ad696815bc6
+%global gh_commit 5978aea8eb937157c72b8217dcaac148e6f5ae7d
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20151005
%global gh_owner llaville
@@ -19,7 +19,7 @@
#global prever RC2
%bcond_without tests
-%global upstream_version 5.5.4
+%global upstream_version 6.0.1
#global upstream_prever RC1
Name: php-bartlett-PHP-CompatInfo
@@ -36,16 +36,15 @@ Source1: fedora-review-check
# Autoload and config path
# avoid jean85/pretty-package-versions
-Patch0: %{name}-5.5.4-rpm.patch
+Patch0: %{name}-6.0.0-rpm.patch
BuildArch: noarch
-BuildRequires: php(language) >= 7.2
+BuildRequires: php(language) >= 7.4
%if %{with tests}
# to run test suite
BuildRequires: php-pdo_sqlite
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(bartlett/php-reflect) >= 4.4 with php-composer(bartlett/php-reflect) < 5)
BuildRequires: (php-composer(bartlett/php-compatinfo-db) >= 3.6 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)
@@ -57,9 +56,9 @@ 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)
+BuildRequires: (php-composer(nikic/php-parser) >= 4.10 with php-composer(nikic/php-parser) < 5)
# remirepo:14
%else
-BuildRequires: php-bartlett-PHP-Reflect >= 4.4
BuildRequires: php-bartlett-php-compatinfo-db >= 3.6
BuildRequires: php-PsrLog >= 1.0
BuildRequires: php-ramsey-uuid >= 4.0
@@ -71,6 +70,7 @@ BuildRequires: php-symfony4-finder >= 4.4
BuildRequires: php-symfony4-serializer >= 4.4
BuildRequires: php-symfony4-stopwatch >= 4.4
BuildRequires: php-doctrine-collections >= 1.4
+BuildRequires: php-nikic-php-parser4 >= 4.10
%endif
%global phpunit %{_bindir}/phpunit9
BuildRequires: %{phpunit}
@@ -79,16 +79,15 @@ BuildRequires: php-fedora-autoloader-devel
%endif
# From composer.json, "require"
-# "php": "^7.2|^8.0",
+# "php": "^7.4|^8.0",
+# "ext-json": "*",
# "ext-libxml": "*",
# "ext-pcre": "*",
# "ext-spl": "*",
-# "ext-json": "*",
-# "ext-pdo": "*",
-# "ext-pdo_sqlite": "*",
# "bartlett/php-reflect": "^4.4",
# "bartlett/php-compatinfo-db": "^3.6",
# "doctrine/collections": "^1.4",
+# "nikic/php-parser": "^4.10",
# "composer/package-versions-deprecated": "^1.8",
# "psr/log": "^1.0",
# "ramsey/uuid": "^3.9|^4.0",
@@ -99,17 +98,15 @@ 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.2
+Requires: php(language) >= 7.4
Requires: php-cli
Requires: php-json
Requires: php-libxml
Requires: php-pcre
-Requires: php-pdo
Requires: php-pdo_sqlite
Requires: php-spl
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(bartlett/php-reflect) >= 4.4 with php-composer(bartlett/php-reflect) < 5)
Requires: (php-composer(bartlett/php-compatinfo-db) >= 3.6 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)
@@ -121,6 +118,7 @@ Requires: (php-composer(symfony/finder) >= 4.4 with php-comp
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(nikic/php-parser) >= 4.10 with php-composer(nikic/php-parser) < 5)
# remirepo:14
%else
Requires: php-bartlett-PHP-Reflect >= 4.4
@@ -135,6 +133,7 @@ Requires: php-symfony4-finder >= 4.4
Requires: php-symfony4-serializer >= 4.4
Requires: php-symfony4-stopwatch >= 4.4
Requires: php-doctrine-collections >= 1.4
+Requires: php-nikic-php-parser4 >= 4.10
%endif
# Required by autoloader
Requires: php-composer(fedora/autoloader)
@@ -159,12 +158,12 @@ Documentation: http://php5.laurent-laville.org/compatinfo/manual/current/en/
phpab \
--template fedora \
- --output src/Bartlett/CompatInfo/autoload.php \
- src/Bartlett/CompatInfo
-cat << 'EOF' | tee -a src/Bartlett/CompatInfo/autoload.php
+ --output src/autoload.php \
+ src
+cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required([
- '%{_datadir}/php/Bartlett/Reflect/autoload.php',
+ '%{_datadir}/php/PhpParser4/autoload.php',
'%{_datadir}/php/Bartlett/CompatInfoDb/autoload.php',
'%{_datadir}/php/Psr/Log/autoload.php',
'%{_datadir}/php/Ramsey/Uuid/autoload.php',
@@ -191,6 +190,7 @@ cat << 'EOF' | tee -a src/Bartlett/CompatInfo/autoload.php
'%{_datadir}/php/Symfony4/Component/Stopwatch/autoload.php',
],
'%{_datadir}/php/Doctrine/Common/Collections/autoload.php',
+ __DIR__ . '/Infrastructure/Framework/Symfony/Polyfill.php',
]);
EOF
@@ -198,11 +198,11 @@ EOF
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
+sed -e 's:/src::' -i config/set/*php
+mv config src/config
# Check package version
-FILE=src/Bartlett/CompatInfo/Console/Application.php
+FILE=src/Presentation/Console/ApplicationInterface.php
#sed -e 's/5.5.1/#{version}/' -i $FILE
grep " VERSION" $FILE
grep %{version} $FILE
@@ -213,8 +213,8 @@ grep %{version} $FILE
%install
-mkdir -p %{buildroot}%{_datadir}/php
-cp -pr src/Bartlett %{buildroot}%{_datadir}/php/Bartlett
+mkdir -p %{buildroot}%{_datadir}/php/Bartlett
+cp -pr src %{buildroot}%{_datadir}/php/Bartlett/CompatInfo
install -D -p -m 755 bin/phpcompatinfo %{buildroot}%{_bindir}/phpcompatinfo
install -D -p -m 644 bin/phpcompatinfo.1 %{buildroot}%{_mandir}/man1/phpcompatinfo.1
@@ -228,7 +228,7 @@ mkdir config
cat << 'EOF' | tee config/bootstrap.php
<?php
require_once "%{buildroot}%{_datadir}/php/Bartlett/CompatInfo/config/bootstrap.php";
-\Fedora\Autoloader\Autoload::addPsr4('Bartlett\\Tests\\CompatInfo\\', dirname(__DIR__) . '/tests');
+\Fedora\Autoloader\Autoload::addPsr4('Bartlett\\CompatInfo\\Tests\\', dirname(__DIR__) . '/tests');
EOF
sed -e 's:@BUILDPATH@:%{buildroot}%{_datadir}/php/Bartlett/CompatInfo:' \
@@ -264,6 +264,12 @@ fi
%changelog
+* Mon Dec 13 2021 Remi Collet <remi@remirepo.net> - 6.0.1-1
+- update to 6.0.1
+- raise dependency on PHP 7.4
+- drop dependency on bartlett/php-reflect
+- add dependency on nikic/php-parser
+
* Fri Dec 10 2021 Remi Collet <remi@remirepo.net> - 5.5.4-1
- update to 5.5.4
- raise dependency on bartlett/php-compatinfo-db 3.6