-
Notifications
You must be signed in to change notification settings - Fork 17
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
$response object passed as service argument instead of resolveDispositionHeaderFilename() argument #7
Conversation
…tionHeaderFilename() argument
I wanted to avoid scoping everything to request, because it's messy. But it's probably a good idea for convenience. |
protected $fullFilename; | ||
protected $contentType; | ||
protected $options; | ||
|
||
public function __construct($baseDir) | ||
public function __construct($baseDir, $request) |
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.
Can you add a type hint for Request
?
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.
yes, i put a use Symfony\Component\HttpFoundation\Request;
in the top, like use Symfony\Component\HttpFoundation\Response;
removed unnecessary check on $response object
yes, I found a bit complicate for users to be forced to pass the |
No, the default behaviour is to send the invalid header which works in all browsers. You need to pass the request to get the valid one. |
Can you adjust the README? |
just to make it clear:
right? |
I've updated it myself. Ist gemerged ;-) |
ok cool. many thanks for your work! |
$request object is now passed through services.xml instead of passing it optionally in the controller as option.
What do you think?