a tiny mvc framework for php using php-activerecord
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Proper deprecation usage: E_USER_DEPRECATED and @deprecated tags.

+7 -7
+4 -4
lib/php-activerecord/lib/Config.php
··· 263 263 } 264 264 265 265 /** 266 - * DEPRECATED 266 + * @deprecated 267 267 */ 268 268 public function get_date_format() 269 269 { 270 - error_log('DEPRECATION WARNING: Config::get_date_format() has been deprecated and will be removed in a future version. Please ActiveRecord\Serialization::$DATETIME_FORMAT instead.'); 270 + trigger_error('Use ActiveRecord\Serialization::$DATETIME_FORMAT. Config::get_date_format() has been deprecated.', E_USER_DEPRECATED); 271 271 return Serialization::$DATETIME_FORMAT; 272 272 } 273 273 274 274 /** 275 - * DEPRECATED 275 + * @deprecated 276 276 */ 277 277 public function set_date_format($format) 278 278 { 279 - error_log('DEPRECATION WARNING: Config::set_date_format() has been deprecated and will be removed in a future version. Please use ActiveRecord\Serialization::$DATETIME_FORMAT instead.'); 279 + trigger_error('Use ActiveRecord\Serialization::$DATETIME_FORMAT. Config::set_date_format() has been deprecated.', E_USER_DEPRECATED); 280 280 Serialization::$DATETIME_FORMAT = $format; 281 281 } 282 282
+3 -3
lib/php-activerecord/lib/Table.php
··· 538 538 } 539 539 540 540 /** 541 - * DEPRECATED: Model.php now checks for get|set_ methods via method_exists so there is no need for declaring static g|setters. 541 + * @deprecated Model.php now checks for get|set_ methods via method_exists so there is no need for declaring static g|setters. 542 542 */ 543 543 private function set_setters_and_getters() 544 544 { ··· 546 546 $setters = $this->class->getStaticPropertyValue('setters', array()); 547 547 548 548 if (!empty($getters) || !empty($setters)) 549 - error_log('DEPRECATION WARNING: static::$getters and static::$setters is deprecated and will be removed in a future version. Please define your setters and getters by declaring methods in your model prefixed with get_ or set_. See 550 - http://www.phpactiverecord.org/projects/main/wiki/Utilities#attribute-setters and http://www.phpactiverecord.org/projects/main/wiki/Utilities#attribute-getters on how to make use of this option.'); 549 + trigger_error('static::$getters and static::$setters are deprecated. Please define your setters and getters by declaring methods in your model prefixed with get_ or set_. See 550 + http://www.phpactiverecord.org/projects/main/wiki/Utilities#attribute-setters and http://www.phpactiverecord.org/projects/main/wiki/Utilities#attribute-getters on how to make use of this option.', E_USER_DEPRECATED); 551 551 } 552 552 }; 553 553 ?>