A construction of new Month used int $day as parameter and now has Day $day. Replace all instances where you used the default constructor.
Use the full class string in the doctrine column type instead of the custom names.
Before:
<?php
declare(strict_types=1);
namespace App\Entity;
use DigitalCraftsman\DateTimePrecision\Moment;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity()]
#[ORM\Table(name: 'facility')]
class Facility
{
...
/** @psalm-readonly */
#[ORM\Column(name: 'created_at', type: 'dtp_moment')]
public Moment $createdAt;
#[ORM\Column(name: 'updated_at', type: 'dtp_moment')]
public Moment $updatedAt;
...After:
<?php
declare(strict_types=1);
namespace App\Entity;
use DigitalCraftsman\DateTimePrecision\Moment;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity()]
#[ORM\Table(name: 'facility')]
class Facility
{
...
/** @psalm-readonly */
#[ORM\Column(name: 'created_at', type: Moment::class)]
public Moment $createdAt;
#[ORM\Column(name: 'updated_at', type: Moment::class)]
public Moment $updatedAt;
...Update to at least PHP 8.4.
Update to at least the LTS version 7.4.
The isDate* methods have all been removed and should be replaced with is*InTimeZone methods.
The custom normalizers have been dropped in favor of digital-craftsman/self-aware-normalizers. If you constructed or injected them somewhere manually, you need to replace them with the StringNormalizableNormalizer or IntNormalizableNormalizer. Otherwise, there is nothing to do, as they are registered automatically like the previous ones did.
Support for PHP 8.2 was dropped, so you have to upgrade to at least PHP 8.3.
No breaking changes (just deprecations).
Support for Symfony 6.3 was dropped, so you have to upgrade to at least Symfony 6.4. You can also immediately upgrade to Symfony 7.
Support for PHP 8.1 was dropped, so you have to upgrade to at least PHP 8.2.
Support for Symfony below 6.3 was dropped, so you have to upgrade to at least Symfony 6.3. This is the only way to prevent deprecations from being thrown for the cachable support.
Instances of DateTime can now only be created in the UTC timezone. This is independent on the configured default timezone in PHP. If you're relying on the another configured timezone, you ether need to specifically set the timezone yourself or use UTC. This is the expected use case.
Renamed package from digital-craftsman/datetime-parts to digital-craftsman/date-time-precision. Update your composer.json accordingly.
Renamed DateTime to Moment including normalizer and Doctrine type. Replace all usages of DateTime with Moment.
When using MomentType, you need to migrate the database column to support milliseconds.
No breaking changes.
No breaking changes.
You can remove YearNormalizer from your normalizers if you registered it manually.
No breaking changes.
$monthOfYearwas renamed to$monthinMonth.$dayOfMonthwas renamed to$dayinDate.
You need to rename those variables if you accessed them directly.
Before:
if ($month->monthOfYear === 1) {
...
}
if ($date->dayOfMonth === 15) {
...
}After:
if ($month->month === 1) {
...
}
if ($date->day === 15) {
...
}No breaking changes.