summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json16
-rw-r--r--php-composer-ca-bundle-rpm.patch24
-rw-r--r--php-composer-ca-bundle.spec99
3 files changed, 85 insertions, 54 deletions
diff --git a/composer.json b/composer.json
index 22de0a8..a998783 100644
--- a/composer.json
+++ b/composer.json
@@ -24,12 +24,13 @@
"require": {
"ext-openssl": "*",
"ext-pcre": "*",
- "php": "^5.3.2 || ^7.0 || ^8.0"
+ "php": "^7.2 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
+ "symfony/phpunit-bridge": "^4.2 || ^5",
+ "phpstan/phpstan": "^1.10",
"psr/log": "^1.0",
- "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
+ "symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"autoload": {
"psr-4": {
@@ -43,12 +44,11 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.x-dev"
+ "dev-main": "1.x-dev"
}
},
- "config": {
- "platform": {
- "php": "5.3.9"
- }
+ "scripts": {
+ "test": "vendor/bin/simple-phpunit",
+ "phpstan": "vendor/bin/phpstan analyse"
}
}
diff --git a/php-composer-ca-bundle-rpm.patch b/php-composer-ca-bundle-rpm.patch
index 7ae8760..3dfdc65 100644
--- a/php-composer-ca-bundle-rpm.patch
+++ b/php-composer-ca-bundle-rpm.patch
@@ -1,7 +1,7 @@
-diff -up src/CaBundle.php.rpm src/CaBundle.php
---- src/CaBundle.php.rpm 2017-11-30 07:12:46.773928987 +0100
-+++ src/CaBundle.php 2017-11-30 07:15:28.549820032 +0100
-@@ -130,7 +130,7 @@ class CaBundle
+diff -up ./src/CaBundle.php.rpm ./src/CaBundle.php
+--- ./src/CaBundle.php.rpm 2021-01-12 13:54:38.000000000 +0100
++++ ./src/CaBundle.php 2021-01-12 13:55:35.957422992 +0100
+@@ -125,7 +125,7 @@ class CaBundle
*/
public static function getBundledCaBundlePath()
{
@@ -10,15 +10,15 @@ diff -up src/CaBundle.php.rpm src/CaBundle.php
// cURL does not understand 'phar://' paths
// see https://github.com/composer/ca-bundle/issues/10
-diff -up tests/CaBundleTest.php.rpm tests/CaBundleTest.php
---- tests/CaBundleTest.php.rpm 2019-08-01 11:14:21.577672699 +0200
-+++ tests/CaBundleTest.php 2019-08-01 11:14:31.322744408 +0200
-@@ -104,7 +104,7 @@ class CaBundleTest extends TestCase
- public function testOpenBaseDir()
+diff -up ./tests/CaBundleTest.php.rpm ./tests/CaBundleTest.php
+--- ./tests/CaBundleTest.php.rpm 2021-01-12 13:55:35.957422992 +0100
++++ ./tests/CaBundleTest.php 2021-01-12 13:56:54.872069486 +0100
+@@ -97,7 +97,7 @@ class CaBundleTest extends TestCase
+ public function testOpenBaseDir(): void
{
- $oldValue = ini_get('open_basedir');
-- ini_set('open_basedir', realpath(__DIR__ . '/../'));
-+ ini_set('open_basedir', '/usr/share/php:' . realpath(__DIR__ . '/../'));
+ $oldValue = ini_get('open_basedir') ?: '';
+- ini_set('open_basedir', dirname(__DIR__));
++ ini_set('open_basedir', '/usr/share/php:' . dirname(__DIR__));
$certFilePath = CaBundle::getSystemCaRootBundlePath();
$validResult = CaBundle::validateCaFile($certFilePath, null);
$this->assertTrue($validResult);
diff --git a/php-composer-ca-bundle.spec b/php-composer-ca-bundle.spec
index ed5bebf..5b39d42 100644
--- a/php-composer-ca-bundle.spec
+++ b/php-composer-ca-bundle.spec
@@ -1,7 +1,7 @@
# remirepo/fedora spec file for php-composer-ca-bundle
#
-# Copyright (c) 2016-2019 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2016-2024 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
@@ -9,14 +9,14 @@
%bcond_without tests
-%global gh_commit 8a7ecad675253e4654ea05505233285377405215
+%global gh_commit 0c5ccfcfea312b5c5a190a21ac5cef93f74baf99
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner composer
%global gh_project ca-bundle
%global php_home %{_datadir}/php
Name: php-composer-ca-bundle
-Version: 1.2.8
+Version: 1.5.0
Release: 1%{?dist}
Summary: Lets you find a path to the system CA
@@ -31,25 +31,16 @@ Patch0: %{name}-rpm.patch
BuildArch: noarch
%if %{with tests}
-BuildRequires: php(language) >= 5.3.2
+BuildRequires: php(language) >= 7.2
BuildRequires: php-openssl
BuildRequires: php-pcre
BuildRequires: php-cli
# From composer.json, "require": {
-# "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
+# "symfony/phpunit-bridge": "^4.2 || ^5",
+# "phpstan/phpstan": "^1.10",
# "psr/log": "^1.0",
-# "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: phpunit6
-%global phpunit %{_bindir}/phpunit8
-BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2)
-BuildRequires: (php-composer(symfony/process) >= 2.5 with php-composer(symfony/process) < 6)
-%else
-BuildRequires: phpunit
-%global phpunit %{_bindir}/phpunit
-BuildRequires: php-PsrLog
-BuildRequires: php-symfony-process
-%endif
+# "symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0"
+BuildRequires: phpunit10
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
# ca-certificates
@@ -59,8 +50,8 @@ BuildRequires: %{_sysconfdir}/pki/tls/certs/ca-bundle.crt
# From composer.json, "require": {
# "ext-openssl": "*",
# "ext-pcre": "*",
-# "php": "^5.3.2 || ^7.0 || ^8.0"
-Requires: php(language) >= 5.3.2
+# "php": "^7.2 || ^8.0"
+Requires: php(language) >= 7.2
Requires: php-openssl
Requires: php-pcre
# From phpcompatinfo report for version 1.0.3
@@ -82,7 +73,7 @@ Autoloader: %{php_home}/Composer/CaBundle/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p0 -b .rpm
+%patch -P0 -p0 -b .rpm
find src -name \*.rpm -exec rm {} \;
cat << 'EOF' | tee src/autoload.php
@@ -111,22 +102,14 @@ mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{php_home}/Composer/CaBundle/autoload.php';
-\Fedora\Autoloader\Dependencies::required(array(
- array(
- '%{php_home}/Symfony5/Component/Process/autoload.php',
- '%{php_home}/Symfony4/Component/Process/autoload.php',
- '%{php_home}/Symfony3/Component/Process/autoload.php',
- '%{php_home}/Symfony/Component/Process/autoload.php',
- ),
- '%{php_home}/Psr/Log/autoload.php',
-));
EOF
ret=0
-for cmdarg in "php %{phpunit}" php72 php73 "php74 %{_bindir}/phpunit8"; do
- if which $cmdarg; then
- set $cmdarg
- $1 ${2:-%{_bindir}/phpunit8} --verbose || ret=1
+%{_bindir}/phpunit10 --migrate-configuration
+
+for cmd in php php81 php82 php83; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit10 --no-coverage || ret=1
fi
done
exit $ret
@@ -145,6 +128,54 @@ exit $ret
%changelog
+* Fri Mar 15 2024 Remi Collet <remi@remirepo.net> - 1.5.0-1
+- update to 1.5.0
+- raise dependency on PHP 7.2
+
+* Thu Mar 14 2024 Remi Collet <remi@remirepo.net> - 1.4.2-1
+- update to 1.4.2 (no change)
+
+* Mon Feb 26 2024 Remi Collet <remi@remirepo.net> - 1.4.1-1
+- update to 1.4.1
+
+* Mon Dec 18 2023 Remi Collet <remi@remirepo.net> - 1.4.0-1
+- update to 1.4.0 (no change)
+- drop build dependencies on symfony/process and psr/log
+
+* Thu Aug 31 2023 Remi Collet <remi@remirepo.net> - 1.3.7-1
+- update to 1.3.7 (no change)
+
+* Thu Jun 8 2023 Remi Collet <remi@remirepo.net> - 1.3.6-1
+- update to 1.3.6 (no change)
+
+* Wed Jan 11 2023 Remi Collet <remi@remirepo.net> - 1.3.5-1
+- update to 1.3.5 (no change)
+
+* Wed Oct 12 2022 Remi Collet <remi@remirepo.net> - 1.3.4-1
+- update to 1.3.4 (no change)
+
+* Wed Jul 20 2022 Remi Collet <remi@remirepo.net> - 1.3.3-1
+- update to 1.3.3 (no change)
+
+* Wed May 25 2022 Remi Collet <remi@remirepo.net> - 1.3.2-1
+- update to 1.3.2 (no change)
+
+* Sat Oct 30 2021 Remi Collet <remi@remirepo.net> - 1.3.1-1
+- update to 1.3.1
+
+* Wed Oct 27 2021 Remi Collet <remi@remirepo.net> - 1.3.0-1
+- update to 1.3.0
+
+* Fri Oct 1 2021 Remi Collet <remi@remirepo.net> - 1.2.11-1
+- update to 1.2.11 (no change)
+- allow Symfony 6
+
+* Tue Jun 8 2021 Remi Collet <remi@remirepo.net> - 1.2.10-1
+- update to 1.2.10 (no change)
+
+* Tue Jan 12 2021 Remi Collet <remi@remirepo.net> - 1.2.9-1
+- update to 1.2.9
+
* Mon Aug 24 2020 Remi Collet <remi@remirepo.net> - 1.2.8-1
- update to 1.2.8 (no change)