Skip to content
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

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

Ruesa18
Copy link
Contributor

@Ruesa18 Ruesa18 commented Jun 25, 2024

@Ruesa18 Ruesa18 self-assigned this Jun 25, 2024
@Ruesa18 Ruesa18 force-pushed the feature/113-add-custom-flash-messages branch from a910a09 to 7356a7c Compare June 25, 2024 14:24
$response->setCallback(
function () use ($writer) {
$writer->save('php://output');
assert($entity !== null);
Copy link
Contributor Author

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 😅

Copy link
Contributor

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.

Copy link
Contributor Author

@Ruesa18 Ruesa18 Jun 27, 2024

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 👍

@Ruesa18 Ruesa18 requested a review from tuxes3 June 25, 2024 14:27
@Ruesa18 Ruesa18 marked this pull request as ready for review June 25, 2024 14:27
@Ruesa18 Ruesa18 force-pushed the feature/113-add-custom-flash-messages branch 2 times, most recently from a53bb91 to 754e60d Compare June 25, 2024 14:29
$response->setCallback(
function () use ($writer) {
$writer->save('php://output');
assert($entity !== null);
Copy link
Contributor

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.

@Ruesa18 Ruesa18 force-pushed the feature/113-add-custom-flash-messages branch from 754e60d to 3caffb6 Compare June 27, 2024 12:31
Copy link
Contributor

@tuxes3 tuxes3 left a 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

src/Controller/CrudController.php Outdated Show resolved Hide resolved
@Ruesa18 Ruesa18 force-pushed the feature/113-add-custom-flash-messages branch from 3caffb6 to f7f4bb4 Compare July 1, 2024 07:16
@Ruesa18
Copy link
Contributor Author

Ruesa18 commented Jul 1, 2024

@tuxes3
Copy link
Contributor

tuxes3 commented Jul 1, 2024

@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.

@tuxes3 tuxes3 force-pushed the feature/113-add-custom-flash-messages branch from f7f4bb4 to 148fa25 Compare July 1, 2024 09:07
@tuxes3 tuxes3 force-pushed the feature/113-add-custom-flash-messages branch from 148fa25 to c77399f Compare July 1, 2024 09:39
@tuxes3 tuxes3 merged commit f430b7f into develop Jul 1, 2024
7 checks passed
@tuxes3 tuxes3 deleted the feature/113-add-custom-flash-messages branch July 1, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants