summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-11-23 09:27:32 +0100
committerRemi Collet <remi@remirepo.net>2020-11-23 09:27:32 +0100
commit6ce9571fd3343d5eaba282c7aee2e1d9cc414d2f (patch)
treec0c6ab89fac6b8ff4a962ba68c4cae5b4b6b52a4
parent3781fc3220a4ab794f6680e0eb8b032470f68829 (diff)
update to 5.4.2
-rw-r--r--composer.json26
-rw-r--r--php-bartlett-PHP-CompatInfo-5.4.2-rpm.patch (renamed from php-bartlett-PHP-CompatInfo-5.4.0-rpm.patch)48
-rw-r--r--php-bartlett-PHP-CompatInfo.spec18
3 files changed, 70 insertions, 22 deletions
diff --git a/composer.json b/composer.json
index 8c27a61..4edbc82 100644
--- a/composer.json
+++ b/composer.json
@@ -21,10 +21,18 @@
"bartlett/php-compatinfo-db": "^2.0",
"doctrine/collections": "^1.4",
"composer/package-versions-deprecated": "^1.8",
+ "psr/log": "^1.0",
"ramsey/uuid": "^3.9|^4.0",
- "symfony/serializer": "^4.4|^5.0",
"symfony/config": "^4.4|^5.0",
- "symfony/dependency-injection": "^4.4|^5.0"
+ "symfony/console": "^4.4|^5.0",
+ "symfony/event-dispatcher": "^4.4|^5.0",
+ "symfony/finder": "^4.4|^5.0",
+ "symfony/dependency-injection": "^4.4|^5.0",
+ "symfony/serializer": "^4.4|^5.0",
+ "symfony/stopwatch": "^4.4|^5.0"
+ },
+ "require-dev": {
+ "humbug/box": "^3.7"
},
"authors": [
{
@@ -52,6 +60,20 @@
"Bartlett\\Tests\\CompatInfo\\": "tests/"
}
},
+ "scripts": {
+ "compile-box": "box compile",
+ "post-install-cmd": [
+ "@compile-box"
+ ],
+ "post-update-cmd": [
+ "@compile-box"
+ ]
+ },
+ "scripts-descriptions": {
+ "compile-box": "Compiles application with box-project/box to build PHAR version"
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
"config": {
"optimize-autoloader": true
}
diff --git a/php-bartlett-PHP-CompatInfo-5.4.0-rpm.patch b/php-bartlett-PHP-CompatInfo-5.4.2-rpm.patch
index 6626bdf..d77f69b 100644
--- a/php-bartlett-PHP-CompatInfo-5.4.0-rpm.patch
+++ b/php-bartlett-PHP-CompatInfo-5.4.2-rpm.patch
@@ -1,22 +1,40 @@
diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo
---- ./bin/phpcompatinfo.rpm 2020-10-01 11:23:52.000000000 +0200
-+++ ./bin/phpcompatinfo 2020-10-02 12:29:00.346660651 +0200
-@@ -5,22 +5,13 @@ if (PHP_SAPI !== 'cli') {
- return;
- }
+--- ./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()) {
-- $vendorDir = 'phar://phpcompatinfo.phar/vendor';
+- $possibleAutoloadPaths = [
+- 'phar://phpcompatinfo.phar/vendor/autoload.php'
+- ];
-} else {
-- $baseDir = dirname(__DIR__);
-- $vendorDir = $baseDir . '/vendor';
+- $possibleAutoloadPaths = [
+- // local dev repository
+- __DIR__ . '/../vendor/autoload.php',
+- // dependency
+- __DIR__ . '/../../../../vendor/autoload.php',
+- ];
+-}
-
-- if (!file_exists($vendorDir . '/autoload.php')) {
-- $vendorDir = dirname(dirname($baseDir));
+-$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';
++require_once $vendorDir . '/autoload.php';
use Bartlett\CompatInfo\Console\ApplicationInterface;
@@ -27,18 +45,18 @@ diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo
$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-10-02 12:05:49.767768616 +0200
-+++ ./src/Bartlett/CompatInfo/Console/Application.php 2020-10-02 12:10:02.129841590 +0200
+--- ./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;
- /**
-@@ -77,14 +75,6 @@ class Application extends BaseApplicatio
+@@ -78,14 +76,6 @@ class Application extends BaseApplicatio
$version = self::VERSION;
} elseif (substr_count($version, '.') === 2) {
// release is in X.Y.Z format
diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec
index c69d985..bbf9074 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 3e79a1ac353774b0a3eedac8f0239dafd3e3eedb
+%global gh_commit 456308cc09f2c78903195bbbf09886314950a083
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20151005
%global gh_owner llaville
@@ -26,7 +26,7 @@
%endif
Name: php-bartlett-PHP-CompatInfo
-Version: 5.4.1
+Version: 5.4.2
%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
@@ -40,7 +40,7 @@ Source1: fedora-review-check
# Autoload and sqlite database path
# avoid jean85/pretty-package-versions
-Patch0: %{name}-5.4.0-rpm.patch
+Patch0: %{name}-5.4.2-rpm.patch
BuildArch: noarch
BuildRequires: php(language) >= 7.1.3
@@ -94,10 +94,15 @@ BuildRequires: php-fedora-autoloader-devel
# "bartlett/php-compatinfo-db": "^2.0",
# "doctrine/collections": "^1.4",
# "composer/package-versions-deprecated": "^1.8",
+# "psr/log": "^1.0",
# "ramsey/uuid": "^3.9|^4.0",
-# "symfony/serializer": "^4.4|^5.0",
# "symfony/config": "^4.4|^5.0",
-# "symfony/dependency-injection": "^4.4|^5.0"
+# "symfony/console": "^4.4|^5.0",
+# "symfony/event-dispatcher": "^4.4|^5.0",
+# "symfony/finder": "^4.4|^5.0",
+# "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-cli
Requires: php-json
@@ -262,6 +267,9 @@ fi
%changelog
+* Mon Nov 23 2020 Remi Collet <remi@remirepo.net> - 5.4.2-1
+- update to 5.4.2
+
* Tue Oct 6 2020 Remi Collet <remi@remirepo.net> - 5.4.1-1
- update to 5.4.1