mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40:55 +01:00
Make drydock
case sensitive in attribute parsing
Summary: See D4047. Get rid of this strtolower() junk. Test Plan: ``` $ /bin/drydock lease --type working-copy --attributes repositoryID=12 Acquired Lease 66 ``` Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2015 Differential Revision: https://secure.phabricator.com/D4048
This commit is contained in:
parent
9c76964aa7
commit
150f711cc8
4 changed files with 7 additions and 4 deletions
|
@ -34,6 +34,7 @@ final class DrydockManagementLeaseWorkflow
|
|||
$attributes = $args->getArg('attributes');
|
||||
if ($attributes) {
|
||||
$options = new PhutilSimpleOptions();
|
||||
$options->setCaseSensitive(true);
|
||||
$attributes = $options->parse($attributes);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,12 +26,12 @@ final class DrydockLease extends DrydockDAO {
|
|||
}
|
||||
|
||||
public function setAttribute($key, $value) {
|
||||
$this->attributes[strtolower($key)] = $value;
|
||||
$this->attributes[$key] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAttribute($key, $default = null) {
|
||||
return idx($this->attributes, strtolower($key), $default);
|
||||
return idx($this->attributes, $key, $default);
|
||||
}
|
||||
|
||||
public function generatePHID() {
|
||||
|
|
|
@ -15,7 +15,8 @@ final class CelerityResourceTransformerTestCase extends PhabricatorTestCase {
|
|||
|
||||
list($options, $in, $expect) = $parts;
|
||||
|
||||
$options = PhutilSimpleOptions::parse($options) + array(
|
||||
$parser = new PhutilSimpleOptions();
|
||||
$options = $parser->parse($options) + array(
|
||||
'minify' => false,
|
||||
'name' => $name,
|
||||
);
|
||||
|
|
|
@ -43,7 +43,8 @@ final class PhabricatorRemarkupRuleEmbedFile
|
|||
|
||||
if (!empty($matches[2])) {
|
||||
$matches[2] = trim($matches[2], ', ');
|
||||
$options = PhutilSimpleOptions::parse($matches[2]) + $options;
|
||||
$parser = new PhutilSimpleOptions();
|
||||
$options = $parser->parse($matches[2]) + $options;
|
||||
}
|
||||
$file_name = coalesce($options['name'], $file->getName());
|
||||
$options['name'] = $file_name;
|
||||
|
|
Loading…
Reference in a new issue