Skip to content

Commit

Permalink
Merge pull request #1865 from enricog84/v2.4.x
Browse files Browse the repository at this point in the history
Changed default for hardDelete option to 'true'
  • Loading branch information
l3pp4rd authored Jan 8, 2018
2 parents a268224 + e8ef0eb commit d5fdc57
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Gedmo/SoftDeleteable/Mapping/Driver/Annotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function readExtendedMetadata($meta, array &$config)
$config['timeAware'] = $annot->timeAware;
}

$config['hardDelete'] = false;
$config['hardDelete'] = true;
if (isset($annot->hardDelete)) {
if (!is_bool($annot->hardDelete)) {
throw new InvalidMappingException("hardDelete must be boolean. ".gettype($annot->hardDelete)." provided.");
Expand Down
2 changes: 1 addition & 1 deletion lib/Gedmo/SoftDeleteable/Mapping/Driver/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function readExtendedMetadata($meta, array &$config)
$config['timeAware'] = $this->_getBooleanAttribute($xml->{'soft-deleteable'}, 'time-aware');
}

$config['hardDelete'] = false;
$config['hardDelete'] = true;
if ($this->_isAttributeSet($xml->{'soft-deleteable'}, 'hard-delete')) {
$config['hardDelete'] = $this->_getBooleanAttribute($xml->{'soft-deleteable'}, 'hard-delete');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Gedmo/SoftDeleteable/Mapping/Driver/Yaml.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function readExtendedMetadata($meta, array &$config)
$config['timeAware'] = $classMapping['soft_deleteable']['time_aware'];
}

$config['hardDelete'] = false;
$config['hardDelete'] = true;
if (isset($classMapping['soft_deleteable']['hard_delete'])) {
if (!is_bool($classMapping['soft_deleteable']['hard_delete'])) {
throw new InvalidMappingException("hardDelete must be boolean. ".gettype($classMapping['soft_deleteable']['hard_delete'])." provided.");
Expand Down

0 comments on commit d5fdc57

Please sign in to comment.