Skip to content

Commit

Permalink
Merge branch 'release/0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Mar 15, 2016
2 parents 5b150f6 + 0d87356 commit d3a27d5
Show file tree
Hide file tree
Showing 18 changed files with 406 additions and 174 deletions.
70 changes: 60 additions & 10 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,66 @@
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()
->in(__DIR__);
->in(__DIR__)
->exclude(
array(
'artifacts',
'assets',
'bower_components',
'build',
'node_modules',
'src-web',
'src-generated',
'vendor',
)
);

return Symfony\CS\Config\Config::create()
->fixers(array(
'-concat_without_spaces',
'-empty_return',
'-new_with_braces',
'align_double_arrow',
'align_equals',
'ordered_use',
'short_array_syntax',
))
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
->fixers(
array(
// symfony
'blankline_after_open_tag',
'duplicate_semicolon',
'extra_empty_lines',
'include',
'join_function',
'list_commas',
'multiline_array_trailing_comma',
'namespace_no_leading_whitespace',
'new_with_braces',
'no_blank_lines_after_class_opening',
'no_empty_lines_after_phpdocs',
'object_operator',
'operators_spaces',
'phpdoc_indent',
'phpdoc_params',
'phpdoc_short_description',
'phpdoc_to_comment',
'phpdoc_trim',
'phpdoc_type_to_var',
'phpdoc_var_without_name',
'pre_increment',
'remove_leading_slash_use',
'remove_lines_between_uses',
'return',
'self_accessor',
'single_array_no_trailing_comma',
'single_blank_line_before_namespace',
'single_quote',
'spaces_before_semicolon',
'spaces_cast',
'standardize_not_equal',
'ternary_spaces',
'trim_array_spaces',
'unary_operators_spaces',
'unused_use',
'whitespacy_lines',

// contrib
'concat_with_spaces',
'multiline_spaces_before_semicolon',
'ordered_use',
)
)
->finder($finder);
2 changes: 1 addition & 1 deletion .travis.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Ac/zPqTtsLCk7Axcfnd3hnduBMA0ez/fkXdkVmlrbu+w3CBjBqLYmZOTTRqVR9UtXy2ozQcMA633KKcgvpsMNsWjktBfBKzT8wR5MN3XWdVOBNd0xPCtFn/nTLyvPayDNW3R6jyNlKmKdWMiNNnZcyknG/1EMHa4XiN25F05VWQ=
HpyXe64HFHCUsAaqD9tcxmhu1D0sCceE5RzAHEm8Y+K01TDOLgdRxz9DJkxE1WZvxF3+QepBbTx19xx72NooJ0igCUwo6f2JxSDMrdballWkxn3c5WPOAe2G0BKP2+fwoY3Iy0P/UfMjXNJoIqAXH7glX0j9GObftnWuPaxC7IM=
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: php

php: ["5.4", "5.5", "5.6", "hhvm", "hhvm-nightly"]
php: ["5.4", "5.5", "5.6", "7.0", "hhvm", "hhvm-nightly"]

matrix:
allow_failures: [{"php": "hhvm"}, {"php": "hhvm-nightly"}]
Expand All @@ -9,7 +9,7 @@ matrix:
env:
global:
- ARCHER_PUBLISH_VERSION=5.6
- secure: "Ac/zPqTtsLCk7Axcfnd3hnduBMA0ez/fkXdkVmlrbu+w3CBjBqLYmZOTTRqVR9UtXy2ozQcMA633KKcgvpsMNsWjktBfBKzT8wR5MN3XWdVOBNd0xPCtFn/nTLyvPayDNW3R6jyNlKmKdWMiNNnZcyknG/1EMHa4XiN25F05VWQ="
- secure: "HpyXe64HFHCUsAaqD9tcxmhu1D0sCceE5RzAHEm8Y+K01TDOLgdRxz9DJkxE1WZvxF3+QepBbTx19xx72NooJ0igCUwo6f2JxSDMrdballWkxn3c5WPOAe2G0BKP2+fwoY3Iy0P/UfMjXNJoIqAXH7glX0j9GObftnWuPaxC7IM="

install:
- ./.travis.install
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Stump Changelog

### 0.6.0 (2016-03-16)

* **[NEW, BC]** Added support for PHP 7 `Throwable`
* **[NEW, BC]** Added separate message renderers to handle plain/ANSI rendering
* **[IMPROVED]** Open the stream in append mode to support actual files (not just STDOUT)

### 0.5.0 (2015-01-31)

* **[NEW]** Added optional support for ANSI color codes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ The output of the example above is:
<!-- references -->
[Build Status]: http://img.shields.io/travis/IcecaveStudios/stump/develop.svg?style=flat-square
[Test Coverage]: http://img.shields.io/coveralls/IcecaveStudios/stump/develop.svg?style=flat-square
[SemVer]: http://img.shields.io/:semver-0.5.0-yellow.svg?style=flat-square
[SemVer]: http://img.shields.io/:semver-0.6.0-yellow.svg?style=flat-square
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?php
namespace Icecave\Stump;

namespace Icecave\Stump\ExceptionRenderer;

use Exception;
use Throwable;

class ExceptionRenderer implements ExceptionRendererInterface
{
/**
* @param Exception $exception The exception to render.
* @param Throwable|Exception $exception The exception to render.
*
* @return string the rendered exception.
*/
public function render(Exception $exception)
public function render($exception)
{
$rendered = [];
$renderException = $exception;
Expand All @@ -25,13 +27,13 @@ public function render(Exception $exception)
}

/**
* @param Exception $exception The exception to render.
* @param Throwable|Exception $exception The exception to render.
*
* @return string rendered exception.
*/
private function renderException(Exception $exception)
private function renderException($exception)
{
$string = 'Message: ' . $exception->getMessage() . PHP_EOL;
$string = 'Message: ' . $exception->getMessage() . PHP_EOL;
$string .= 'Code: ' . $exception->getCode() . PHP_EOL;
$string .= 'Type: ' . get_class($exception) . PHP_EOL;

Expand Down
16 changes: 16 additions & 0 deletions src/ExceptionRenderer/ExceptionRendererInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Icecave\Stump\ExceptionRenderer;

use Exception;
use Throwable;

interface ExceptionRendererInterface
{
/**
* @param Throwable|Exception $exception The exception to render.
*
* @return string the rendered exception.
*/
public function render($exception);
}
14 changes: 0 additions & 14 deletions src/ExceptionRendererInterface.php

This file was deleted.

Loading

0 comments on commit d3a27d5

Please sign in to comment.