Skip to content

Commit

Permalink
Merge pull request #317 from ARCANEDEV/path-php_7.4_support
Browse files Browse the repository at this point in the history
Adding PHP 7.4 support
  • Loading branch information
arcanedev-maroc authored Dec 1, 2019
2 parents eb4e1b9 + bf69f94 commit fa5f2a3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ checks:
tools:
external_code_coverage:
timeout: 600
runs: 2
runs: 3
php_code_sniffer:
enabled: true
config:
Expand Down
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ php:

matrix:
allow_failures:
- php: 7.4snapshot
- php: nightly

before_script:
Expand All @@ -21,5 +20,5 @@ script:
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
- if [ "$TRAVIS_PHP_VERSION" != "7.4snapshot" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "7.4snapshot" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
17 changes: 11 additions & 6 deletions resources/views/bootstrap-3/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,18 @@
});
@unless (empty(log_styler()->toHighlight()))
$('.stack-content').each(function() {
var $this = $(this);
var html = $this.html().trim()
.replace(/({!! join(log_styler()->toHighlight(), '|') !!})/gm, '<strong>$1</strong>');
@php
$htmlHighlight = version_compare(PHP_VERSION, '7.4.0') >= 0
? join('|', log_styler()->toHighlight())
: join(log_styler()->toHighlight(), '|');
@endphp
$('.stack-content').each(function() {
var $this = $(this);
var html = $this.html().trim()
.replace(/({!! $htmlHighlight !!})/gm, '<strong>$1</strong>');
$this.html(html);
});
$this.html(html);
});
@endunless
});
</script>
Expand Down
18 changes: 12 additions & 6 deletions resources/views/bootstrap-4/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,19 @@
});
@unless (empty(log_styler()->toHighlight()))
$('.stack-content').each(function() {
var $this = $(this);
var html = $this.html().trim()
.replace(/({!! join(log_styler()->toHighlight(), '|') !!})/gm, '<strong>$1</strong>');
@php
$htmlHighlight = version_compare(PHP_VERSION, '7.4.0') >= 0
? join('|', log_styler()->toHighlight())
: join(log_styler()->toHighlight(), '|');
@endphp
$this.html(html);
});
$('.stack-content').each(function() {
var $this = $(this);
var html = $this.html().trim()
.replace(/({!! $htmlHighlight !!})/gm, '<strong>$1</strong>');
$this.html(html);
});
@endunless
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/LogStyler.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ public function color($level, $default = null)
*/
public function toHighlight(array $default = [])
{
return $this->get("highlight", $default);
return $this->get('highlight', $default);
}
}

0 comments on commit fa5f2a3

Please sign in to comment.