Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3eace57eba |
4 changed files with 54 additions and 198 deletions
14
.gitignore
vendored
14
.gitignore
vendored
|
|
@ -1,7 +1,7 @@
|
|||
clog
|
||||
/php-phpunitgoodpractices-traits-1.9.1-1f56f64.tgz
|
||||
/php-phpunitgoodpractices-polyfill-1.5.0-b87c59f.tgz
|
||||
/php-sanmai-phpunit-legacy-adapter-8.1-464c750.tgz
|
||||
/php-phpunitgoodpractices-polyfill-1.6.0-625622f.tgz
|
||||
/php-phpunitgoodpractices-traits-1.9.2-067b87d.tgz
|
||||
/php-sanmai-phpunit-legacy-adapter-8.2.1-3db58a3.tgz
|
||||
/php-phpunitgoodpractices-polyfill-1.0.0-3968a1f.tgz
|
||||
/php-phpunitgoodpractices-polyfill-1.1.0-f7c9b77.tgz
|
||||
/php-phpunitgoodpractices-traits-1.5.1-10d22ad.tgz
|
||||
/php-phpunitgoodpractices-traits-1.6.0-d3d74de.tgz
|
||||
/php-phpunitgoodpractices-traits-1.7.0-d7864f7.tgz
|
||||
/php-phpunitgoodpractices-polyfill-1.2.0-1613c59.tgz
|
||||
/php-phpunitgoodpractices-traits-1.8.0-7bdb460.tgz
|
||||
|
|
|
|||
83
makesrc.sh
83
makesrc.sh
|
|
@ -8,24 +8,21 @@ 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-$SHORT.tgz ]; then
|
||||
echo "$PROJECT Skipped"
|
||||
else
|
||||
echo "Cloning..."
|
||||
git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
|
||||
|
||||
echo "Getting commit..."
|
||||
pushd $PROJECT-$COMMIT
|
||||
git checkout $COMMIT || exit 1
|
||||
cp composer.json ../composer-polyfill.json
|
||||
popd
|
||||
echo "Cloning..."
|
||||
git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
|
||||
|
||||
echo "Archiving..."
|
||||
tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
|
||||
echo "Getting commit..."
|
||||
pushd $PROJECT-$COMMIT
|
||||
git checkout $COMMIT
|
||||
cp composer.json ../composer-polyfill.json
|
||||
popd
|
||||
|
||||
echo "Cleaning..."
|
||||
rm -rf $PROJECT-$COMMIT
|
||||
fi
|
||||
echo "Archiving..."
|
||||
tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
|
||||
|
||||
echo "Cleaning..."
|
||||
rm -rf $PROJECT-$COMMIT
|
||||
|
||||
PROJECT=Traits
|
||||
VERSION=$(sed -n '/^%global tr_version/{s/.* //;p}' $NAME.spec)
|
||||
|
|
@ -33,54 +30,22 @@ COMMIT=$(sed -n '/^%global tr_commit/{s/.* //;p}' $NAME.spec)
|
|||
SHORT=${COMMIT:0:7}
|
||||
NAME=php-phpunitgoodpractices-traits
|
||||
|
||||
if [ -f $NAME-$VERSION-$SHORT.tgz ]; then
|
||||
echo "$PROJECT Skipped"
|
||||
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..."
|
||||
git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
|
||||
echo "Cloning..."
|
||||
git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
|
||||
|
||||
echo "Getting commit..."
|
||||
pushd $PROJECT-$COMMIT
|
||||
git checkout $COMMIT || exit 1
|
||||
cp composer.json ../composer-traits.json
|
||||
popd
|
||||
echo "Getting commit..."
|
||||
pushd $PROJECT-$COMMIT
|
||||
git checkout $COMMIT
|
||||
cp composer.json ../composer-traits.json
|
||||
popd
|
||||
|
||||
echo "Archiving..."
|
||||
tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
|
||||
echo "Archiving..."
|
||||
tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
|
||||
|
||||
echo "Cleaning..."
|
||||
rm -rf $PROJECT-$COMMIT
|
||||
fi
|
||||
echo "Cleaning..."
|
||||
rm -rf $PROJECT-$COMMIT
|
||||
|
||||
NAME=$(basename $PWD)
|
||||
OWNER=$(sed -n '/^%global lg_owner/{s/.* //;p}' $NAME.spec)
|
||||
PROJECT=$(sed -n '/^%global lg_project/{s/.* //;p}' $NAME.spec)
|
||||
VERSION=$(sed -n '/^%global lg_version/{s/.* //;p}' $NAME.spec)
|
||||
COMMIT=$(sed -n '/^%global lg_commit/{s/.* //;p}' $NAME.spec)
|
||||
SHORT=${COMMIT:0:7}
|
||||
NAME=php-$OWNER-$PROJECT
|
||||
|
||||
if [ -f $NAME-$VERSION-$SHORT.tgz ]; then
|
||||
echo "$PROJECT Skipped"
|
||||
else
|
||||
echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n"
|
||||
|
||||
echo "Cloning..."
|
||||
git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
|
||||
|
||||
echo "Getting commit..."
|
||||
pushd $PROJECT-$COMMIT
|
||||
git checkout $COMMIT || exit 1
|
||||
cp composer.json ../composer-legacy.json
|
||||
popd
|
||||
|
||||
echo "Archiving..."
|
||||
tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
|
||||
|
||||
echo "Cleaning..."
|
||||
rm -rf $PROJECT-$COMMIT
|
||||
fi
|
||||
|
||||
echo "Done."
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
# remirepo/fedora spec file for php-phpunitgoodpractices-polyfill
|
||||
#
|
||||
# Copyright (c) 2018-2022 Remi Collet
|
||||
# Copyright (c) 2018 Remi Collet
|
||||
# License: CC-BY-SA
|
||||
# http://creativecommons.org/licenses/by-sa/4.0/
|
||||
#
|
||||
# Please, preserve the changelog entries
|
||||
#
|
||||
|
||||
%bcond_without tests
|
||||
|
||||
# Polyfill
|
||||
# https://github.com/PHPUnitGoodPractices/polyfill/releases
|
||||
%global gh_commit 625622fc35e922c04f28e448b43d85972be95040
|
||||
%global gh_commit 1613c59be473c6b238c119607de820b9274c81fd
|
||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
||||
%global gh_owner PHPUnitGoodPractices
|
||||
%global gh_project polyfill
|
||||
|
|
@ -22,22 +20,16 @@
|
|||
%global ns_vendor PHPUnitGoodPractices
|
||||
%global ns_project Polyfill
|
||||
%global php_home %{_datadir}/php
|
||||
%global with_tests 0%{!?_without_tests:1}
|
||||
# Traits
|
||||
# https://github.com/PHPUnitGoodPractices/Traits/releases
|
||||
%global tr_commit 067b87ddc903231f07f89161f10f1ab8b393a6a1
|
||||
%global tr_commit 7bdb460da0f9d4cfa2f11ca1ecb69a6d7f126925
|
||||
%global tr_short %(c=%{tr_commit}; echo ${c:0:7})
|
||||
%global tr_version 1.9.2
|
||||
# Legacy
|
||||
# https://github.com/sanmai/phpunit-legacy-adapter/releases
|
||||
%global lg_owner sanmai
|
||||
%global lg_project phpunit-legacy-adapter
|
||||
%global lg_commit 3db58a31847d803f76cab3da14e334a2d090c067
|
||||
%global lg_short %(c=%{lg_commit}; echo ${c:0:7})
|
||||
%global lg_version 8.2.1
|
||||
%global tr_version 1.8.0
|
||||
|
||||
Name: php-%{pk_vendor}-%{pk_project}
|
||||
Version: 1.6.0
|
||||
Release: 8%{?dist}
|
||||
Version: 1.2.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Lacking future-compat polyfills for PHPUnit
|
||||
|
||||
License: MIT
|
||||
|
|
@ -45,45 +37,30 @@ URL: https://github.com/%{gh_owner}/%{gh_project}
|
|||
# git snapshot to get upstream test suite (none for now)
|
||||
Source0: %{name}-%{version}-%{gh_short}.tgz
|
||||
Source1: php-%{pk_vendor}-traits-%{tr_version}-%{tr_short}.tgz
|
||||
Source2: php-%{lg_owner}-%{lg_project}-%{lg_version}-%{lg_short}.tgz
|
||||
Source3: makesrc.sh
|
||||
Source2: makesrc.sh
|
||||
|
||||
BuildArch: noarch
|
||||
%if %{with tests}
|
||||
%if %{with_tests}
|
||||
# For tests
|
||||
BuildRequires: php(language) >= 5.5
|
||||
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
|
||||
%global phpunit %{_bindir}/phpunit9
|
||||
%else
|
||||
%global phpunit %{_bindir}/phpunit8
|
||||
%endif
|
||||
BuildRequires: %{phpunit}
|
||||
# From polyfill, composer.json, "require-dev": {
|
||||
# "friendsofphp/php-cs-fixer": "^2",
|
||||
# "php-coveralls/php-coveralls": "^2.4"
|
||||
# From traits, composer.json, "require-dev": {
|
||||
# "phpspec/prophecy": "^1.10",
|
||||
# "phpunitgoodpractices/polyfill": "^1.1",
|
||||
# "sanmai/phpunit-legacy-adapter": "^6.1 || ^8.0"
|
||||
%endif
|
||||
BuildRequires: php-cli
|
||||
BuildRequires: %{_bindir}/phpunit
|
||||
# From composer.json, "require-dev": {
|
||||
# "friendsofphp/php-cs-fixer": "^2.11"
|
||||
# Autoloader
|
||||
BuildRequires: php-fedora-autoloader-devel
|
||||
%endif
|
||||
|
||||
# From polyfill, composer.json, "require": {
|
||||
# "php": "^5.5 || ^7.0 || ^8.0",
|
||||
# "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.0 || ^9.0"
|
||||
# From traits, composer.json, "require": {
|
||||
# "php": "^5.5 || ^7.0 || ^8.0",
|
||||
# "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ~8.5 || ~9.4"
|
||||
# From composer.json, "require": {
|
||||
# "php": "^5.5 || ^7.0",
|
||||
# "phpunit/phpunit": ""~4.0.0 || ~4.1.0 || ~4.2.0 || ~4.3.0 || ~4.4.0 || ~4.5.0 || ~4.6.0 || ~4.8.0 || ~5.3.0 || ~5.4.0 || ~5.5.0 || ~5.6.0 || ~5.7.0 || ~6.0.0 || ~6.1.0 || ~6.2.0 || ~6.3.0 || ~6.4.0 || ~6.5.0 || ~7.0.0 || ~7.1.0 || ~7.2.6 || ~7.3.0 || ~7.4.0 || ~7.5.0"
|
||||
Requires: php(language) >= 5.5
|
||||
Requires: (phpunit9 or phpunit8 or phpunit7 or phpunit6 or php-phpunit-PHPUnit)
|
||||
# From phpcompatinfo report for version polyfill 1.5.0 and traits 1.9.1
|
||||
Requires: (phpunit8 or phpunit7 or phpunit6 or php-phpunit-PHPUnit)
|
||||
# From phpcompatinfo report for version 1.0.0
|
||||
# nothing
|
||||
# Autoloader
|
||||
Requires: php-composer(fedora/autoloader)
|
||||
|
||||
Provides: php-%{pk_vendor}-traits = %{tr_version}-%{release}
|
||||
Provides: php-%{pk_vendor}-traits = %{tr_version}
|
||||
Provides: php-composer(%{pk_vendor}/traits) = %{tr_version}
|
||||
Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
|
||||
|
||||
|
|
@ -95,15 +72,13 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php
|
|||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{gh_project}-%{gh_commit} -a 1 -a 2
|
||||
%setup -q -n %{gh_project}-%{gh_commit} -a 1
|
||||
mv composer.json composer-polyfill.json
|
||||
mv LICENSE LICENSE-polyfill
|
||||
|
||||
mv Traits-%{tr_commit}/src src2
|
||||
mv Traits-%{tr_commit}/composer.json composer-traits.json
|
||||
mv Traits-%{tr_commit}/LICENSE LICENSE-traits
|
||||
mv Traits-%{tr_commit}/tests tests/Traits
|
||||
mv %{lg_project}-%{lg_commit}/src src3
|
||||
|
||||
cat << 'EOF' | tee src/autoload.php
|
||||
<?php
|
||||
|
|
@ -113,7 +88,6 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php';
|
|||
if (!class_exists('PHPUnit\\Framework\\TestCase')) { // Call outside of phpunit command
|
||||
\Fedora\Autoloader\Dependencies::required([
|
||||
[
|
||||
'%{php_home}/PHPUnit9/autoload.php',
|
||||
'%{php_home}/PHPUnit8/autoload.php',
|
||||
'%{php_home}/PHPUnit7/autoload.php',
|
||||
'%{php_home}/PHPUnit6/autoload.php',
|
||||
|
|
@ -139,6 +113,7 @@ cp -pr src2 %{buildroot}%{php_home}/%{ns_vendor}/Traits
|
|||
|
||||
|
||||
%check
|
||||
%if %{with_tests}
|
||||
: Minimal check for our autoloader
|
||||
php -r '
|
||||
require "%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php";
|
||||
|
|
@ -152,29 +127,6 @@ if (!class_exists("PHPUnitGoodPractices\\Traits\\PHPUnitVersionRetriever")) {
|
|||
exit(1);
|
||||
}
|
||||
'
|
||||
|
||||
%if %{with tests}
|
||||
: Upstream test suite
|
||||
mkdir vendor
|
||||
cat << 'EOF' | tee vendor/autoload.php
|
||||
<?php
|
||||
require '%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php';
|
||||
require dirname(__DIR__) . '/src3/TestCase.php';
|
||||
\Fedora\Autoloader\Autoload::addPsr4('PHPUnitGoodPractices\\Traits\\Tests\\', dirname(__DIR__) . '/tests/Traits');
|
||||
EOF
|
||||
|
||||
ret=0
|
||||
for cmdarg in "php %{phpunit}" php74 php80 php81 php82
|
||||
do
|
||||
if which $cmdarg; then
|
||||
set $cmdarg
|
||||
$1 ${2:-%{_bindir}/phpunit9} \
|
||||
--filter '^((?!(testThatThereIsProperPHPUnitInComposer)).)*$' \
|
||||
--verbose || ret=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $ret
|
||||
%else
|
||||
: Test suite disabled
|
||||
%endif
|
||||
|
|
@ -190,71 +142,11 @@ exit $ret
|
|||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Mon Sep 12 2022 Remi Collet <remi@remirepo.net> - 1.6.0-1
|
||||
- update phpunitgoodpractices/polyfill to 1.6.0
|
||||
- update phpunitgoodpractices/traits to 1.9.2
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Dec 8 2020 Remi Collet <remi@remirepo.net> - 1.5.0-2
|
||||
- enable upstream test suite
|
||||
|
||||
* Tue Dec 8 2020 Remi Collet <remi@remirepo.net> - 1.5.0-1
|
||||
- update phpunitgoodpractices/polyfill to 1.5.0
|
||||
|
||||
* Tue Oct 20 2020 Remi Collet <remi@remirepo.net> - 1.4.0-1
|
||||
- update phpunitgoodpractices/polyfill to 1.4.0
|
||||
- update phpunitgoodpractices/traits to 1.9.1
|
||||
- allow PHPUnit 9
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Tue Mar 26 2019 Remi Collet <remi@remirepo.net> - 1.2.0-1
|
||||
- update phpunitgoodpractices/polyfill to 1.2.0
|
||||
- update phpunitgoodpractices/traits to 1.8.0
|
||||
- allow PHPUnit 8
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sat Dec 29 2018 Remi Collet <remi@remirepo.net> - 1.1.0-5
|
||||
- update phpunitgoodpractices/traits to 1.7.0
|
||||
|
||||
|
|
|
|||
5
sources
5
sources
|
|
@ -1,3 +1,2 @@
|
|||
SHA512 (php-phpunitgoodpractices-polyfill-1.6.0-625622f.tgz) = 395ba8cf5a5c1d889c7f585233d092ed2650543a4c26d397a5d0c05dc120fdd6c447d4521873a6158a0cb617269b7fc29dc3abdb1204b8221b92bf808026758e
|
||||
SHA512 (php-phpunitgoodpractices-traits-1.9.2-067b87d.tgz) = 7fbee163394c291cc4122f9daf3f4c94876ddd435aa10908a919dd004f2b98deb721194ab652395f566ad1097f0d9c49ea2b930bc2961fb11064312c13e5e939
|
||||
SHA512 (php-sanmai-phpunit-legacy-adapter-8.2.1-3db58a3.tgz) = 9b5009de6b20a7f8b9255605638a76eb035b1fd38ae2035a0d5947fe867783449aa564e14aedd5ae7951c95d0d285189bbb0ff7f505f5c73419a7deee96d2195
|
||||
SHA512 (php-phpunitgoodpractices-polyfill-1.2.0-1613c59.tgz) = 2c2494f948a3fb235c474fbcb7d70530a06c5973f1616aa0291094dc197ca42874aeee38563479d8e538f4fbebcebc84da114db2a51b4593f129913e14409afb
|
||||
SHA512 (php-phpunitgoodpractices-traits-1.8.0-7bdb460.tgz) = 00e74a5fc639e718370d238259d2e3727197d5893e91915082eab83776b1d76682e62157fd873eb383e312182a8ca1e3093fe547d3e34fd6ef6d9632768bd289
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue