From 9ae7a23fbf22ccb954704d3438b87d4508d7b24a Mon Sep 17 00:00:00 2001 From: Ranjan Ghosh Date: Wed, 30 Jul 2025 14:05:46 +0200 Subject: [PATCH 1/3] PHP 8.4 changes --- src/Hyphenator/Cache/MemcachedCache.php | 4 ++-- src/Hyphenator/Core.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Hyphenator/Cache/MemcachedCache.php b/src/Hyphenator/Cache/MemcachedCache.php index c56edd7..98e2677 100644 --- a/src/Hyphenator/Cache/MemcachedCache.php +++ b/src/Hyphenator/Cache/MemcachedCache.php @@ -38,7 +38,7 @@ class MemcachedCache implements CacheInterface */ protected $connection = null; - public function __construct(\Memcache $connection = null) + public function __construct(?\Memcache $connection = null) { if (!extension_loaded('memcache')) { throw new MissingExtensionException('PHP extension memcache ist not loaded. You cannot use this cache.'); @@ -61,4 +61,4 @@ public function store($cacheKey, $data) { return $this->connection->set($cacheKey, $data); } -} \ No newline at end of file +} diff --git a/src/Hyphenator/Core.php b/src/Hyphenator/Core.php index 95f0f6b..e11d48d 100644 --- a/src/Hyphenator/Core.php +++ b/src/Hyphenator/Core.php @@ -105,7 +105,7 @@ class Core * @param null $patternsPath * @param Cache\CacheInterface $cache */ - public function __construct($patternsPath = null, CacheInterface $cache = null) + public function __construct($patternsPath = null, ?CacheInterface $cache = null) { if ($patternsPath) { $this->patternsPath = realpath($patternsPath); From b3394616b9ca25d7360c23d7faf3b81ed7b63e0b Mon Sep 17 00:00:00 2001 From: Ranjan Ghosh Date: Wed, 30 Jul 2025 14:12:50 +0200 Subject: [PATCH 2/3] Change composer.json to new composer repository --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 394724f..941ee2a 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name":"typearea/hyphenator", + "name":"pw6/hyphenator", "type":"library", "description":"Hyphenator is a cache-enabled PHP port of the JavaScript Hyphenator.js by Mathias Nater, and this is a bugfix fork of github.com/webrocker/hyphenator", "keywords":["hyphenator", "hyphenation", "hyphenate"], From 941618c918b33e0695ecc0b3d7f05d0a2c615d45 Mon Sep 17 00:00:00 2001 From: Ranjan Ghosh Date: Wed, 30 Jul 2025 14:15:50 +0200 Subject: [PATCH 3/3] Fix license for Composer --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 941ee2a..04aa2ed 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description":"Hyphenator is a cache-enabled PHP port of the JavaScript Hyphenator.js by Mathias Nater, and this is a bugfix fork of github.com/webrocker/hyphenator", "keywords":["hyphenator", "hyphenation", "hyphenate"], "homepage":"https://github.com/typearea/hyphenator", - "license":"New BSD", + "license":"BSD-3-Clause", "authors":[ { "name":"Marco Fischer",