diff options
| author | Remi Collet <remi@remirepo.net> | 2026-04-28 10:19:08 +0200 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2026-04-28 10:19:08 +0200 |
| commit | f6a97d9727a2902f07f0f85411659b1e743fa3e6 (patch) | |
| tree | ce1eebe0dab48457b1e67ef1d860f77ac2f38f69 | |
| parent | 5d85d65284ca1d2f41aaf27033c5e1afff1963cc (diff) | |
raise dependency on PHP 8.2
| -rw-r--r-- | composer.json | 17 | ||||
| -rwxr-xr-x | makesrc.sh | 31 | ||||
| -rw-r--r-- | php-sabre-uri3.spec | 30 |
3 files changed, 44 insertions, 34 deletions
diff --git a/composer.json b/composer.json index bb4a089..1c2bf7e 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "homepage": "http://sabre.io/uri/", "license": "BSD-3-Clause", "require": { - "php": "^7.4 || ^8.0" + "php": "^8.2" }, "authors": [ { @@ -37,13 +37,13 @@ } }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.94", + "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", - "rector/rector": "^2.3" + "phpunit/phpunit" : "^10.5", + "rector/rector": "^2.4" }, "scripts": { "phpstan": [ @@ -52,6 +52,12 @@ "cs-fixer": [ "php-cs-fixer fix" ], + "rector-check": [ + "rector process --dry-run" + ], + "rector-fix": [ + "rector process" + ], "phpunit": [ "phpunit --configuration tests/phpunit.xml" ], @@ -64,6 +70,9 @@ "config": { "allow-plugins": { "phpstan/extension-installer": true + }, + "platform": { + "php": "8.2" } } } @@ -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-uri3.spec b/php-sabre-uri3.spec index f834b38..75b48cb 100644 --- a/php-sabre-uri3.spec +++ b/php-sabre-uri3.spec @@ -10,8 +10,6 @@ %bcond_without tests # Github -%global gh_commit 4fa0b2049e06a4fbe4aea4f0aa69e7b8410a13bc -%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sabre-io %global gh_project uri # Packagist @@ -24,36 +22,36 @@ Name: php-%{pk_vendor}-%{pk_project}%{major} Summary: Functions for making sense out of URIs -Version: 3.0.3 +Version: 3.1.0 Release: 1%{?dist} URL: https://github.com/%{gh_owner}/%{gh_project} License: BSD-3-Clause # Git snapshot with tests, because of .gitattributes -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.94", +# "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", -# "rector/rector": "^2.3" +# "phpunit/phpunit" : "^10.5", +# "rector/rector": "^2.4" -BuildRequires: phpunit9 >= 9.6 -%global phpunit %{_bindir}/phpunit9 +BuildRequires: phpunit10 >= 10.5 +%global phpunit %{_bindir}/phpunit10 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # 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 3.0.2 # Only pcre and spl # Autoloader @@ -82,7 +80,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} phpab -t fedora -o lib/autoload.php lib cat << 'EOF' | tee -a lib/autoload.php @@ -120,7 +118,7 @@ cd tests for cmdarg in "php %{phpunit}" php82 php83 php84 php85; do if which $cmdarg; then set $cmdarg - $1 ${2:-%{_bindir}/phpunit9} --verbose || ret=1 + $1 ${2:-%{_bindir}/phpunit10} || ret=1 fi done exit $ret @@ -140,6 +138,10 @@ exit $ret %changelog +* Tue Apr 28 2026 Remi Collet <remi@remirepo.net> - 3.1.0-1 +- update to 3.1.0 +- raise dependency on PHP 8.2 + * Wed Apr 1 2026 Remi Collet <remi@remirepo.net> - 3.0.3-1 - update to 3.0.3 |
