@@ -86,18 +86,10 @@ protected static function extract($key)
8686
8787 if (\count ($ parts ) === 3 )
8888 {
89- try
90- {
91- Log::add (
92- 'Support for a three segment service key is deprecated and will be removed in Joomla 5.0, use the service registry instead ' ,
93- Log::WARNING ,
94- 'deprecated '
95- );
96- }
97- catch (\RuntimeException $ exception )
98- {
99- // Informational message only, continue on
100- }
89+ @trigger_error (
90+ 'Support for a three segment service key is deprecated and will be removed in Joomla 5.0, use the service registry instead ' ,
91+ E_USER_DEPRECATED
92+ );
10193 }
10294
10395 $ prefix = \count ($ parts ) === 3 ? array_shift ($ parts ) : 'JHtml ' ;
@@ -207,18 +199,10 @@ final public static function _(string $key, ...$methodArgs)
207199 */
208200 public static function register ($ key , callable $ function )
209201 {
210- try
211- {
212- Log::add (
213- 'Support for registering functions is deprecated and will be removed in Joomla 5.0, use the service registry instead ' ,
214- Log::WARNING ,
215- 'deprecated '
216- );
217- }
218- catch (\RuntimeException $ exception )
219- {
220- // Informational message only, continue on
221- }
202+ @trigger_error (
203+ 'Support for registering functions is deprecated and will be removed in Joomla 5.0, use the service registry instead ' ,
204+ E_USER_DEPRECATED
205+ );
222206
223207 list ($ key ) = static ::extract ($ key );
224208
@@ -239,18 +223,10 @@ public static function register($key, callable $function)
239223 */
240224 public static function unregister ($ key )
241225 {
242- try
243- {
244- Log::add (
245- 'Support for registering functions is deprecated and will be removed in Joomla 5.0, use the service registry instead ' ,
246- Log::WARNING ,
247- 'deprecated '
248- );
249- }
250- catch (\RuntimeException $ exception )
251- {
252- // Informational message only, continue on
253- }
226+ @trigger_error (
227+ 'Support for registering functions is deprecated and will be removed in Joomla 5.0, use the service registry instead ' ,
228+ E_USER_DEPRECATED
229+ );
254230
255231 list ($ key ) = static ::extract ($ key );
256232
@@ -1220,18 +1196,10 @@ public static function calendar($value, $name, $id, $format = '%Y-%m-%d', $attri
12201196 */
12211197 public static function addIncludePath ($ path = '' )
12221198 {
1223- try
1224- {
1225- Log::add (
1226- 'Support for registering lookup paths is deprecated and will be removed in Joomla 5.0, use the service registry instead ' ,
1227- Log::WARNING ,
1228- 'deprecated '
1229- );
1230- }
1231- catch (\RuntimeException $ exception )
1232- {
1233- // Informational message only, continue on
1234- }
1199+ @trigger_error (
1200+ 'Support for registering lookup paths is deprecated and will be removed in Joomla 5.0, use the service registry instead ' ,
1201+ E_USER_DEPRECATED
1202+ );
12351203
12361204 // Loop through the path directories
12371205 foreach ((array ) $ path as $ dir )
0 commit comments