vasekpurchart / doctrine-date-time-immutable-types Goto Github PK
View Code? Open in Web Editor NEWDoctrine DBAL DateTimeImmutable types
License: Other
Doctrine DBAL DateTimeImmutable types
License: Other
without adding the following an exception is still thrown
// src/DateImmutableType.php
/**
* {@inheritdoc}
*/
public function convertToDatabaseValue($value, AbstractPlatform $platform)
{
if (null === $value) {
return $value;
}
if ($value instanceof DateTimeImmutable) {
return $value->format($platform->getDateTimeFormatString());
}
throw ConversionException::conversionFailedInvalidType($value, $this->getName(), ['null', 'DateTimeImmutable']);
}
doctrine/dbal
2.6 has now been released and includes all types in this package. It's probably worth adding a note to the start of the README to let people know.
Bearing in mind doctrine/dbal
2.6 requires PHP 7.1, it's worth keeping this package available for users who can't upgrade yet.
I'm not sure why but every time we create a diff using doctrine migrations al the fields with datetime_immutable
are being changed and updated. I don't know why this i'm hopping somebody know's how to fix this.
ConversionException in ConversionException.php line 95:
Could not convert PHP value of type 'DateTimeImmutable' to type 'datetime'. Expected one of the following types: null, DateTime
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.