-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add exception handling for the FlashBagException from araise/core #64
Conversation
a910a09
to
7356a7c
Compare
src/Controller/CrudController.php
Outdated
$response->setCallback( | ||
function () use ($writer) { | ||
$writer->save('php://output'); | ||
assert($entity !== null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a scale from 1-10, how evil is this?
Because if this doesn't exist the code above should throw a NotFoundHttpException, I think... So this shouldn't be an issue. But please take a look at the whole code @tuxes3 - just to make sure 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wouldn't be too evil, if it would make sense. The Entity is only needed in the RelationContent
Export case which @ArnoEgli developed. In the standard case there is no need for an entity
. Please compare the implementation on develop
with yours. There is no need to have the entity
if acronym
or entityId
is not set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The surrounding lines just changed anyways. So I'm gonna take the develop version of this function and try it again. Thanks for the feedback 👍
a53bb91
to
754e60d
Compare
src/Controller/CrudController.php
Outdated
$response->setCallback( | ||
function () use ($writer) { | ||
$writer->save('php://output'); | ||
assert($entity !== null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wouldn't be too evil, if it would make sense. The Entity is only needed in the RelationContent
Export case which @ArnoEgli developed. In the standard case there is no need for an entity
. Please compare the implementation on develop
with yours. There is no need to have the entity
if acronym
or entityId
is not set.
754e60d
to
3caffb6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do not forget to run ecs
and phpstan
3caffb6
to
f7f4bb4
Compare
@tuxes3 Is https://github.com/araise-dev/CrudBundle/pull/64/files#diff-c14e169d433ac4ee49286b8916edc55b04f023a389093d8e68a7555646fcfed0R479 still required since we removed every Logger call now? |
Yes, we will keep that. |
f7f4bb4
to
148fa25
Compare
148fa25
to
c77399f
Compare
References: https://dev.whatwedo.ch/araise/araise-meta/-/issues/113
Depends on: araise-dev/CoreBundle#30