Skip to content

fix: make Time immutable #6771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,159 changes: 2 additions & 1,157 deletions system/I18n/Time.php

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions system/I18n/TimeLegacy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

/**
* This file is part of CodeIgniter 4 framework.
*
* (c) CodeIgniter Foundation <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\I18n;

use DateTime;

/**
* Legacy Time class.
*
* This class is only for backward compatibility. Do not use.
* This is not immutable! Some methods are immutable,
* but some methods can alter the state.
*
* @property string $date
*
* @deprecated Use Time instead.
*/
class TimeLegacy extends DateTime
{
use TimeTrait;
}
Loading