From cd0a746f100f0dad1e89663e3b6143875db2a27c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 19 Jul 2022 08:55:09 +0200 Subject: switch to phpunit9 --- autoloader.php | 53 ++++++++++++++++++++++++++++++++++++++++++++ php-zetacomponents-base.spec | 13 ++++++----- 2 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 autoloader.php diff --git a/autoloader.php b/autoloader.php new file mode 100644 index 0000000..17bec81 --- /dev/null +++ b/autoloader.php @@ -0,0 +1,53 @@ + '/base.php', + 'ezcbaseautoloadexception' => '/exceptions/autoload.php', + 'ezcbaseautoloadoptions' => '/options/autoload.php', + 'ezcbaseconfigurationinitializer' => '/interfaces/configuration_initializer.php', + 'ezcbasedoubleclassrepositoryprefixexception' => '/exceptions/double_class_repository_prefix.php', + 'ezcbaseexception' => '/exceptions/exception.php', + 'ezcbaseexportable' => '/interfaces/exportable.php', + 'ezcbaseextensionnotfoundexception' => '/exceptions/extension_not_found.php', + 'ezcbasefeatures' => '/features.php', + 'ezcbasefile' => '/file.php', + 'ezcbasefileexception' => '/exceptions/file_exception.php', + 'ezcbasefilefindcontext' => '/structs/file_find_context.php', + 'ezcbasefileioexception' => '/exceptions/file_io.php', + 'ezcbasefilenotfoundexception' => '/exceptions/file_not_found.php', + 'ezcbasefilepermissionexception' => '/exceptions/file_permission.php', + 'ezcbasefunctionalitynotsupportedexception' => '/exceptions/functionality_not_supported.php', + 'ezcbaseinit' => '/init.php', + 'ezcbaseinitcallbackconfiguredexception' => '/exceptions/init_callback_configured.php', + 'ezcbaseinitinvalidcallbackclassexception' => '/exceptions/invalid_callback_class.php', + 'ezcbaseinvalidparentclassexception' => '/exceptions/invalid_parent_class.php', + 'ezcbasemetadata' => '/metadata.php', + 'ezcbasemetadatapearreader' => '/metadata/pear.php', + 'ezcbasemetadatatarballreader' => '/metadata/tarball.php', + 'ezcbaseoptions' => '/options.php', + 'ezcbasepersistable' => '/interfaces/persistable.php', + 'ezcbasepropertynotfoundexception' => '/exceptions/property_not_found.php', + 'ezcbasepropertypermissionexception' => '/exceptions/property_permission.php', + 'ezcbaserepositorydirectory' => '/structs/repository_directory.php', + 'ezcbasesettingnotfoundexception' => '/exceptions/setting_not_found.php', + 'ezcbasesettingvalueexception' => '/exceptions/setting_value.php', + 'ezcbasestruct' => '/struct.php', + 'ezcbasevalueexception' => '/exceptions/value.php', + 'ezcbasewhateverexception' => '/exceptions/whatever.php' + ); + } + $cn = strtolower($class); + if (isset($classes[$cn])) { + require __DIR__ . $classes[$cn]; + } + }, + true, + false +); +// @codeCoverageIgnoreEnd diff --git a/php-zetacomponents-base.spec b/php-zetacomponents-base.spec index 8099b75..5f0a368 100644 --- a/php-zetacomponents-base.spec +++ b/php-zetacomponents-base.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-zetacomponents-base # -# Copyright (c) 2015-2021 Remi Collet +# Copyright (c) 2015-2022 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -24,7 +24,7 @@ Name: php-%{gh_owner}-%{cname} Version: 1.9.3 -Release: 2%{?dist} +Release: 4%{?dist} Summary: Zeta Base Component Group: Development/Libraries @@ -41,7 +41,7 @@ BuildArch: noarch BuildRequires: %{_bindir}/phpab %endif %if %{with tests} -BuildRequires: phpunit8 +BuildRequires: phpunit9 BuildRequires: %{_bindir}/convert BuildRequires: php-composer(%{gh_owner}/unit-test) BuildRequires: php-posix @@ -106,9 +106,9 @@ EOF : Run test 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 %{_bindir}/phpunit8 || ret=1 + $cmd %{_bindir}/phpunit9 || ret=1 fi done exit $ret @@ -130,6 +130,9 @@ exit $ret %changelog +* Tue Jul 19 2022 Remi Collet - 1.9.3-4 +- switch to phpunit9 + * Mon Dec 6 2021 Remi Collet - 1.9.3-2 - disable test suite on EL - add autoloader from sources on EL -- cgit