Skip to content

Commit ab63adb

Browse files
committed
minor #50297 Remove unnecessary usages of DateTime (nicolas-grekas)
This PR was merged into the 6.4 branch. Discussion ---------- Remove unnecessary usages of DateTime | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Part of #47580 | License | MIT | Doc PR | - Together with #50290, this PR removes `DateTime` everywhere possible. What remains is: - test cases that test both DateTime and DateTimeImmutable - legit to keep - date/time form-types and transformers in the Form component - we'd need a separate effort for them, related to #50295 - `PersistentTokenInterface::getLastUsed(): \DateTime` - separate effort also Commits ------- 8b08294b63 Remove unnecessary usages of DateTime
2 parents 295a294 + ab05a90 commit ab63adb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Command/AboutCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8080
['Version', \PHP_VERSION],
8181
['Architecture', (\PHP_INT_SIZE * 8).' bits'],
8282
['Intl locale', class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a'],
83-
['Timezone', date_default_timezone_get().' (<comment>'.(new \DateTime())->format(\DateTime::W3C).'</>)'],
83+
['Timezone', date_default_timezone_get().' (<comment>'.(new \DateTimeImmutable())->format(\DateTimeInterface::W3C).'</>)'],
8484
['OPcache', \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL) ? 'true' : 'false'],
8585
['APCu', \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL) ? 'true' : 'false'],
8686
['Xdebug', \extension_loaded('xdebug') ? 'true' : 'false'],

0 commit comments

Comments
 (0)