Skip to content

Conversation

@kenjis
Copy link
Member

@kenjis kenjis commented Oct 28, 2023

Needs #8111

Description

  • add spark config:check command to check the current values

We don't know the current values if we look at the Config file.

bash-3.2$ php spark config:check Filters

CodeIgniter v4.4.3 Command Line Tool - Server Time: 2023-10-28 02:00:44 UTC+00:00

Config\Filters#42 (4) (
    public 'aliases' -> array (14) [
        'csrf' => string (24) "CodeIgniter\Filters\CSRF"
        'toolbar' => string (32) "CodeIgniter\Filters\DebugToolbar"
        'honeypot' => string (28) "CodeIgniter\Filters\Honeypot"
        'invalidchars' => string (32) "CodeIgniter\Filters\InvalidChars"
        'secureheaders' => string (33) "CodeIgniter\Filters\SecureHeaders"
        'session' => string (38) "CodeIgniter\Shield\Filters\SessionAuth"
        'tokens' => string (36) "CodeIgniter\Shield\Filters\TokenAuth"
        'hmac' => string (35) "CodeIgniter\Shield\Filters\HmacAuth"
        'chain' => string (36) "CodeIgniter\Shield\Filters\ChainAuth"
        'auth-rates' => string (36) "CodeIgniter\Shield\Filters\AuthRates"
        'group' => string (38) "CodeIgniter\Shield\Filters\GroupFilter"
        'permission' => string (43) "CodeIgniter\Shield\Filters\PermissionFilter"
        'force-reset' => string (51) "CodeIgniter\Shield\Filters\ForcePasswordResetFilter"
        'jwt' => string (34) "CodeIgniter\Shield\Filters\JWTAuth"
    ]
    public 'globals' -> array (2) [
        'before' => array (0) []
        'after' => array (1) [
            0 => string (7) "toolbar"
        ]
    ]
    public 'methods' -> array (0) []
    public 'filters' -> array (0) []
)

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added enhancement PRs that improve existing functionalities 4.5 labels Oct 28, 2023
@kenjis kenjis force-pushed the feat-spark-config-check branch 2 times, most recently from 934e643 to 698a1f7 Compare October 28, 2023 02:29
@kenjis kenjis marked this pull request as draft October 28, 2023 02:31
@kenjis kenjis force-pushed the feat-spark-config-check branch 4 times, most recently from f2fbe98 to a95a0c7 Compare October 28, 2023 10:08
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it! I would like to look more closely, but concept and output and structure all look great.

@kenjis kenjis force-pushed the feat-spark-config-check branch 5 times, most recently from da0fcae to 88d384f Compare October 28, 2023 12:35
@kenjis kenjis force-pushed the feat-spark-config-check branch from 88d384f to 338edce Compare October 28, 2023 12:56
@kenjis kenjis marked this pull request as ready for review October 28, 2023 13:30
@neznaika0
Copy link
Contributor

Honestly, looking at the title, I thought there would be a check for the correct values. By type: whether a variable is set; string or number is set.

Reading the doc understood what it was for. It looks good if the settings change in the process

@kenjis kenjis merged commit 4e57cee into codeigniter4:4.5 Nov 3, 2023
@kenjis kenjis deleted the feat-spark-config-check branch November 3, 2023 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PRs that improve existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants