v2.2.0
------

* Feat: Add `Bdf\Prime\Connection\Middleware\LoggerMiddleware` to log queries using new middleware system
* Change: Mark `Bdf\Prime\Logger\PsrLogger` as deprecated. Use `Bdf\Prime\Connection\Middleware\LoggerMiddleware` instead.
* Change: `Bdf\Prime\Configuration` now store the connection name, which is set by connection factory.
* Change: `Bdf\Prime\Configuration::getMiddleware()` will set the configuration instance if the middleware implements `ConfigurationAwareMiddlewareInterface`
* Change: Allow usage of ExpressionInterface on :
    * `ReadCommandInterface::inRows()`
    * `ReadCommandInterface::inRow()`
    * `Whereable::where()` on first parameter (column)
    * `Whereable::orWhere()` on first parameter (column)
    * `Whereable::whereNull()`
    * `Whereable::whereNotNull()`
* Change: Allow usage of entity class name to resolve relations, instead of relation name
* Feat: Add `Bdf\Prime\Platform\PlatformSpecificOperationInterface` and `PlatformInterface::apply()` to allow changing the behavior on the platform
* Change: Rework visitors to remove the use of deprecated doctrine visitor API

BC Breaks
* Change: `Bdf\Prime\Configuration` instances are not shared anymore between connections. So change of the default configuration during runtime will not affect already created connections.
* Change: `Bdf\Prime\Query/Expression/Raw::__toString()` is now deprecated, and its constructor value will be cast to string.
* Minimum version of doctrine/dbal is now 3.7
* Deprecate: `Bdf\Prime\Platform\PlatformInterface::name()`. Use `PlatformInterface::apply()` instead.
* Deprecate: `Bdf\Prime\Connection\ConnectionInterface::getEventManager()` and `Bdf\Prime\Connection\Event\ConnectionClosedListenerInterface`. Use `ConnectionInterface::addConnectionClosedListener()` and `ConnectionInterface::removeConnectionClosedListener()` instead.
* Change: `Doctrine\DBAL\Schema\Column::getPlatformOptions()`/`setPlatformOptions()` is used instead of `getCustomSchemaOptions()`/`setCustomSchemaOptions()`, which can cause change on migration queries.

v2.1.0
------

* Feat: Declare or override platform types using `Bdf\Prime\Configuration::addPlatformType()`
* Change: EntityGenerator algorithm has changed : now it do not imports class from current namespace and reformat class on update
* Feat: Handle by() with combine option on walker with KeyWalkStrategy
* Feat: Instantiate the mapper using PSR-11 container
    * Add `Bdf\Prime\Mapper\MapperFactoryInterface` and used it on typehint instead of the implementation `Bdf\Prime\Mapper\MapperFactory`
    * Add `Bdf\Prime\Mapper\ContainerMapperFactory` to use the PSR-11 container as mapper factory
    * Change: method `Mapper::build()` must be called after the mapper has been instantiated to finish the initialization.
      This allows to configure the mapper outside of the constructor. Other parameters than ServiceLocator of the constructor are now deprecated and optional.
* Change: Fill relation entity with constraints
    * Affect methods `RelationInterface::create()`, `RelationInterface::add()`, `RelationInterface::saveAll()`
* Feat: Generate custom criteria for entity
    * Add `Bdf\Prime\Mapper\Mapper::criteria()` to instantiate the criteria, and `Bdf\Prime\Mapper\Mapper::setCriteriaClass()` for define the custom criteria class
    * By default, the used criteria class is the entity class with suffix `Criteria`, or `Bdf\Prime\Criteria\Criteria` if not found
    * Add `prime:criteria` command to generate the criteria class from the entity file
    * The generated criteria will provide a setter for each property of the entity, and filters
* Change: `Clause::buildClause()`, and all related methods like `Wherable::where()` now handle iterable expression parameters.
  This change allows to use the `Criteria` as parameter of the where clause without the need to call `Criteria::all()`
* Feat: Add `Bdf\Prime\Query\Expression\Operator` to wrap the operator and the value as expression. So it can be used in on criteria setters
* Feat: Add `Clause::replaceClause()` and `Wherable::replaceWhere()` to replace a single filter value. Method `Wherable::replaceWhere()` is commented for now to avoid BC break.
* Change: Declaring two fields with the same alias is now forbidden
* Feat: Add PHP 8 attributes to configure Mapper
    * `Bdf\Prime\Mapper\Attribute\CriteriaClass` to replace `Mapper::setCriteriaClass()`
    * `Bdf\Prime\Mapper\Attribute\DisableSchemaManager` to replace `Mapper::disableSchemaManager()`
    * `Bdf\Prime\Mapper\Attribute\DisableWrite` to replace `Mapper::setReadOnly()`
    * `Bdf\Prime\Mapper\Attribute\RepositoryClass` to replace `Mapper::setRepositoryClass()`
    * `Bdf\Prime\Mapper\Attribute\UseQuoteIdentifier` to replace `Mapper::setQuoteIdentifier()`
    * `Bdf\Prime\Mapper\Attribute\Filter` to replace overrides of `Mapper::filters()`
    * `Bdf\Prime\Mapper\Attribute\RepositoryMethod` to replace overrides of `Mapper::queries()`
    * `Bdf\Prime\Mapper\Attribute\Scope` to replace overrides of `Mapper::scopes()`
* Feat: Flag for disallowing the use of unknown attributes on query
    * Add `Bdf\Prime\Mapper\Mapper::setAllowUnknownAttribute()` / `Bdf\Prime\Mapper\Mapper::allowUnknownAttribute()` for define the flag on the entity
    * Add `Bdf\Prime\Query\CompilableClauseInterface::allowUnknownAttribute()` / `Bdf\Prime\Query\Contract\ReadOperation::isAllowUnknownAttribute()` for define the flag on the query
    * AliasResolver and OrmPreprocessor now use the flag to allow or not the use of unknown attributes
    * By default the flag is null, which will raise a deprecation warning, but allow usage of undefined attributes. The default value will be false in next major version.

v2.0.8
------

* Fix: Raw SQL expression are disabled on Query::get()/getOrFail()/getOrNew()
* Fix: Raw SQL expression on where() must be wrapped into ExpressionInterface object. Use whereRaw() to use string as raw expression.

v2.0.6
------

* Change: Compatibility with doctrine/instantiator v2.0

v2.0.0
------

* Feat: Upgrade to Doctrine 3.
* Feat: Add helper methods `isRead`, `isWrite`, `hasWrite` on `ResultSetInterface`
* Feat: Add "fetch mode" `asXXX` methods instead of generalist `fetchMode` method on `ResultSetInterface`
* Feat: Add executed query on execution exception (cd: `QueryExecutionException`)
* Feat: New schema management system
* Change: rename schema resolver to structure upgrader :
    * ResolverInterface -> StructureUpgraderInterface
    * NullResolver -> NullStructureUpgrader
    * Resolver -> RepositoryUpgrader

BC Breaks
* Change: PHP minimal version set to 7.4.
* Change: `Bdf\Prime\Query\Contract\Query\InsertQueryInterface` now implements `CommandInterface` and `BulkWriteBuilderInterface`
* Change: `Bdf\Prime\Query\Contract\CommandInterface` now implements `SelfExecutable`
* Change signature of `Bdf\Prime\Query\AbstractReadCommand#postProcessResult()` : $data is now type of `Bdf\Prime\Connection\Result\ResultSetInterface`
* The return type of `Bdf\Prime\Query\CommandInterface#execute()` changed from array to `Bdf\Prime\Connection\Result\ResultSetInterface`
* The return type of `Bdf\Prime\Query\Contract\Query\InsertQueryInterface#execute()` changed from int to `Bdf\Prime\Connection\Result\ResultSetInterface`
* Add typehint on signatures :
    * The return type of Bdf\Prime\Connection\ConnectionInterface#select() changed from no type to Bdf\Prime\Connection\Result\ResultSetInterface
    * The return type of Bdf\Prime\Connection\ConnectionInterface#execute() changed from no type to Bdf\Prime\Connection\Result\ResultSetInterface
    * The return type of Bdf\Prime\Connection\Result\ResultSetInterface#all() changed from no type to array
    * The return type of Bdf\Prime\Connection\Result\ResultSetInterface#count() changed from no type to int
    * The parameter $forEach of Bdf\Prime\Query\ReadCommandInterface#post() changed from no type to bool
    * The parameter $statement of Bdf\Prime\Connection\SimpleConnection#prepare() changed from no type to string
    * The return type of Bdf\Prime\Connection\SimpleConnection#executeUpdate() changed from no type to int
    * The parameter $sql of Bdf\Prime\Connection\SimpleConnection#executeUpdate() changed from no type to string
    * The return type of Bdf\Prime\Connection\SimpleConnection#query() changed from no type to Doctrine\DBAL\Result
    * The return type of Bdf\Prime\Connection\SimpleConnection#exec() changed from no type to int
    * The parameter $statement of Bdf\Prime\Connection\SimpleConnection#exec() changed from no type to string
* Remove exception `Bdf\Prime\Exception\QueryException`, and split into 2 others : `QueryBuildingException` and `QueryExecutionException`
* Class `Bdf\Prime\Sharding\MultiStatement` has been renamed to `Bdf\Prime\Sharding\MultiResult`
* Class `Bdf\Prime\Connection\Result\PdoResultSet` has been renamed to `Bdf\Prime\Connection\Result\DoctrineResultSet`
* Remove methods in `Doctrine\DBAL\SimpleConnection` :
    * getHost()
    * getPort()
    * getUsername()
    * getPassword()
    * setFetchMode()
    * fetchAssoc()
    * fetchArray()
    * fetchColumn()
    * fetchAll()
    * project()
    * errorCode()
    * errorInfo()
    * ping()
* Class `Bdf\Prime\Query\CacheStatement` has been deleted. Use `Doctrine\DBAL\Cache\ArrayResult` instead
* Class `Bdf\Prime\Query\Expression\Match` has been deleted. Use `Bdf\Prime\Query\Expression\FullTextMatch` instead
* Remove method `Bdf\Prime\ConnectionManager::connection()`. Use getConnection instead
* Remove method `Bdf\Prime\Query\CommandInterface::setCompiler()`
* Change return type of `Bdf\Prime\Query\CommandInterface::compiler()` to object
* Change type of parameter $compiler of method `Bdf\Prime\Query\Expression\ExpressionInterface::build()` to object
* Change type of parameter $compiler of method `Bdf\Prime\Query\Expression\ExpressionTransformerInterface::setContext()` to object
* Typehint return of methods of `\Bdf\Prime\Migration\MigrationInterface`
* Typehint return of methods of `\Bdf\Prime\Mapper\Mapper`
* Change typehints of methods of `\Bdf\Prime\Entry\Hydrator` interfaces. Hydrators must be regenerated.
* Remove $types parameter of `Bdf\Prime\Connection\ConnectionInterface::select()`
* Add void return type hint on `Bdf\Prime\Entity\InitializableInterface::initialize()`
* Change signature of `Bdf\Prime\Query\SqlQueryInterface::group()` / `addGroup()` : disallow array
* Delete method `Bdf\Prime\Query\SqlQueryInterface::raw()`. Use `new Raw()` instead
* Add typehint on return of methods of `Bdf\Prime\Types\TypeInterface`.
* Typehint defaultValue parameter of `Bdf\Prime\Types\TypesHelperInterface` of methods :
    * simpleArray() - use array instead of string
    * arrayObject() - use array instead of string
    * searchableArray() - use array instead of string
    * arrayOfXXX() - use array instead of string
* Change compiler types on `Bdf\Prime\Query\Factory\QueryFactoryInterface` to object
* Add methods `add()`, `has()`, `load()` and `diff()` on `SchemaManagerInterface`
* Typehint on parameters and return value of `Bdf\Prime\Entity\Model::loadSerializerMetadata()`
* Typehint on parameters of methods of `Bdf\Prime\Entity\Model`
* Parameter 0 of Bdf\Prime\Schema\Manager\TableManagerInterface#add() changed name from $table to $structure, without type
* Method Bdf\Prime\Schema\AbstractSchemaManager#setConnection() was removed
* Parameters of `Bdf\Prime\Schema\SchemaManagerInterface#diff()` changed from `Bdf\Prime\Schema\TableInterface` to no type
* Return type of `Bdf\Prime\Connection\ConnectionInterface#schema()` changed from no type to `Bdf\Prime\Schema\Manager\DatabaseManagerInterface`

v1.3.0
------

* Feat: Adding psaml comments.
* Feat: Adding `Bdf\Prime\Connection\TransactionManagerInterface` to manage transactional connection.
* Feat: Adding `Bdf\Prime\Repository\RepositoryEventsSubscriberInterface` to manage event subscription.
* Feat: Add helper methods `isRead`, `isWrite`, `hasWrite` on `ResultSetInterface`
* Feat: Add "fetch mode" `asXXX` methods instead of generalist `fetchMode` method on `ResultSetInterface`

Deprecated
* `Bdf\Prime\Query\CacheStatement` will be deleted in 2.0. Do not use.
* `Bdf\Prime\Sharding\MultiStatement` will be deleted in 2.0. Use MultiResult instead.
* `Bdf\Prime\Connection\Result\PdoResultSet` will be deleted in 2.0. Use DoctrineResultSet instead.
* `Bdf\Prime\Exception\QueryException` will be deleted in 2.0. Use QueryBuildingException instead.
* `Bdf\Prime\Connection\Result\ResultSetInterface::fetchMode()` and associated constants. Not planned yet to deletion.

BC Breaks
* Change signature of `Bdf\Prime\Behaviors\BehaviorInterface`.
* Change signature of `Bdf\Prime\Query\Compiler\Preprocessor\PreprocessorInterface`.
* Change signature of `Bdf\Prime\Query\Expression\ExpressionInterface`.
* Change signature of `Bdf\Prime\Query\Expression\ExpressionTransformerInterface`.
* Change signature of `Bdf\Prime\Query\Pagination\PaginatorInterface`.
* Change signature of `Bdf\Prime\Query\SqlQueryInterface`.
* Change signature of `Bdf\Prime\Relations\CustomRelationInterface`.
* Change signature of `Bdf\Prime\Relations\RelationInterface`.
* Change signature of `Bdf\Prime\Relations\AbstractRelation::applyWhereKeys()`.
* Change signature of `Bdf\Prime\Repository\RepositoryInterface`.
* Change signature of `Bdf\Prime\Repository\Write\WriterInterface`.
* Change signature of `Bdf\Prime\Schema\Manager\QueryManagerInterface`.
* Change signature of many interfaces from package `Bdf\Prime\Query\Contract` and `Bdf\Prime\Query\Contract\Query`.
* Add close method in `Bdf\Prime\Connection\ConnectionInterface` interface.


v1.2.2
------

* Fix: Fix lazy loading of the connection on repository.


v1.2.1
------

* Feat: Adding console command to run sql.


v1.2.0
------

* Feat: Adding support of typed properties from php 7.4.
* Feat: Adding support of configuration by connection.
* Fix: fixing usage of non php 7.1 function.
* Fix: Ignore the SearializeIgnore annotation on the doctrine annotations reader.
* Fix: MorphTo  do not resolve repository on associate.
* Remove all deprecated classes and methods.
* You should now use the connection configuration instance to register your custom types.

BC Breaks
* ConnectionRegistry::__construct signature changed. The third parameter is now an instance of ConfigurationResolver
* ConnectionInterface::create() signature changed. The third parameter is now nillable.


v1.1.0
------

* Adding connection factory and registry interface.
* Adding support of sub query in from clause.
* Adding support of cross database sub query.
* Adding feature allowing developper to choose manually the shard on the query.

BC Breaks
* MasterSlaveConnection and ShardingConnection will no longer change their internal connection name with their method setName
* ConnectionManager::__construct() accepts configration in third parameter.
* ConnectionManager::connectionNames() now returns all the connection (current and lazy one)
* ConnectionManager::allConnectionNames() has been removed
* The signature of constructor of the abstract class DatabaseCommand changed
* The method MapperFactory::setCache() has been renamed as MapperFactory::setMetadataCache()
* Use methods MapperFactory::setMetadataCache() and MapperFactory::setResultCache() to disable cache. Configuration is checked during intialization of service.
