0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-03-27 02:08:43 +00:00

added deprecation warnings

This commit is contained in:
Kevin Papst 2021-08-02 19:13:17 +02:00
parent 2648102110
commit 7b833130c3
2 changed files with 3 additions and 0 deletions

View file

@ -48,6 +48,8 @@ final class CurrentUser
return null;
}
@trigger_error('CurrentUser is deprecated and will be removed with 2.0, use DI or at worst Symfony\Component\Security\Core\Security instead', E_USER_DEPRECATED);
$this->user = $user;
return $this->user;

View file

@ -37,6 +37,7 @@ class UserDateTimeFactory extends DateTimeFactory
public function getTimezone(): DateTimeZone
{
if ($this->initializedFromUser === false) {
@trigger_error('UserDateTimeFactory is deprecated and will be removed with 2.0, use DateTimeFactory instead', E_USER_DEPRECATED);
$timezone = date_default_timezone_get();
$user = $this->user->getUser();