Skip to content

Request API vs IRequest interface #147

Open
@xificurk

Description

Request implements a couple of extra methods that are not defined in IRequest interface. Nette 3 deprecated autowiring of Request type, only autowiring via interface is now supported. This means that those extra methods are basically "inaccessible" for any consumer. I think those methods should be either added to the interface, or deprecated and eventually removed.

  • getReferer(): ?Url - the interface already mentions this method in @method annotation, the annotation should be transformed to a proper method definition.
  • isSameSite(): bool - this should be definitely added to the interface.
  • detectLanguage(array $langs): ?string - this can be easily extracted to a separate service and removed from Request.

What are your thoughts? Shall I send a PR(s)?

Related to #137, #90

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions