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

Arachnophobia mode #2247

Merged
merged 7 commits into from Oct 21, 2018

Conversation

Projects
None yet
4 participants
@Deuchnord
Copy link
Contributor

Deuchnord commented Oct 9, 2018

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets none
License WTFPL
Doc PR api-platform/docs#612

One of the greatest bugs in the Human software is their fear of spiders. In some cases, the simple seeing of something big go down the screen makes them feel bad for some seconds, before realizing it's just Webby.

Problem is, the Human software is closed-source, so this PR tries to manage that issue by providing a way to disable displaying Webby on the Swagger UI pages. Of course, Webby remains visible by default.

To disable Webby's display, just add this to API Platform's config:

# /config/api_platform.yaml
api_platform:
    show_webby: false # defaults to true

@Deuchnord Deuchnord referenced this pull request Oct 9, 2018

Closed

Add `show_webby` option #612

@@ -54,14 +55,15 @@
/**
* @throws InvalidArgumentException
*/
public function __construct(ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory, ResourceMetadataFactoryInterface $resourceMetadataFactory, NormalizerInterface $normalizer, \Twig_Environment $twig, UrlGeneratorInterface $urlGenerator, string $title = '', string $description = '', string $version = '', /* FormatsProviderInterface */ $formatsProvider = [], $oauthEnabled = false, $oauthClientId = '', $oauthClientSecret = '', $oauthType = '', $oauthFlow = '', $oauthTokenUrl = '', $oauthAuthorizationUrl = '', $oauthScopes = [])
public function __construct(ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory, ResourceMetadataFactoryInterface $resourceMetadataFactory, NormalizerInterface $normalizer, \Twig_Environment $twig, UrlGeneratorInterface $urlGenerator, string $title = '', string $description = '', string $version = '', bool $showWebby = true, /* FormatsProviderInterface */ $formatsProvider = [], $oauthEnabled = false, $oauthClientId = '', $oauthClientSecret = '', $oauthType = '', $oauthFlow = '', $oauthTokenUrl = '', $oauthAuthorizationUrl = '', $oauthScopes = [])

This comment has been minimized.

Copy link
@alanpoulain

alanpoulain Oct 9, 2018

Member

It's a BC. Please add the new parameter at the end instead.

@alanpoulain

This comment has been minimized.

Copy link
Member

alanpoulain commented Oct 9, 2018

😢

@alanpoulain

This comment has been minimized.

Copy link
Member

alanpoulain commented Oct 21, 2018

Can't we merge this one?

@dunglas dunglas merged commit c901294 into api-platform:master Oct 21, 2018

11 checks passed

Scrutinizer Analysis: No new issues – Tests: passed
Details
SymfonyInsight Code quality OK.
Details
ci/circleci: behat-coverage Your tests passed on CircleCI!
Details
ci/circleci: merge-and-upload-coverage Your tests passed on CircleCI!
Details
ci/circleci: php-cs-fixer Your tests passed on CircleCI!
Details
ci/circleci: phpstan Your tests passed on CircleCI!
Details
ci/circleci: phpunit-coverage Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 95.98%)
Details
codecov/project 95.98% (+<.01%) compared to 6b317a3
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dunglas

This comment has been minimized.

Copy link
Member

dunglas commented Oct 21, 2018

Thanks @Deuchnord! First PR, but not the last!

@jeremyFreeAgent

This comment has been minimized.

Copy link

jeremyFreeAgent commented Dec 14, 2018

Thank you very much!!! <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.