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

Fix doctrine mapping & add smoketest that fails on invalid schema #170

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

johanib
Copy link
Contributor

@johanib johanib commented Jan 6, 2025

This change:

  • Adds support for integration/smoke tests
  • Adds an integration test that saves something to the database
  • Add doctrine schema validate to the pipeline
  • Adds a migration that makes the PublicKeyCredentialSource compatible with the upstream webauthn-framework
  • Configure the correct db engine version in doctrine to prevent invalid doctrine mapping

@johanib johanib linked an issue Jan 7, 2025 that may be closed by this pull request
@johanib johanib force-pushed the feature/update_schema branch 3 times, most recently from b59c8b9 to 77dd85c Compare January 7, 2025 11:01
@johanib johanib changed the title Add smoketest that fails on invalid schema Fix doctrine mapping & add smoketest that fails on invalid schema Jan 7, 2025
@johanib johanib self-assigned this Jan 7, 2025
@johanib johanib force-pushed the feature/update_schema branch 5 times, most recently from c39423b to 8450e99 Compare January 9, 2025 12:25
@johanib johanib marked this pull request as ready for review January 9, 2025 12:26
Run integration tests in pipeline

Add doctrine schema validate to pipeline
Prior to this change, the PublicKeyCredentialSource entity could not be
saved, because a 3rd party web authn package which we extend
PublicKeyCredentialSource from has new db fields. This resulted in sql
errors.

This change implements the required fields and adds a migration.

Fixes #143
Caused by dd32c26#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R37

See web-auth/webauthn-framework#592
See https://github.com/web-auth/webauthn-framework/releases/tag/4.8.6
Prior to this change, doctrine would detect changes in the entity mapping vs the actual database schema.

```sql
ALTER TABLE users CHANGE icon icon VARCHAR(255) DEFAULT NULL;
ALTER TABLE public_key_credential_sources CHANGE other_ui other_ui LONGTEXT DEFAULT NULL COMMENT '(DC2Type:array)';
```

This changes tells doctrine the correct MySQL version, so it no longer wants to change the database.
@johanib johanib force-pushed the feature/update_schema branch from 8450e99 to b2764c4 Compare January 9, 2025 12:34
@johanib johanib requested a review from pablothedude January 9, 2025 12:37
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.

Make migrations compatible with latest webauthn-framework
2 participants