Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add DB config dateFormat to provide default date/time formats #8525

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Feb 7, 2024

Description
See #7177

  • add DB config dateFormat

We should have this config value in the Connection class. Because each connection has the datetime format.

The current DB related class layers:

Entity
Model
Builder
Connection

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

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 think this is the right way for the config, but it still leaves a big question about implementation. Were you planning that as a separate PR?

@ddevsr
Copy link
Collaborator

ddevsr commented Feb 7, 2024

I hope this feature can be used by .env for multiple connection

@kenjis
Copy link
Member Author

kenjis commented Feb 8, 2024

Some people want to use .env too much.
It is only for Config items that may change in different environments.
For example, if you build a development environment, the database host/username/password would be different from these in the production environment.
But why do you need to change the datatime format?

@kenjis
Copy link
Member Author

kenjis commented Feb 8, 2024

@MGatner Yes, I'm going to use these values in Model and DataConverter (DataCaster) #8243.

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'm good with this but there were a lot of differing opinions on the original thread - maybe see if @michalsn and @lonnieezell have thoughts.

@github-actions github-actions bot added the stale Pull requests with conflicts label Feb 10, 2024
Copy link

👋 Hi, @kenjis!

We detected conflicts in your PR against the base branch 🙊
You may want to sync 🔄 your branch with upstream!

Ref: Syncing Your Branch

@kenjis kenjis removed the stale Pull requests with conflicts label Feb 10, 2024
@kenjis kenjis merged commit 3b23657 into codeigniter4:4.5 Feb 12, 2024
47 checks passed
@kenjis kenjis deleted the feat-db-config-dateFormat branch February 12, 2024 01:27
@kenjis kenjis added the database Issues or pull requests that affect the database layer label Feb 12, 2024
@kenjis
Copy link
Member Author

kenjis commented Feb 13, 2024

@MGatner Yes, I'm going to use these values in Model and DataConverter (DataCaster) #8243.

#8538 and #8243. Both are ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.5 database Issues or pull requests that affect the database layer enhancement PRs that improve existing functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants