-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
- I've read the guidelines for Contributing to Roots Projects
- This request isn't a duplicate of an existing issue
- I've read the docs and followed them (if applicable)
- This is not a personal support request that should be posted on the Roots Discourse community
Description
Unexpected behaviors when using integers or numeric strings as keys
Steps to reproduce
// Without declare(strict_types=1); !!
Config::define(999, 'nine nine nine');
Config::apply();Expected behavior:
Warn (or throw exceptions) about using integers or numeric strings as keys is incorrect.
Actual behavior:
echo Config::get(999);
==> nine nine nine
echo constant(999);
==> nine nine nine
echo constant('999');
==> nine nine nine
echo 999;
==> 999
Possible Solution
- Bump PHP requirement
- Add
declare(strict_types=1); - Add type hints
austinpray
Metadata
Metadata
Assignees
Labels
No labels