summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json7
-rwxr-xr-xmakesrc.sh28
-rw-r--r--php-sebastian-type3.spec22
3 files changed, 46 insertions, 11 deletions
diff --git a/composer.json b/composer.json
index b02d8e9..10b32cd 100644
--- a/composer.json
+++ b/composer.json
@@ -19,7 +19,7 @@
"php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^9.5"
},
"config": {
"platform": {
@@ -38,12 +38,13 @@
"tests/_fixture"
],
"files": [
- "tests/_fixture/callback_function.php"
+ "tests/_fixture/callback_function.php",
+ "tests/_fixture/functions_that_declare_return_types.php"
]
},
"extra": {
"branch-alias": {
- "dev-master": "2.3-dev"
+ "dev-master": "3.0-dev"
}
}
}
diff --git a/makesrc.sh b/makesrc.sh
new file mode 100755
index 0000000..4190c13
--- /dev/null
+++ b/makesrc.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+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"
+
+echo "Cloning..."
+rm -rf $PROJECT-$COMMIT
+git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
+
+echo "Getting commit..."
+pushd $PROJECT-$COMMIT
+git checkout $COMMIT
+cp composer.json ../composer.json
+popd
+
+echo "Archiving..."
+tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs --exclude tools $PROJECT-$COMMIT
+
+echo "Cleaning..."
+rm -rf $PROJECT-$COMMIT
+
+echo "Done."
diff --git a/php-sebastian-type3.spec b/php-sebastian-type3.spec
index 19007e7..306c45a 100644
--- a/php-sebastian-type3.spec
+++ b/php-sebastian-type3.spec
@@ -1,6 +1,6 @@
-# remirepo/fedora spec file for php-sebastian-type2
+# remirepo/fedora spec file for php-sebastian-type3
#
-# Copyright (c) 2019-2021 Remi Collet
+# Copyright (c) 2019-2022 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -10,21 +10,21 @@
%bcond_without tests
# github
-%global gh_commit b8cd8a1c753c90bc1a0f5372170e3e489136f914
+%global gh_commit b233b84bc4465aff7b57cf1c4bc75c86d00d6dad
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project type
# packagist
%global pk_vendor sebastian
%global pk_project %{gh_project}
-%global major 2
+%global major 3
# namespace
%global php_home %{_datadir}/php
%global ns_vendor SebastianBergmann
%global ns_project Type
Name: php-%{pk_vendor}-%{pk_project}%{major}
-Version: 2.3.4
+Version: 3.0.0
Release: 1%{?dist}
Summary: Collection of value objects that represent the types of the PHP type system, version %{major}
@@ -40,8 +40,8 @@ BuildRequires: php-reflection
BuildRequires: php-fedora-autoloader-devel >= 1.0.0
%if %{with tests}
# from composer.json, "require-dev": {
-# "phpunit/phpunit": "^9.3"
-BuildRequires: phpunit9 >= 9.3
+# "phpunit/phpunit": "^9.5"
+BuildRequires: phpunit9 >= 9.5
%endif
# from composer.json, "require": {
@@ -84,11 +84,12 @@ cat <<EOF | tee vendor/autoload.php
<?php
require_once 'tests/autoload.php';
require_once 'tests/_fixture/callback_function.php';
+require_once 'tests/_fixture/functions_that_declare_return_types.php';
EOF
: Run upstream test suite
ret=0
-for cmd in php php73 php74 php80 php81; do
+for cmd in php php74 php80 php81; do
if which $cmd; then
$cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \
%{_bindir}/phpunit9 \
@@ -112,6 +113,11 @@ exit $ret
%changelog
+* Tue Mar 15 2022 Remi Collet <remi@remirepo.net> - 3.0.0-1
+- update to 3.0.0
+- rename to php-sebastian-type3
+- install to /usr/share/php/SebastianBergmann/Type3
+
* Tue Jun 15 2021 Remi Collet <remi@remirepo.net> - 2.3.4-1
- update to 2.3.4