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 Custom Model Support & Fix Iterator Errors #46

Merged
merged 12 commits into from
Jan 24, 2024
Merged

Add Custom Model Support & Fix Iterator Errors #46

merged 12 commits into from
Jan 24, 2024

Conversation

Fludem
Copy link
Contributor

@Fludem Fludem commented Jan 22, 2024

Custom Models

Custom models are required in some scenarios such as having a multi tenant database where we want to enforce that the model uses the central database.

Changes made:

  • Addded model option to configuration file
  • Removed $model property and references in the Filament Resource and replaced with function getModel()
  • Added Model method on FilamentExceptions.php that returns model class
  • Added backwards compatibility to the model method
  • Updated README.md to explain how to use this new feature

Closes #44

Fix Iterator Errors

In order to temporarily supress warnings & errors the \ReturnTypeWillChange attribute has been added to functions inside parser.php

Closes #45

@Fludem Fludem changed the title Add Custom Model Support Add Custom Model Support & Fix Iterator Errors Jan 22, 2024
@bezhanSalleh bezhanSalleh added WTD whatthediff enhancement New feature or request and removed WTD whatthediff labels Jan 22, 2024
Copy link

what-the-diff bot commented Jan 22, 2024

PR Summary

  • Update of README.md file
    Modifications were made to this reference file.
  • Configuration file adjustment
    The configuration file config/filament-exceptions.php was updated with additional and modified options to increase versatility and customization.
  • Functionality enhancement in FilamentExceptions file
    The src/FilamentExceptions.php file now contains a new method for accessing the exception model and an improved method for storing data. This change improves data retrieval and storage process.
  • Modification in the Exception Resource File
    src/Resources/ExceptionResource.php file was altered by updating a method and removing a pre-defined property. This can make the program more efficient.
  • Simplification of Trace Parser file
    The src/Trace/Parser.php file was streamlined by eliminating certain implemented methods. This simplification can lead to better readability and maintainability of code.

@Fludem
Copy link
Contributor Author

Fludem commented Jan 22, 2024

Hey @bezhanSalleh I updated workflow to test bench 8.0, I think it shouldn't cause problems but test workflow again

Copy link
Owner

@bezhanSalleh bezhanSalleh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasn't the issue. the issue was phpunit. could you merge it with the main though, it's fixed now.

@Fludem
Copy link
Contributor Author

Fludem commented Jan 24, 2024

We missing anything

@bezhanSalleh
Copy link
Owner

We missing anything

nah, all seems. good. will do a release tonight. thanks.

@bezhanSalleh bezhanSalleh merged commit c4ae585 into bezhanSalleh:main Jan 24, 2024
5 checks passed
@bezhanSalleh
Copy link
Owner

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error Allow for custom model
2 participants