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

Add tests, fix PHPStan issues in tests, move misplaced integration test. Some minor bugfixes #2569

Merged
merged 15 commits into from
Nov 21, 2023

Conversation

chrieinv
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #2569 (cb505d5) into master (31fc9fb) will increase coverage by 1.73%.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2569      +/-   ##
============================================
+ Coverage     63.35%   65.08%   +1.73%     
+ Complexity     2732     2731       -1     
============================================
  Files           278      278              
  Lines         12131    12128       -3     
============================================
+ Hits           7685     7894     +209     
+ Misses         4446     4234     -212     
Components Coverage Δ
contentauthor 65.08% <100.00%> (+1.73%) ⬆️

@chrieinv chrieinv marked this pull request as ready for review October 10, 2023 13:28
@emmachughes
Copy link
Member

emmachughes commented Oct 11, 2023

Regarding the added @var annotations (e.g. on Model::factory()->create()), are these necessary? They aren't for me, my IDE gets code completion without them, and from what I can tell, they don't do anything for PHPStan either.

@chrieinv
Copy link
Contributor Author

I've had issues with the IDE not giving code completion in some cases.
Most of the fixes was the User model, and a closer inspection reveals that the User factory is missing the @template-extends in PHPDoc. Is there any reason why it shouldn't be added to the User factory?
The annotation is not required in most cases when using factory, but Model::factory()->count(3)->create() or Model::factory(3)->create() still seems to require it.

@emmachughes
Copy link
Member

I think it's probably fine to add the annotation for UserFactory. It was initially left out because the User class doesn't represent an actual database table.

@chrieinv chrieinv merged commit 634a178 into master Nov 21, 2023
8 checks passed
@chrieinv chrieinv deleted the unit-tests-and-minor-fixes-202310 branch November 21, 2023 07:25
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