diff options
-rw-r--r-- | composer.json | 11 | ||||
-rw-r--r-- | php-netresearch-jsonmapper4.spec | 28 |
2 files changed, 29 insertions, 10 deletions
diff --git a/composer.json b/composer.json index 5a9e0b5..fe9e623 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,17 @@ "autoload": { "psr-0": {"JsonMapper": "src/"} }, + "autoload-dev": { + "psr-4": { + "namespacetest\\": "tests/support/namespacetest", + "othernamespace\\": "tests/support/othernamespace", + "Enums\\": "tests/support/Enums" + }, + "psr-0": { + "JsonMapperTest_": "tests/support", + "": ["tests/support/Zoo"] + } + }, "authors": [ { "name": "Christian Weiske", diff --git a/php-netresearch-jsonmapper4.spec b/php-netresearch-jsonmapper4.spec index 381aed1..6cb8a5b 100644 --- a/php-netresearch-jsonmapper4.spec +++ b/php-netresearch-jsonmapper4.spec @@ -6,7 +6,10 @@ # # Please, preserve the changelog entries # -%global gh_commit 132c75c7dd83e45353ebb9c6c9f591952995bbf0 + +%bcond_without tests + +%global gh_commit 8e76efb98ee8b6afc54687045e1b8dba55ac76e5 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner cweiske %global gh_project jsonmapper @@ -15,12 +18,11 @@ %global pk_project jsonmapper %global php_home %{_datadir}/php -%global with_tests 0%{!?_without_tests:1} -Name: php-%{pk_vendor}-%{pk_project} -Version: 4.4.1 +Name: php-%{pk_vendor}-%{pk_project}4 +Version: 4.5.0 Release: 1%{?dist} -Summary: Map nested JSON structures onto PHP classes +Summary: Map nested JSON structures onto PHP classes, version 4 License: OSL-3.0 URL: https://github.com/%{gh_owner}/%{gh_project} @@ -29,7 +31,7 @@ Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh BuildArch: noarch -%if %{with_tests} +%if %{with tests} # For tests BuildRequires: php(language) >= 7.1 BuildRequires: php-date @@ -99,16 +101,19 @@ cp -pr src %{buildroot}%{php_home}/%{pk_vendor}/%{pk_project} %check -%if %{with_tests} +%if %{with tests} mkdir vendor +phpab --template fedora --output vendor/autoload.php tests +cat << 'EOF' | tee -a vendor/autoload.php +require_once "%{buildroot}%{php_home}/%{pk_vendor}/%{pk_project}/autoload.php"; +EOF : Run upstream test suite ret=0 -for cmd in "php %{phpunit}" php81 php82 php83; do +for cmd in "php %{phpunit}" php81 php82 php83 php84; do if which $cmd; then set $cmd $1 ${2:-%{_bindir}/phpunit10} \ - --bootstrap %{buildroot}%{php_home}/%{pk_vendor}/%{pk_project}/autoload.php \ --no-coverage \ . || ret=1 fi @@ -120,7 +125,6 @@ exit $ret %files -%{!?_licensedir:%global license %%doc} %license LICENSE %doc composer.json %doc ChangeLog README.rst @@ -129,6 +133,10 @@ exit $ret %changelog +* Mon Sep 9 2024 Remi Collet <remi@remirepo.net> - 4.5.0-1 +- update to 4.5.0 +- rename to php-netresearch-jsonmapper4 (compat package) + * Wed Jan 31 2024 Remi Collet <remi@remirepo.net> - 4.4.1-1 - update to 4.4.1 |