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

refactor: remove unneeded deleted_at in $allowedFields #963

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Nov 25, 2023

Description

  • deleted_at is not needed for soft deletes.

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

@kenjis kenjis added the refactor Pull requests that refactor code label Nov 25, 2023
@kenjis
Copy link
Member Author

kenjis commented Nov 25, 2023

@paulbalandan Do you know where does array{username: string, status: string, status_message: string, active: bool, last_active: string} come from?
See https://github.com/codeigniter4/shield/pull/963/files#diff-459f49e48ae4f20464cf08fd3256652536435610f4f7db89305fe7269e539ac9

 ------ ---------------------------------------------------------------------------------------------------------- 
  Line   src/Models/UserModel.php                                                                                  
 ------ ---------------------------------------------------------------------------------------------------------- 
  223    Offset 'email' does not exist on array{username: string, status: string, status_message: string, active:  
         bool, last_active: string}.                                                                               
  224    Cannot unset offset 'email' on array{username: string, status: string, status_message: string, active:    
         bool, last_active: string}.                                                                               
  225    Offset 'password_hash' does not exist on array{username: string, status: string, status_message: string,  
         active: bool, last_active: string}.                                                                       
  226    Cannot unset offset 'password_hash' on array{username: string, status: string, status_message: string,    
         active: bool, last_active: string}.                                                                       
 ------ ---------------------------------------------------------------------------------------------------------- 

@kenjis
Copy link
Member Author

kenjis commented Dec 3, 2023

I created an issue: CodeIgniter/phpstan-codeigniter#19

@kenjis kenjis merged commit 9b5c2bf into codeigniter4:develop Dec 4, 2023
34 checks passed
@kenjis kenjis deleted the remove-deleted_at branch December 4, 2023 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Pull requests that refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants