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.
First of all, appreciate the work on this and how quickly you've turned it from an idea into a solution!
I am building a solution for a client which does not require a tenant to have a domain, instead a user is able to select the current tenant by dropdown. This value is then stored in the session data and we set the correct tenant using a custom tenant finder. My only concern here is that currently a tenant 'requires' a domain name as the current table structure of the 'tenants' table forces a non-null unique value for the domains field. This is not a deal-breaker as we could create a random string and fill in the field for tenants which don't have a domain, and then find a way to filter it out from the backend interface when it's not a real domain.
In addition to this, there's also the requirement of a tenant having multiple domains. Whether this consists of the www and non-www variants of their domain, or additional domains that the client may hold and would like assigning to the same tenant.
With that being said, this PR should handle both situations. The PR is not complete in terms of tests or actual real-world testing, however, it provides the basis for a proof of concept and all tests pass. Only 1 existing test had to be modified slightly due to the domain being passed through to the Tenant to be created.
Would welcome any thoughts on this and what additional tests & logic may be required to get such a PR merged if at all possible.
Appreciate your time if you've made it this far 😄
(PS, there's two additional commits to get the test suite working on Windows and to extract some additional MySQL details into the PHPUnit Environment Variables.)