Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Case Conventions #23

Closed
Juddling opened this issue Jul 16, 2018 · 7 comments
Closed

Case Conventions #23

Juddling opened this issue Jul 16, 2018 · 7 comments
Assignees

Comments

@Juddling
Copy link

  • JSON responses: snake_case
  • Databases names, tables, columns: snake_case
  • URL parameters, snake_case: e.g. /user/2/show?include_extra_info=true
  • PSR-2 dictates the cases used in PHP code
  • GitHub repos: slug-case

Laravel Routes

  • Names: slug-case
  • URLs: slug-case
@Juddling
Copy link
Author

Juddling commented Aug 9, 2018

config files: snake_case.

Example:

services.mailgun.client_id

@serversidesquid
Copy link

For config keys I prefer camelCase.

Example:

services.mailgun.clientId

@Juddling
Copy link
Author

Juddling commented Aug 9, 2018

@inphode that's inconsistent with Laravel, examples:

    'log' => env('APP_LOG', 'single'),

    'log_level' => env('APP_LOG_LEVEL', 'debug'),

    'faker_locale' => 'en_GB',

Will wait for other people's opinions...

@serversidesquid
Copy link

@Juddling I never knew that (most of the config keys in Laravel are single words).

Then I prefer underscores, since that convention exists already.

@craigsansam craigsansam self-assigned this Jan 14, 2019
@spamoom
Copy link

spamoom commented Jan 14, 2019

I agree with all of the above.

@craigsansam
Copy link
Contributor

I am going to close this RFC on Friday 22nd March and add the outcomes to the coding standards.

@netsells netsells locked as resolved and limited conversation to collaborators Mar 24, 2019
@craigsansam craigsansam added the pending Discussions on this RFC have concluded, and the outcome is pending addition to the Code Standards label Mar 24, 2019
@spamoom
Copy link

spamoom commented Dec 3, 2019

@craigsansam

@craigsansam craigsansam removed the pending Discussions on this RFC have concluded, and the outcome is pending addition to the Code Standards label Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants