Skip to content

Commit

Permalink
Disable the versioning in the legacy data definition if is enable. Th…
Browse files Browse the repository at this point in the history
…e versioning comes as feature in a later version. #553
  • Loading branch information
baumannsven committed Nov 11, 2020
1 parent d86fe15 commit a6d99f0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/Contao/Dca/Builder/Legacy/LegacyDcaDataDefinitionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* This file is part of contao-community-alliance/dc-general.
*
* (c) 2013-2019 Contao Community Alliance.
* (c) 2013-2020 Contao Community Alliance.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -16,7 +16,7 @@
* @author David Molineus <david.molineus@netzmacht.de>
* @author Stefan Heimes <stefan_heimes@hotmail.com>
* @author Sven Baumann <baumann.sv@gmail.com>
* @copyright 2013-2019 Contao Community Alliance.
* @copyright 2013-2020 Contao Community Alliance.
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/
Expand Down Expand Up @@ -533,8 +533,15 @@ protected function parseDataProvider(ContainerInterface $container)
)
);
}
$providerInformation
->setVersioningEnabled((bool) $this->getFromDca('config/enableVersioning'));
$providerInformation->setVersioningEnabled(false);
if (true === (bool) $this->getFromDca('config/enableVersioning')) {
// @codingStandardsIgnoreStart
@\trigger_error(
'Versioning is not supported yet and will get implemented in a future release.',
E_USER_WARNING
);
// @codingStandardsIgnoreEnd
}

if (!$container->getBasicDefinition()->getDataProvider()) {
$container->getBasicDefinition()->setDataProvider($providerName);
Expand Down

0 comments on commit a6d99f0

Please sign in to comment.