-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add user authentication (#2) #59
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
Open
martinydeAI
wants to merge
7
commits into
develop
Choose a base branch
from
feature/issue-2-user-login
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1850c14
feat: add user authentication (#2)
martinydeAI 349e098
fix(ci): grant db user access to db_test* via mariadb init SQL
martinydeAI 9523285
chore(taskfile): self-heal test DB privileges before running PHPUnit
martinydeAI e2c8c80
fix(ci): create db_test in the mariadb init SQL too
martinydeAI 4f88b53
chore(taskfile): apply migrations as part of site-install
martinydeAI 6b712de
docs: trim the redundant site-install note from user-creation block
martinydeAI 46e417c
style: drop vertical phpdoc alignment; shorten @param/@return blurbs
martinydeAI File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| -- Create the test database used by PHPUnit and grant the application | ||
| -- user access to it (plus any future ParaTest-suffixed siblings). | ||
| -- | ||
| -- Symfony's `when@test` doctrine config appends `_test` to the configured | ||
| -- database name, and the MariaDB image only creates MYSQL_DATABASE and | ||
| -- grants MYSQL_USER on it. Without this file the test suite fails with | ||
| -- either "Unknown database 'db_test'" (database absent) or "Access | ||
| -- denied for user 'db'@'%'" (database present but no grant). | ||
| -- | ||
| -- The `\_test` escape on the GRANT pattern matches `db_test`, | ||
| -- `db_test_paratest_1`, etc. — but not unrelated names like `dbXtest`. | ||
| -- | ||
| -- This file is mounted into `/docker-entrypoint-initdb.d/` and runs | ||
| -- once when the container's data volume is first initialised. The | ||
| -- `task db-prepare-test` target re-applies the same logic for local | ||
| -- devs whose volume predates the mount. | ||
|
|
||
| CREATE DATABASE IF NOT EXISTS `db_test`; | ||
| GRANT ALL PRIVILEGES ON `db\_test%`.* TO `db`@`%`; | ||
| FLUSH PRIVILEGES; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,11 @@ | |
|
|
||
| $config->setRules([ | ||
| '@Symfony' => true, | ||
| // Override the Symfony default that vertically aligns @param / @return | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a preference i added, that (in my opinion). makes comments more readable. |
||
| // columns by padding names and descriptions with spaces. We keep tags | ||
| // left-aligned so descriptions don't get pushed into hard-to-read | ||
| // multi-line wraps. | ||
| 'phpdoc_align' => ['align' => 'left'], | ||
| ]); | ||
|
|
||
| return $config; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the correct approach to ensure a database for testing?