@@ -159,11 +159,6 @@ public function exceptionHandler(Throwable $exception)
159159 public function errorHandler (int $ severity , string $ message , ?string $ file = null , ?int $ line = null )
160160 {
161161 if ($ this ->isDeprecationError ($ severity )) {
162- // @TODO Remove if Faker is fixed.
163- if ($ this ->isFakerDeprecationError ($ message , $ file , $ line )) {
164- return true ;
165- }
166-
167162 if (! $ this ->config ->logDeprecations || (bool ) env ('CODEIGNITER_SCREAM_DEPRECATIONS ' )) {
168163 throw new ErrorException ($ message , 0 , $ severity , $ file , $ line );
169164 }
@@ -178,34 +173,6 @@ public function errorHandler(int $severity, string $message, ?string $file = nul
178173 return false ; // return false to propagate the error to PHP standard error handler
179174 }
180175
181- /**
182- * Workaround for Faker deprecation errors in PHP 8.2.
183- *
184- * @see https://github.com/FakerPHP/Faker/issues/479
185- */
186- private function isFakerDeprecationError (string $ message , ?string $ file = null , ?int $ line = null )
187- {
188- if (
189- defined ('VENDORPATH ' )
190- && strpos ($ file , VENDORPATH . 'fakerphp/faker/ ' ) !== false
191- && $ message === 'Use of "static" in callables is deprecated '
192- ) {
193- log_message (
194- LogLevel::WARNING ,
195- '[DEPRECATED] {message} in {errFile} on line {errLine}. ' ,
196- [
197- 'message ' => $ message ,
198- 'errFile ' => clean_path ($ file ?? '' ),
199- 'errLine ' => $ line ?? 0 ,
200- ]
201- );
202-
203- return true ;
204- }
205-
206- return false ;
207- }
208-
209176 /**
210177 * Checks to see if any errors have happened during shutdown that
211178 * need to be caught and handle them.
0 commit comments