diff --git a/.gitignore b/.gitignore index 95ab1d9a..dcbee11a 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,7 @@ run-tests.log /phpstan.neon # PHPStan cache directory /.phpstan.cache/ + +# Added by horde-components QC --fix-qc-issues +# Local PHP configuration files +**/*.local.php diff --git a/.horde.yml b/.horde.yml index 321bf5fe..5f4d28bb 100644 --- a/.horde.yml +++ b/.horde.yml @@ -34,7 +34,7 @@ authors: active: false role: developer version: - release: 3.0.0-beta3 + release: 3.0.0-beta4 api: 3.0.0alpha1 state: release: beta @@ -87,7 +87,6 @@ dependencies: horde/url: ^3 horde/util: ^3 horde/view: ^3 - pear/pear: '*' php81_bc/strftime: ^0.7 ext: session: '*' diff --git a/composer.json b/composer.json index 039cf798..7a7d5547 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "role": "developer" } ], - "time": "2026-03-07", + "time": "2026-03-12", "repositories": [], "require": { "horde/horde-installer-plugin": "dev-FRAMEWORK_6_0 || ^3 || ^2", @@ -72,7 +72,6 @@ "horde/url": "^3 || dev-FRAMEWORK_6_0", "horde/util": "^3 || dev-FRAMEWORK_6_0", "horde/view": "^3 || dev-FRAMEWORK_6_0", - "pear/pear": "*", "php81_bc/strftime": "^0.7", "ext-session": "*" }, @@ -83,6 +82,7 @@ "horde/vfs": "^3 || dev-FRAMEWORK_6_0" }, "suggest": { + "mikepultz/netdns2": "For DNS resolver functionality (replaces pear/net_dns2)", "pear/text_captcha": "*", "pear/text_figlet": "*", "ext-dom": "*", @@ -104,14 +104,11 @@ } }, "config": { - "allow-plugins": { - "horde/horde-installer-plugin": true - } + "allow-plugins": {} }, "extra": { "branch-alias": { "dev-FRAMEWORK_6_0": "3.x-dev" } - }, - "minimum-stability": "dev" -} + } +} \ No newline at end of file diff --git a/doc/changelog.yml b/doc/changelog.yml index a27d9100..fa82cdb8 100644 --- a/doc/changelog.yml +++ b/doc/changelog.yml @@ -1,4 +1,31 @@ --- +3.0.0-beta4: + api: 3.0.0-beta4 + state: + release: beta + api: beta + date: 2026-03-12 + license: + identifier: LGPL-2.1-only + uri: https://spdx.org/licenses/LGPL-2.1-only.html + notes: |- + fix(controller): inject PSR-7 factories instead of using service locator + feat(controller): ResponsiveControllerTrait and PSR-7 URI use + fix(activesync): update getSearchResults() to use Search_Params/Results objects and fix several bugs + fix(smartmobile): use clone instead of copy() to preserve base URL + refactor(activesync): unify search caching, flatten result structure (#57) + fix composer.json plugin settings + refactor(routes): migrate to modern PSR-4 Horde\Routes\Mapper + test(rampage): add routing unit and integration tests + fix(config): allow empty config array in State constructor + feat(smartmobile): accept string URLs for convenience + refactor(smartmobile): extend modern Horde\Url\Url directly + feat(registry): add resolve_hostnames setting to skip DNS lookups + fix(smartmobile): use clone instead of copy() to preserve base URL + feat: Move logger configuration to a single place for both PSR-3 and traditional logger. Allows step by step migration without breaking changes. + fix: responsive assets should be loaded from default theme if the user selected theme doesn't have them. Degrade to a sane default. + Merge pull request #55 from amulet1/activesync_search_mailbox + refactor(ActiveSync): clean up cache handling in getSearchResults 3.0.0-beta3: api: 3.0.0-beta3 state: diff --git a/lib/Horde/Core/Bundle.php b/lib/Horde/Core/Bundle.php index 66be383a..9433210e 100644 --- a/lib/Horde/Core/Bundle.php +++ b/lib/Horde/Core/Bundle.php @@ -23,20 +23,12 @@ abstract class Horde_Core_Bundle */ protected $_config; - /** - * Path to the PEAR configuration file. - * - * @var string - */ - protected $_pearconf; - /** * Constructor. */ - public function __construct(Horde_Core_Cli $cli, $pearconf = null) + public function __construct(Horde_Core_Cli $cli) { $this->_cli = $cli; - $this->_pearconf = $pearconf; } /** @@ -95,7 +87,7 @@ public function migrateDb() $this->_cli->writeln(); echo 'Creating and updating database tables...'; - $migration = new Horde_Core_Db_Migration(null, $this->_pearconf); + $migration = new Horde_Core_Db_Migration(); // Try twice to work around unresolved migration dependencies. for ($i = 0; $i < 2; $i++) { diff --git a/lib/Horde/Core/Db/Migration.php b/lib/Horde/Core/Db/Migration.php index b2587d41..38b7d992 100644 --- a/lib/Horde/Core/Db/Migration.php +++ b/lib/Horde/Core/Db/Migration.php @@ -47,9 +47,8 @@ class Horde_Core_Db_Migration * directories and builds lists of migrateable modules and directories. * * @param string $basedir Base directory of all Git checkouts. - * @param string $pearconf Path to a PEAR configuration file. */ - public function __construct($basedir = null, $pearconf = null) + public function __construct($basedir = null) { // Loop through all applications. foreach ($GLOBALS['registry']->listAllApps() as $app) { @@ -61,11 +60,6 @@ public function __construct($basedir = null, $pearconf = null) } } - // Silence PEAR errors. - $old_error_reporting = error_reporting(); - error_reporting($old_error_reporting & ~E_DEPRECATED); - $pear = new PEAR_Config($pearconf); - // Detect and handle the Composer use case if (class_exists('Composer\Autoload\ClassLoader', false)) { /* @@ -134,27 +128,6 @@ public function __construct($basedir = null, $pearconf = null) $this->dirs[] = realpath($dir); } } - - // Loop through installed PEAR packages. - $registry = $pear->getRegistry(); - foreach (glob($pear->get('data_dir') . '/*/migration') as $dir) { - $package = $registry->getPackage( - basename(dirname($dir)), - 'pear.horde.org' - ); - if ($package == false) { - Horde::log("Ignoring package in directory $dir", Horde_Log::WARN); - continue; - } - - $app = $package->getName(); - if (!in_array($app, $this->apps)) { - $this->apps[] = $app; - $this->_lower[] = Horde_String::lower($app); - $this->dirs[] = realpath($dir); - } - } - error_reporting($old_error_reporting); } /** diff --git a/lib/Horde/Core/Factory/DbPear.php b/lib/Horde/Core/Factory/DbPear.php deleted file mode 100644 index 03716617..00000000 --- a/lib/Horde/Core/Factory/DbPear.php +++ /dev/null @@ -1,103 +0,0 @@ - - * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 - */ - -/** - * A Horde_Injector:: based factory for creating PEAR DB objects.. - * - * Copyright 2010-2017 Horde LLC (http://www.horde.org/) - * - * See the enclosed file LICENSE for license information (LGPL). If you - * did not receive this file, see http://www.horde.org/licenses/lgpl21. - * - * @category Horde - * @package Core - * @author Michael Slusarz - * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 - */ -class Horde_Core_Factory_DbPear extends Horde_Core_Factory_Base -{ - /** - * Instances. - * - * @var array - */ - private $_instances = []; - - /** - * Return the DB instance. - * - * @param string $type Either 'read' or 'rw'. - * @param string $app The application. - * @param mixed $dtype The type. If this is an array, this is used as - * the configuration array. - * - * @return DB The singleton DB instance. - * @throws Horde_Exception - */ - public function create($type = 'rw', $app = 'horde', $dtype = null) - { - global $registry; - - $sig = hash('sha1', serialize($type . '|' . $app . '|' . $dtype)); - - if (isset($this->_instances[$sig])) { - return $this->_instances[$sig]; - } - - $pushed = ($app == 'horde') - ? false - : $registry->pushApp($app); - - $config = is_array($dtype) - ? $dtype - : $this->getConfig($dtype); - - if ($type == 'read' && !empty($config['splitread'])) { - $config = array_merge($config, $config['read']); - } - - Horde::assertDriverConfig($config, 'sql', ['charset', 'phptype']); - - /* Connect to the SQL server using the supplied parameters. */ - $db = DB::connect($config, [ - 'persistent' => !empty($config['persistent']), - 'ssl' => !empty($config['ssl']), - ]); - - if ($db instanceof PEAR_Error) { - if ($pushed) { - $registry->popApp(); - } - throw new Horde_Exception($db); - } - - // Set DB portability options. - $db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS); - - if ($pushed) { - $registry->popApp(); - } - - $this->_instances[$sig] = $db; - - return $db; - } - - /** - */ - public function getConfig($type) - { - return Horde::getDriverConfig($type, 'sql'); - } - -} diff --git a/lib/Horde/Core/Factory/Dns.php b/lib/Horde/Core/Factory/Dns.php index d68b0415..a80fdef6 100644 --- a/lib/Horde/Core/Factory/Dns.php +++ b/lib/Horde/Core/Factory/Dns.php @@ -1,5 +1,8 @@ setServers('/etc/resolv.conf'); - } catch (Net_DNS2_Exception $e) { + } catch (DnsException $e) { } }