Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

use default console exception template instead of empty string #111

Merged
merged 2 commits into from
Apr 6, 2016

Conversation

svycka
Copy link
Contributor

@svycka svycka commented Mar 31, 2016

this was overriding default template if no template is set.

also the method name and config option name 'exception_message' is not very clear what it is :D

@svycka
Copy link
Contributor Author

svycka commented Mar 31, 2016

@weierophinney I think this was introduced after your SM v3 refactor and merged into 2.7 is this desired behavior or bug? If not a bug then why we have default template and overriding anyway.

@snapshotpl
Copy link
Contributor

@svycka can you add unit test to cover this bug?

@svycka
Copy link
Contributor Author

svycka commented Mar 31, 2016

in case this will not merged soon as a workaround I added default template from here https://github.com/zendframework/zend-mvc/blob/master/src/View/Console/ExceptionStrategy.php#L31-L44 to my local config like this:

return [
    'console' => [
        'view_manager' => [
            'exception_message' => '
======================================================================
   The application has thrown an exception!
======================================================================
 :className
 :message
----------------------------------------------------------------------
:file::line
:stack
======================================================================
   Previous Exception(s):
:previous

',
        ]
    ]
];

@svycka can you add unit test to cover this bug?

@snapshotpl not sure but maybe if really needed

@svycka
Copy link
Contributor Author

svycka commented Mar 31, 2016

@snapshotpl is it ok?

@svycka
Copy link
Contributor Author

svycka commented Apr 6, 2016

@weierophinney this bug also is a BC break and maybe can be fixed faster?

@weierophinney weierophinney added this to the 2.7.5 milestone Apr 6, 2016
@weierophinney weierophinney self-assigned this Apr 6, 2016
@weierophinney weierophinney merged commit 8c5b750 into zendframework:master Apr 6, 2016
weierophinney added a commit that referenced this pull request Apr 6, 2016
use default console exception template instead of empty string
weierophinney added a commit that referenced this pull request Apr 6, 2016
weierophinney added a commit that referenced this pull request Apr 6, 2016
weierophinney added a commit that referenced this pull request Apr 6, 2016
@weierophinney
Copy link
Member

@svycka Merged, and tagged 2.7.5. Can you do a similar PR against zend-mvc-console, please?

@svycka
Copy link
Contributor Author

svycka commented Apr 6, 2016

@svycka svycka deleted the patch-2 branch April 6, 2016 15:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants