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

Changes 14: Model prop fixes #6499

Merged
merged 4 commits into from
Jun 27, 2024
Merged

Conversation

bastianallgeier
Copy link
Member

@bastianallgeier bastianallgeier commented Jun 20, 2024

This PR …

Reasoning

Our Models run parent::__construct before setting their props. This leads to a situation where ::setContent and ::setTranslations cannot access vital properties, such as isDraft, slug, id etc. because they are not available yet. We cannot properly switch to the Version implementation as long as this is not fixed.

Refactoring

  • Page::__construct calls parent::__construct after setting the props
  • Site::__construct calls parent::__construct after setting the props
  • User::__construct calls parent::__construct after setting the props
  • File::__construct calls parent::__construct after setting the props

Breaking changes

None expected

Ready?

  • In-code documentation (wherever needed)
  • Unit tests for fixed bug/feature
  • Tests and CI checks all pass

For review team

  • Add changes & docs to release notes draft in Notion

@bastianallgeier bastianallgeier force-pushed the v5/changes/13-new-translation-classes branch from 78b12f5 to 241501d Compare June 24, 2024 09:29
@bastianallgeier bastianallgeier force-pushed the v5/changes/14-prop-fixes branch 2 times, most recently from aa92112 to b36eef8 Compare June 24, 2024 10:04
Base automatically changed from v5/changes/13-new-translation-classes to v5/develop June 27, 2024 08:20
@bastianallgeier bastianallgeier marked this pull request as ready for review June 27, 2024 08:23
@bastianallgeier bastianallgeier merged commit a511c57 into v5/develop Jun 27, 2024
11 checks passed
@bastianallgeier bastianallgeier deleted the v5/changes/14-prop-fixes branch June 27, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants