mikecao/flight
Flight is a fast, simple, extensible micro-framework for PHP. It offers a lightweight routing core with a RESTful router, view rendering, and optional extendable components, making it a good fit for small apps and APIs that don't need a full-stack framework.
flight.views.restrict_to_path, an opt-in guard that keeps rendered templates confined to the configured views directory. This is a direct mitigation for local file inclusion / path traversal when template names can be influenced by user input (e.g. render($page) driven by a query param). If your roadmap includes hardening internal apps or clearing a security review finding, this is a checkable box — but only if you turn it on.Consider FlightPHP when:
flight.views.restrict_to_path — as part of your template rendering standard.Look elsewhere when:
Adoption criteria before committing: confirm the config key is documented and pinned in your config management, add a regression test asserting traversal attempts return 4xx/404, and verify behavior across dev/staging/prod since an incorrect views path will now hard-fail rendering.
For executives: A small, low-risk patch to a lightweight PHP framework we are evaluating. It adds an opt-in security control that limits template rendering to an approved directory — good hygiene for internal tools and small services, and a useful answer to "is this maintained and security-conscious?" It is not a reason on its own to standardize on the framework.
For engineering: v3.19.4 is a non-breaking, opt-in addition — flight.views.restrict_to_path. No migration required, no deprecations. Recommendation: enable it in all environments where view names can be influenced by request data, add it to the shared config baseline, and cover it with a traversal regression test. Security impact is real but narrow: it hardens template path resolution only. It does not address input validation, auth, or output escaping, so keep existing controls in place. Also worth flagging for planning: the protective default is still off, which is a governance item for us rather than a framework defect.
How can I help you explore Laravel packages today?