-
-
Notifications
You must be signed in to change notification settings - Fork 47
configurable mime types for advanced static files server #240
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #240 +/- ##
=============================================
+ Coverage 86.77% 86.93% +0.16%
+ Complexity 647 621 -26
=============================================
Files 88 85 -3
Lines 2011 1921 -90
=============================================
- Hits 1745 1670 -75
+ Misses 266 251 -15
|
src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
5b2ce80
to
1ee9db0
Compare
1ee9db0
to
fb71c7e
Compare
@k911 what about this PR? It seems like I can't do anything with the |
@@ -24,7 +25,8 @@ final class AdvancedStaticFilesServer implements RequestHandlerInterface, Bootab | |||
* | |||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types | |||
*/ | |||
private const FILE_EXTENSION_MIME_TYPE_MAP = [ | |||
private $FILE_EXTENSION_MIME_TYPE_MAP = [ | |||
'*' => 'application/octet-stream', // fallback for other file types |
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.
Define a constant instead of duplicating this literal "application/octet-stream" 3 times.
Code Climate has analyzed commit fb71c7e and detected 2 issues on this pull request. Here's the issue category breakdown:
Note: there is 1 critical issue. The test coverage on the diff in this pull request is 62.5% (50% is the threshold). This pull request will bring the total coverage in the repository to 86.9% (-0.2% change). View more on Code Climate. |
@Rastusik Thanks for your contribution! |
@k911 thanks for the merge :) |
* build(deps-dev): bump doctrine/annotations from 1.10.2 to 1.10.3 (#223) ([94ef806](94ef806)), closes [#223](#223) * build(deps-dev): bump phpstan/phpstan from 0.12.28 to 0.12.29 (#249) ([ebf9ce1](ebf9ce1)), closes [#249](#249) * build(deps-dev): bump phpstan/phpstan-doctrine from 0.12.15 to 0.12.16 (#248) ([830a9ef](830a9ef)), closes [#248](#248) * build(deps-dev): bump phpstan/phpstan-doctrine from 0.12.16 to 0.12.17 (#263) ([d796528](d796528)), closes [#263](#263) * chore(composer): add suggestion to use pixelfederation/doctrine-resettable-em-bundle to be able to r ([496c5fe](496c5fe)), closes [#226](#226) * chore(composer): upgrade deps (#246) ([7e44a89](7e44a89)), closes [#246](#246) * chore(composer): upgrade deps (#262) ([c9b218a](c9b218a)), closes [#262](#262) * chore(deps): upgrade composer dependencies (#222) ([37d2517](37d2517)), closes [#222](#222) * fix(config): allow configuring worker and reactor counts using ENV variables (#244) ([d6b270a](d6b270a)), closes [#244](#244) * fix(profiler): make log collection in symfony profiler to work (#242) ([50fdd6f](50fdd6f)), closes [#242](#242) * refactor(error-handler): move to proper namespace (#251) ([4c1c3e9](4c1c3e9)), closes [#251](#251) * feat(blackfire): Add bridge for upscale/swoole-blackfire (#221) ([960ddb8](960ddb8)), closes [#221](#221) * feat(exception-handler): Add Symfony error/exception handler (#228) ([180d5e5](180d5e5)), closes [#228](#228) * feat(http-server): configurable mime types for advanced static files server (#240) ([07896a4](07896a4)), closes [#240](#240) * ci(circle): upgrade docker client image to v19.03.11 (#239) ([fe7b46c](fe7b46c)), closes [#239](#239)
Implementation according to #238
Closes #238