From d3de70706252b43895362434a1e540cc034b2b48 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 28 Apr 2026 10:27:23 +0200 Subject: update to 6.1.0 raise dependency on PHP 8.2 --- composer.json | 22 ++++++++++++++++------ makesrc.sh | 31 +++++++++++++++---------------- php-sabre-event6.spec | 41 ++++++++++++++++++++++------------------- 3 files changed, 53 insertions(+), 41 deletions(-) diff --git a/composer.json b/composer.json index 3c2e92b..426f6f1 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "homepage": "http://sabre.io/event/", "license": "BSD-3-Clause", "require": { - "php": "^7.4 || ^8.0" + "php": "^8.2" }, "authors": [ { @@ -46,12 +46,13 @@ } }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.64", - "phpstan/phpstan": "^1.12", - "phpstan/phpstan-phpunit": "^1.4", - "phpstan/phpstan-strict-rules": "^1.6", + "friendsofphp/php-cs-fixer": "^3.95", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpstan/extension-installer": "^1.4", - "phpunit/phpunit" : "^9.6" + "phpunit/phpunit": "^10.5", + "rector/rector": "^2.4" }, "scripts": { "phpstan": [ @@ -60,6 +61,12 @@ "cs-fixer": [ "PHP_CS_FIXER_IGNORE_ENV=true php-cs-fixer fix" ], + "rector-check": [ + "rector process --dry-run" + ], + "rector-fix": [ + "rector process" + ], "phpunit": [ "phpunit --configuration tests/phpunit.xml" ], @@ -72,6 +79,9 @@ "config": { "allow-plugins": { "phpstan/extension-installer": true + }, + "platform": { + "php": "8.2" } } } diff --git a/makesrc.sh b/makesrc.sh index 37cb6a2..f2a2aed 100755 --- a/makesrc.sh +++ b/makesrc.sh @@ -4,25 +4,24 @@ NAME=$(basename $PWD) OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec) PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec) VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) -COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec) -SHORT=${COMMIT:0:7} -echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n" +if [ -f $NAME-$VERSION.tgz ]; then + echo "$NAME-$VERSION.tgz already there" +else + echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION \n" -echo "Cloning..." -rm -rf $PROJECT-$COMMIT -git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT + echo "Cloning..." + rm -rf $PROJECT-$VERSION + git clone https://github.com/$OWNER/$PROJECT.git --depth 1 --branch $VERSION $PROJECT-$VERSION || exit 1 -echo "Getting commit..." -pushd $PROJECT-$COMMIT -git checkout $COMMIT -cp composer.json ../composer.json -popd + echo "Getting composer..." + cp $PROJECT-$VERSION/composer.json composer.json -echo "Archiving..." -tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs $PROJECT-$COMMIT + echo "Archiving..." + tar czf $NAME-$VERSION.tgz --exclude-vcs $PROJECT-$VERSION -echo "Cleaning..." -rm -rf $PROJECT-$COMMIT + echo "Cleaning..." + rm -rf $PROJECT-$VERSION -echo "Done." + echo "Done." +fi diff --git a/php-sabre-event6.spec b/php-sabre-event6.spec index d074062..41c0956 100644 --- a/php-sabre-event6.spec +++ b/php-sabre-event6.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-sabre-event6 # -# SPDX-FileCopyrightText: Copyright 2013-2025 Remi Collet +# SPDX-FileCopyrightText: Copyright 2013-2026 Remi Collet # SPDX-License-Identifier: CECILL-2.1 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # @@ -10,8 +10,6 @@ %bcond_without tests # Github -%global gh_commit 70525d519b6fbd8e2cbef4e0dbe69c9d4a3e2db7 -%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sabre-io %global gh_project event # Packagist @@ -25,33 +23,34 @@ Name: php-%{pk_vendor}-%{pk_project}%{major} Summary: Lightweight library for event-based programming -Version: 6.0.1 +Version: 6.1.0 Release: 1%{?dist} URL: http://sabre.io/event License: BSD-3-Clause -Source0: %{name}-%{version}-%{gh_short}.tgz +Source0: %{name}-%{version}.tgz Source1: makesrc.sh BuildArch: noarch %if %{with tests} -BuildRequires: php(language) >= 7.4 +BuildRequires: php(language) >= 8.2 # From composer.json, "require-dev": { -# "friendsofphp/php-cs-fixer": "^3.64", -# "phpstan/phpstan": "^1.12", -# "phpstan/phpstan-phpunit": "^1.4", -# "phpstan/phpstan-strict-rules": "^1.6", +# "friendsofphp/php-cs-fixer": "^3.95", +# "phpstan/phpstan": "^2.1", +# "phpstan/phpstan-phpunit": "^2.0", +# "phpstan/phpstan-strict-rules": "^2.0", # "phpstan/extension-installer": "^1.4", -# "phpunit/phpunit" : "^9.6" -BuildRequires: phpunit9 >= 9.6 -%global phpunit %{_bindir}/phpunit9 +# "phpunit/phpunit": "^10.5", +# "rector/rector": "^2.4" +BuildRequires: phpunit10 >= 10.5 +%global phpunit %{_bindir}/phpunit10 # Autoloader BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require": { -# "php": "^7.4 || ^8.0" -Requires: php(language) >= 7.4 +# "php": "^8.2" +Requires: php(language) >= 8.2 # From phpcompatinfo report for version 6.0.1 # Only spl # Autoloader @@ -74,7 +73,7 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php %prep -%setup -q -n %{gh_project}-%{gh_commit} +%setup -q -n %{gh_project}-%{version} cat << 'EOF' | tee lib/autoload.php - 6.1.0-1 +- update to 6.1.0 +- raise dependency on PHP 8.2 + * Thu Feb 13 2025 Remi Collet - 6.0.1-1 - update to 6.0.1 - raise dependency on PHP 7.4 -- cgit