Skip to content

Commit

Permalink
Added Laravel 5.6 stable support (#484)
Browse files Browse the repository at this point in the history
* Laravel 5.6 stable support

* fixed bug where opt group attributes where passed to option, added opt group attributes to opt group

* dropped php 7.0 because Laravel minimum requirement is now php 7.1.3
  • Loading branch information
mxmtsk authored and tshafer committed Feb 8, 2018
1 parent 137a2ef commit e649632
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 7.0
- 7.1

sudo: false
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
}
],
"require": {
"php": ">=7.0.0",
"illuminate/http": "5.6.x-dev",
"illuminate/routing": "5.6.x-dev",
"illuminate/session": "5.6.x-dev",
"illuminate/support": "5.6.x-dev",
"illuminate/view": "5.6.x-dev"
"php": ">=7.1.3",
"illuminate/http": "5.6.*",
"illuminate/routing": "5.6.*",
"illuminate/session": "5.6.*",
"illuminate/support": "5.6.*",
"illuminate/view": "5.6.*"
},
"require-dev": {
"illuminate/database": "5.6.x-dev",
"illuminate/database": "5.6.*",
"mockery/mockery": "~0.9.4",
"phpunit/phpunit": "~5.4"
},
Expand Down
10 changes: 5 additions & 5 deletions src/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ public function textarea($name, $value = null, $options = [])
// the element. Then we'll create the final textarea elements HTML for us.
$options = $this->html->attributes($options);

return $this->toHtmlString('<textarea' . $options . '>' . e($value). '</textarea>');
return $this->toHtmlString('<textarea' . $options . '>' . e($value, false). '</textarea>');
}

/**
Expand Down Expand Up @@ -722,10 +722,10 @@ protected function optionGroup($list, $label, $selected, array $attributes = [],
if (is_array($display)) {
$html[] = $this->optionGroup($display, $value, $selected, $attributes, $optionAttributes, $level+5);
} else {
$html[] = $this->option($space.$display, $value, $selected, $attributes, $optionAttributes);
$html[] = $this->option($space.$display, $value, $selected, $optionAttributes);
}
}
return $this->toHtmlString('<optgroup label="' . e($space.$label) . '">' . implode('', $html) . '</optgroup>');
return $this->toHtmlString('<optgroup label="' . e($space.$label, false) . '"' . $this->html->attributes($attributes) . '>' . implode('', $html) . '</optgroup>');
}

/**
Expand All @@ -746,7 +746,7 @@ protected function option($display, $value, $selected, array $attributes = [])

$string = '<option' . $this->html->attributes($options) . '>';
if ($display !== null) {
$string .= e($display) . '</option>';
$string .= e($display, false) . '</option>';
}

return $this->toHtmlString($string);
Expand All @@ -769,7 +769,7 @@ protected function placeholderOption($display, $selected)
'value' => '',
];

return $this->toHtmlString('<option' . $this->html->attributes($options) . ' hidden="hidden">' . e($display) . '</option>');
return $this->toHtmlString('<option' . $this->html->attributes($options) . ' hidden="hidden">' . e($display, false) . '</option>');
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/HtmlBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ protected function listingElement($key, $type, $value)
if (is_array($value)) {
return $this->nestedListing($key, $type, $value);
} else {
return '<li>' . e($value) . '</li>';
return '<li>' . e($value, false) . '</li>';
}
}

Expand Down Expand Up @@ -456,7 +456,7 @@ protected function attributeElement($key, $value)
}

if (! is_null($value)) {
return $key . '="' . e($value) . '"';
return $key . '="' . e($value, false) . '"';
}
}

Expand Down

0 comments on commit e649632

Please sign in to comment.