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

More clear feedback on typo in model class setup. #340

Closed
wants to merge 1 commit into from

Conversation

dereuromark
Copy link
Member

@dereuromark dereuromark commented Jan 4, 2024

I had a typo in the model class BitmaskedRecords and things appeared to work fine, even though the model was never loaded.

		$this->loadComponent('Search.Search', [
			'actions' => ['bitmaskSearch'],
			'queryStringWhitelist' => ['type'],
			'modelClass' => 'Sandbox.BitmaskedRecords',
		]);

and I didnt notice that things are wrong, only when looking closer to the reason why the reset button would not show.
With this info it should be clear that a configured value would need to exist or should otherwise be left null/empty.

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (d39e8f3) 90.65% compared to head (a9f5051) 90.09%.

Files Patch % Lines
src/Controller/Component/SearchComponent.php 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #340      +/-   ##
============================================
- Coverage     90.65%   90.09%   -0.57%     
- Complexity      222      223       +1     
============================================
  Files            19       19              
  Lines           642      646       +4     
============================================
  Hits            582      582              
- Misses           60       64       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ADmad
Copy link
Member

ADmad commented Jan 5, 2024

If the issue was about the model not being found/loaded then changes should be done to the try/catch block above which has the fetchTable() call, not when checking for the behavior.

@dereuromark dereuromark closed this Jan 8, 2024
@dereuromark dereuromark deleted the better-feedback branch January 8, 2024 06:05
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