Skip to content

Releases: Kdyby/Doctrine

v3.0.0

08 Nov 14:34
Compare
Choose a tag to compare
  • Fixed tracy panel styles (and stolen SVG icon from nette/database)
  • Remove LIMIT 1 for EntityRepository::fetchOne() by @jasin755 (BC Break - but it fixes when you're selecting toMany with join)
  • EntityRepository::countBy() now returns integer type by @richard-ejem
  • Fix extension methods in BaseEntity & MagicAccessors (Nette\Callback is deprecated)
  • QueryBuilder: auto join ORDER BY can sort by aggregation function result by @EaredSeal
  • Add configuration for default query hints by @davidkudera
  • Added Kdyby\Doctrine\Entity\Attributes\UniversallyUniqueIdentifier trait by @klimesf
  • Fix RobotLoader::initialize() is incorrectly called for every tryLoad() by @lm (relevant to proxy autoloading)
  • Panel: Improved highlightQuery method by @enumag
  • RepositoryFactory: implemented handling of repositories as services (big feature, possibly might break some apps that already use this in some hackish way)
  • NonLockingUniqueInserter supports single table inheritance by @mkoubik
  • Deprecate BaseEntity & introduced MagicAccessors that returns read-only collections from getters of collection properties. Otherwise, it's compatible with BaseEntity.
  • Deprecate EntityManager::onDaoCreate()
  • DI: no longer autoregister AnnotationsExtension, but throw instead (Nette deprecated this feature)
  • Remove custom --debug-mode from CLI commands (compatibility with Kdyby/Console#v2.5.0 )
  • Introduce NativeQueryBuilder::setDefaultRenameMode()
  • Fixed clearing annotations cache
  • Implemented LazyCollection (might wanna push this to doctrine/common some day)
  • Preserve associative keys in ResultSet::toArray()
  • Fix nested iterations over ResultSet
  • ReadOnlyCollectionWrapper implements Doctrine\Common\Collections\Selectable
  • Render UnitOfWork panel when exception occurs during EntityManager->flush()
  • Catch warnings in Connection::ping()
  • EntityRepository: fetch with different hydration mode by @VaclavSir
  • Panel: highlight Doctrine\DBAL\Exception\DriverException
  • Fix contract BC Break in QueryBuilder by extracting InlineParamsBuilder (BC Break - if you're using inline parameters in QB ->andWhere('e.name = :name', $name) you have to re-enable it manually in config with queryBuilderClassName: Kdyby\Doctrine\Dql\InlineParamsBuilder). Also, you can now configure your own child of QueryBuilder as default QueryBuilder.
  • Add QueryObject::onPostFetch() to allow multiple initializers
  • Drop PHP 5.3
  • Panel: show cache statistics for 2nd level cache, if it's enabled
  • DI: basic 2nd lvl cache config section
  • The custom Events::postLoadRelations is useless in Doctrine 2.5, so everything related to it is removed and the event is deprecated - possible BC Break
  • Require doctrine/orm ~2.5

This release is for Nette ~2.3

v2.3.1

08 Nov 14:13
Compare
Choose a tag to compare
  • QueryBuilder: refactor autojoin aliasing
  • Fixed proxy autoloaders initialization by @enumag
  • Fixed generating sql value for POINT and LINE_STRING type by @brabijan
  • Nette 2.3 compatibility
  • Dibi extension bridge for Nette 2.2 by @stekycz
  • Implemented EmptyResultSet (for when you wanna return ResultSet type, but without results)
  • QueryObject: created postFetch method
  • Connection: fixed duplicate creation of database platform by @matej21

This release is for Nette ~2.2

v2.3.0

02 Feb 02:27
Compare
Choose a tag to compare
  • lock to doctrine 2.4, because 2.5 contains api bc breaks
  • Deprecated EntityDao::save() and EntityDao::remove()
  • Deprecated EntityManager::getDao()
  • implemented RepositoryFactory
  • Fixed lazy inicialization of database that broke with doctrine/dbal: 2.5
  • Use namespaced evm from kdyby/events. All events are now first dispatched with namespace Doctrine\ORM\Event, but don't worry, it contains a BC fix that also dispatches the old variant without namespace. After you migrate all your listeners to namespaced variant, you can disable the dispatchGlobalEvents to increase performance
  • fixed minor bugs

This release is for Nette ~2.2

v2.0.6

02 Feb 02:27
Compare
Choose a tag to compare
  • lock to doctrine 2.4, because 2.5 contains api bc breaks
  • Deprecated EntityDao::save() and EntityDao::remove()
  • Deprecated EntityManager::getDao()
  • implemented RepositoryFactory
  • Fixed lazy inicialization of database that broke with doctrine/dbal: 2.5
  • Use namespaced evm from kdyby/events. All events are now first dispatched with namespace Doctrine\ORM\Event, but don't worry, it contains a BC fix that also dispatches the old variant without namespace. After you migrate all your listeners to namespaced variant, you can disable the dispatchGlobalEvents to increase performance
  • fixed minor bugs

This release is for Nette 2.1.*

v2.2.0

23 Dec 22:21
Compare
Choose a tag to compare
  • [Soft BC Break] Minimum dependency on doctrine/dbal 2.5 which means new DBAL\Connection exceptions

New property Connection::$throwOldKdybyExceptions was introduced, that enables the old behaviour of exceptions on Kdyby\Doctrine\Connection.
The new DBAL has much better exception resolution and throws specific exceptions, making the old behaviour obsolete.

The old behaviour is by default turned off, so you're pushed to migrating, but you can still turn it on.

services:
    doctrine.default.connection:
        setup:
            - $throwOldKdybyExceptions(TRUE)

This property and related deprecated exceptions will be removed no later than with release of Doctrine\DBAL 2.6

  • Fixed identifier quoting on shortcut methods insert/update/delete #64
  • Dropped custom Connection::ping() (completely compatible native one is used)
  • Implemented Persistence\ManagerRegistry #140
  • ClassMetadataFactory fix: add entity alias (which defined in targetEntityMappings) to the metadata map, thanks to @matej21
  • Added ResultSet::toArray() shortcut

This release is for Nette 2.2.*

v2.0.5

23 Dec 22:21
Compare
Choose a tag to compare
  • [Soft BC Break] Minimum dependency on doctrine/dbal 2.5 which means new DBAL\Connection exceptions

New property Connection::$throwOldKdybyExceptions was introduced, that enables the old behaviour of exceptions on Kdyby\Doctrine\Connection.
The new DBAL has much better exception resolution and throws specific exceptions, making the old behaviour obsolete.

The old behaviour is by default turned off, so you're pushed to migrating, but you can still turn it on.

services:
    doctrine.default.connection:
        setup:
            - $throwOldKdybyExceptions(TRUE)

This property and related deprecated exceptions will be removed no later than with release of Doctrine\DBAL 2.6

  • Fixed identifier quoting on shortcut methods insert/update/delete #64
  • Dropped custom Connection::ping() (completely compatible native one is used)
  • Implemented Persistence\ManagerRegistry #140
  • ClassMetadataFactory fix: add entity alias (which defined in targetEntityMappings) to the metadata map, thanks to @matej21
  • Added ResultSet::toArray() shortcut

This release is for Nette 2.1.*

v2.1.1

03 Oct 20:52
Compare
Choose a tag to compare

This release is for Nette 2.2.*

v2.0.4

03 Oct 20:52
Compare
Choose a tag to compare

This release is for Nette 2.1.*

v2.1.0

28 Jul 00:12
Compare
Choose a tag to compare

v2.0.3

28 Jul 00:11
Compare
Choose a tag to compare
  • Fixed autoJoin with multiple conditions on the same relation
  • Extracted and fixed Helpers::separateParameters()
  • Add support for subquery to NativeQueryBuilder, thx @pilec
  • Fixed configuring multiple connections
  • Use Nette's RobotLoader in AnnotationDriver to search for entities, If you don't wanna use it, then instead of %appDir%/models or annotations(%appDir%/models) (which is default) you have to specify the default implementation classname
doctrine:
    metadata:
        App: Doctrine\ORM\Mapping\Driver\AnnotationDriver(%appDir%/models)

Why would you wanna do that? Well, the Doctrine's implementation just crawls a directory and requires everything that remotely resembles PHP file. If you happen to have some scripts laying around, they will be triggered. On the other hand, the Doctrine's implementation is about 10x faster.

On a directory with 800 files, the new implementation with RobotLoader takes more than 10 seconds. On the other hand, the files are crawled only once at compile-time.