-
Notifications
You must be signed in to change notification settings - Fork 11
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
Make Crayfish-Commons a Symfony bundle only. #49
Conversation
Restrict symfony versions Fix deprecation in test
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.
Seems pretty good... All fairly small things we could probably live with...
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.
I've been using this in my dev/stage/prod builds for a few months now, and everything seems fine. Set it all up in conjunction with your Alpaca 2.0.0 work.
return new Response( | ||
"Malformed request, no Apix-Ldp-Resource header present", | ||
400 | ||
); | ||
$this->log->debug("No Apix-Ldp-Resource header present, no fedora_resource set"); | ||
$request->attributes->set('fedora_resource', false); | ||
return; |
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.
In poking around and running tests, I found that the we broke the tests here, where it tests for the 400 error being emitted... easy enough fix just setting the response with something like:
diff --git a/ApixMiddleware.php b/ApixMiddleware.php
index b75df0a..5a29209 100644
--- a/ApixMiddleware.php
+++ b/ApixMiddleware.php
@@ -62,6 +62,10 @@ class ApixMiddleware implements EventSubscriberInterface
if (!$request->headers->has("Apix-Ldp-Resource")) {
$this->log->debug("No Apix-Ldp-Resource header present, no fedora_resource set");
$request->attributes->set('fedora_resource', false);
+ $event->setResponse(new Response(
+ "Malformed request, no Apix-Ldp-Resource header present",
+ 400
+ ));
return;
}
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.
Looking to address in #57
GitHub Issue: Islandora/documentation#1224
What does this Pull Request do?
Updates Crayfish-Commons to make it a Symfony 4.4 LTS bundle fully.
This PR goes along with an upcoming one for Crayfish that changes ALL the microservices to Symfony 4.4.
This PR moves the stuff that has been sitting in the symfony-flex branch (for Houdini) and makes it the actual Crayfish-Commons code as ALL microservices will be using symfony.
As this is not backwards compatible with Crayfish-Commons 2.0.0, this PR is against the new 3.x branch and will be the first commit of version 3.0.0
Once this PR and the Crayfish PR are merged, the branch
symfony-flex
can be deleted.What's new?
How should this be tested?
This will need to be tested with the associated PR in Crayfish Islandora/Crayfish#133
Additional Notes:
Interested parties
@Islandora/8-x-committers