[commits] Nls branch master updated. b4d8cef0980bcdf0ec3dda427e4bf708645112a4

Michael J. Rubinsky mrubinsk at horde.org
Sun Nov 6 18:56:58 UTC 2022


The branch "master" has been updated.
The following is a summary of the commits.

from: e1eaadb3ac4d9e486ece7fef48698874dc193aa7

c6b75f3 Add a loader for the non-classed items
b4d8cef Merge pull request #1 from maintaina-com/pr-autoload-issue

Summary: https://github.com/horde/Nls/compare/e1eaadb3ac4d...b4d8cef0980b

-----------------------------------------------------------------------

commit c6b75f3fb91b729184a904131caf29a85c410228
Author: Ralf Lang <lang at b1-systems.de>
Date:   Thu, 11 Mar 2021 17:36:13 +0000

Add a loader for the non-classed items

Some parts in turba, forms and most likely some other apps try to load nls data arrays through relative autoload paths. this works in PEAR but not in composer or other autoload scenarios. The loader is an autoloadable item which, in turn, has a stable relative path to the data files.

This change is backward compatible, untouched code will not break (if it worked before).

The suggested idiom to use the loader is:

        /* Countries */
        if (class_exists(\Horde_Nls_Loader::class)) {
            $countries = \Horde_Nls_Loader::loadCountries();
        } else {
            include 'Horde/Nls/Countries.php';
        }

This will work both with older NLS libraries or with scenarios where the class cannot be autoloaded, provided that the include path works (backward compat).

 A lib/Horde/Nls/Loader.php

https://github.com/horde/Nls/commit/c6b75f3fb91b729184a904131caf29a85c410228

-----------------------------------------------------------------------

commit b4d8cef0980bcdf0ec3dda427e4bf708645112a4
Author: Michael J Rubinsky <mrubinsk at horde.org>
Date:   Sun, 06 Nov 2022 13:56:56 -0500

Merge pull request #1 from maintaina-com/pr-autoload-issue

Add a loader for the non-classed items

 A lib/Horde/Nls/Loader.php

https://github.com/horde/Nls/commit/b4d8cef0980bcdf0ec3dda427e4bf708645112a4


More information about the commits mailing list