summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json12
-rwxr-xr-xmakesrc.sh23
-rw-r--r--php-phpstan-phpdoc-parser.spec74
3 files changed, 69 insertions, 40 deletions
diff --git a/composer.json b/composer.json
index f1c648e..8047c49 100644
--- a/composer.json
+++ b/composer.json
@@ -3,17 +3,17 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"license": "MIT",
"require": {
- "php": "^7.2 || ^8.0"
+ "php": "^7.4 || ^8.0"
},
"require-dev": {
"doctrine/annotations": "^2.0",
- "nikic/php-parser": "^4.15",
+ "nikic/php-parser": "^5.3.0",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/extension-installer": "^1.0",
- "phpstan/phpstan": "^1.5",
- "phpstan/phpstan-phpunit": "^1.1",
- "phpstan/phpstan-strict-rules": "^1.0",
- "phpunit/phpunit": "^9.5",
+ "phpstan/phpstan": "^2.0",
+ "phpstan/phpstan-phpunit": "^2.0",
+ "phpstan/phpstan-strict-rules": "^2.0",
+ "phpunit/phpunit": "^9.6",
"symfony/process": "^5.2"
},
"config": {
diff --git a/makesrc.sh b/makesrc.sh
index 65c4fd8..f2a2aed 100755
--- a/makesrc.sh
+++ b/makesrc.sh
@@ -4,29 +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}
-if [ -f $NAME-$VERSION-$SHORT.tgz ]; then
- echo Skip $NAME-$VERSION-$SHORT.tgz
+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 -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
+ 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 || exit 1
- 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 .git $PROJECT-$COMMIT
+ tar czf $NAME-$VERSION.tgz --exclude-vcs $PROJECT-$VERSION
echo "Cleaning..."
- rm -rf $PROJECT-$COMMIT
+ rm -rf $PROJECT-$VERSION
echo "Done."
fi
diff --git a/php-phpstan-phpdoc-parser.spec b/php-phpstan-phpdoc-parser.spec
index f27ab85..2987fe7 100644
--- a/php-phpstan-phpdoc-parser.spec
+++ b/php-phpstan-phpdoc-parser.spec
@@ -1,16 +1,14 @@
# remirepo/Fedora spec file for php-phpstan-phpdoc-parser
#
-# Copyright (c) 2023-2024 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2024-2026 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
%bcond_without tests
-%global gh_commit 6ca22b154efdd9e3c68c56f5d94670920a1c19a4
-%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpstan
%global gh_project phpdoc-parser
%global php_home %{_datadir}/php
@@ -19,42 +17,42 @@
%global major %nil
Name: php-%{gh_owner}-%{gh_project}%{major}
-Version: 1.32.0
+Version: 2.3.3
Release: 1%{?dist}
Summary: PHPDoc parser with support for nullable, intersection and generic types
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
# git snapshot to retrieve test suite
-Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
+Source0: %{name}-%{version}.tgz
Source1: makesrc.sh
BuildArch: noarch
# Tests
%if %{with tests}
-BuildRequires: php(language) >= 7.2
+BuildRequires: php(language) >= 7.4
BuildRequires: php-json
BuildRequires: php-pcre
# From composer, "require-dev": {
# "doctrine/annotations": "^2.0",
-# "nikic/php-parser": "^4.15",
+# "nikic/php-parser": "^5.3.0",
# "php-parallel-lint/php-parallel-lint": "^1.2",
# "phpstan/extension-installer": "^1.0",
-# "phpstan/phpstan": "^1.5",
-# "phpstan/phpstan-phpunit": "^1.1",
-# "phpstan/phpstan-strict-rules": "^1.0",
-# "phpunit/phpunit": "^9.5",
+# "phpstan/phpstan": "^2.0",
+# "phpstan/phpstan-phpunit": "^2.0",
+# "phpstan/phpstan-strict-rules": "^2.0",
+# "phpunit/phpunit": "^9.6",
# "symfony/process": "^5.2"
%global phpunit %{_bindir}/phpunit9
-BuildRequires: phpunit9 >= 9.5
+BuildRequires: phpunit9 >= 9.6
%endif
-BuildRequires: (php-composer(nikic/php-parser) >= 4.15 with php-composer(nikic/php-parser) < 5)
+BuildRequires: (php-composer(nikic/php-parser) >= 5.3 with php-composer(nikic/php-parser) < 6)
# Autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
-# "php": "^7.2 || ^8.0"
-Requires: php(language) >= 7.2
+# "php": "^7.4 || ^8.0"
+Requires: php(language) >= 7.4
# Autoloader
Requires: php-composer(fedora/autoloader)
# From phpcompatinfo report for version 2.4.2
@@ -69,7 +67,7 @@ Next generation phpDoc parser with support for intersection types and generics.
%prep
-%setup -q -n %{gh_project}-%{gh_commit}
+%setup -q -n %{gh_project}-%{version}
%build
@@ -88,7 +86,7 @@ mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
// to avoid v5 from PHPUnit
-require_once '%{php_home}/PhpParser4/autoload.php';
+require_once '%{php_home}/PhpParser5/autoload.php';
require_once '%{buildroot}%{php_home}/%{namespace}/%{library}%{major}/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('%{namespace}\\%{library}\\', dirname(__DIR__) . '/tests/%{namespace}');
EOF
@@ -101,7 +99,7 @@ sed -e 's:exec://exec:' -i tests/bootstrap.php
# use auto_prepend_file to ensure we use new version (not old one pulled by PHPUnit)
# ignore test using doctrine/annotations
ret=0
-for cmdarg in "php %{phpunit}" php81 php82 php83 php84; do
+for cmdarg in "php %{phpunit}" php82 php83 php84 php85 php86; do
if which $cmdarg; then
set $cmdarg
$1 -d auto_prepend_file=vendor/autoload.php \
@@ -127,6 +125,42 @@ exit $ret
%changelog
+* Wed Jul 8 2026 Remi Collet <remi@remirepo.net> - 2.3.3-1
+- update to 2.3.3
+
+* Mon Jan 26 2026 Remi Collet <remi@remirepo.net> - 2.3.2-1
+- update to 2.3.2
+
+* Mon Jan 12 2026 Remi Collet <remi@remirepo.net> - 2.3.1-1
+- update to 2.3.1
+
+* Mon Sep 1 2025 Remi Collet <remi@remirepo.net> - 2.3.0-1
+- update to 2.3.0
+
+* Tue Jul 15 2025 Remi Collet <remi@remirepo.net> - 2.2.0-1
+- update to 2.2.0
+
+* Wed Feb 19 2025 Remi Collet <remi@remirepo.net> - 2.1.0-1
+- update to 2.1.0
+
+* Tue Feb 18 2025 Remi Collet <remi@remirepo.net> - 2.0.2-1
+- update to 2.0.2
+
+* Thu Feb 13 2025 Remi Collet <remi@remirepo.net> - 2.0.1-1
+- update to 2.0.1
+
+* Mon Dec 23 2024 Remi Collet <remi@remirepo.net> - 2.0.0-1
+- update to 2.0.0
+- raise dependency on PHP 7.4
+- raise dependency on nikic/php-parser 5.3
+
+* Tue Dec 17 2024 Remi Collet <remi@remirepo.net> - 1.33.0-2
+- drop abnfgen from archive
+- re-license spec file to CECILL-2.1
+
+* Mon Oct 14 2024 Remi Collet <remi@remirepo.net> - 1.33.0-1
+- update to 1.33.0
+
* Thu Sep 26 2024 Remi Collet <remi@remirepo.net> - 1.32.0-1
- update to 1.32.0