Skip to content

Sniff to check that only exceptions from specific (app) namespaces are thrown #489

@Majkl578

Description

@Majkl578

Having an app within My\App namespace, I'd like to only allow throwing exceptions from My\App or any sub-namespace - no SPL, no global Exception/Error.

This should be really straightforward, but I can see a potential use case for extended behavior: specifying boundaries and their allowed exceptions. Example:

  • My\App\FooContext can only throw My\App\FooContext\*
  • My\App\BarContext can only throw My\App\BarContext\*

cc @simPod

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions