1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 18:04:03 +00:00
Commit graph

1085 commits

Author SHA1 Message Date
Samuel Štancl
5980c46449 wip 2021-12-30 19:46:48 +01:00
Stefan Ninic
435d8528a7
Fixed array to string conversion (#718)
* Fixed array to string conversion

Previous code would give this warning before actually showing exception message
`<warning>PHP Warning:  Array to string conversion in .../vendor/stancl/tenancy/src/CacheManager.php on line 24</warning>`

* Update variable & syntax

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2021-12-25 22:10:34 +01:00
Samuel Štancl
3ab09ec83d Merge branch '3.x' into v9-test 2021-12-25 16:54:03 +01:00
sort72
08bfd6f9bb
Use tenant key on console commands instead of id (#768) 2021-12-25 15:24:34 +01:00
Frederic Habich
2726f07bca
fixed typo (#766)
fixed typo within description 'searhced' => 'searched'
2021-12-22 13:24:07 +01:00
Samuel Štancl
9883219544 wip 2021-12-13 13:09:16 +01:00
Abrar Ahmad
f12c826df5
Use GitHub forms for issues template. (#755)
* Create bug-report_new.md

* wip

* Delete bug-report.md

* Update bug-report.yml
2021-11-17 21:45:44 +01:00
Jasper Zonneveld
b58b068434
Add missing import for Domain model (#745) 2021-11-03 10:21:51 +01:00
Ralfs Garkaklis
20e1fa1959
Fixed typo (#684) 2021-07-08 13:32:17 +02:00
Roelof Roos
1a5300ab4f
Fix array_unique causing problems in TenancyServiceProvider stub (#672)
Closes #661
2021-06-15 20:43:53 +02:00
stancl
54a33f93a8 Apply fixes from StyleCI 2021-04-22 09:09:22 +00:00
hackerESQ
740d670665
Adds ability to disable tenant asset routes (#636)
* Add option to enable/disable tenant asset route

* Only registers tenant route if enabled in config

* Uses proper config key

* Move routes config option

* Move config to service provider

* Moves config to service provider
2021-04-22 11:09:16 +02:00
stancl
6bcd327b75 Apply fixes from StyleCI 2021-04-22 09:04:14 +00:00
Samuel Štancl
3ee1e36653
Set key type to string when uuids are used 2021-04-22 11:04:06 +02:00
stancl
0d14911538 Apply fixes from StyleCI 2021-04-16 17:57:51 +00:00
Ralfs
c21beabd3e
Fix issue 632: cached lookup (#633)
* Instead of querying Domain model, find Tenant and eager load it's domain via Tenant model. Fixed cached lookup issue - when caching Tenant, also include the current Domain, so it can be later accessed via $tenant->domains->first() (even, when using multiple domains per tenant). Added tenantIdentifiedFromCache method in CachedTenantResolver.php, which can be used to set custom properties in resolvers after Tenant is loaded from cache.

* StlyeCi Fix - removed PHP 8 nullsafe operator for compatibility with older PHP versions, replaced with inline if

* Redundant variable '$domain', because $tenant is not null, only, when current domain is found and relationship is loaded (with only one domain).

* Fixed tenant()->domains showing incorrect data. Renamed tenantIdentifiedFromCache() method and removed duplicate code, when setting current domain.

* Removed select() for better flexibility, added new method setCurrentDomain(), refactored the usage of tenantIdentified().

* rename method to resolved()

* clean up code

* StyleCi Fix

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2021-04-16 19:57:41 +02:00
Michael Lundbøl
27e9fb4a69
Fix arguments being initialized twice for tenants:seed command (#611) 2021-03-10 12:08:51 +01:00
Samuel Štancl
192594ca28
fix badge url 2021-01-16 21:30:48 +01:00
Samuel Štancl
2389751796
Laravel 8 badge 2021-01-16 21:30:11 +01:00
mlajx
1a48725aef
Add static variable for MiddlewareUniversalName. (#581)
* Added middlewareUniversalName static variable to extends and customize the UniversalRoutes class

* change the variable name and undo the code style
2021-01-15 23:31:31 +01:00
Aleksandr Medvedev
04193cc2fd
Add phpdoc parameter to Tenant magic method for better IDE support (#565) 2020-12-19 13:39:16 +01:00
stancl
27fd2e7951 Apply fixes from StyleCI 2020-12-14 12:12:13 +00:00
Samuel Štancl
1fbe9cf3e2
Fix #562 2020-12-14 13:12:03 +01:00
Samuel Štancl
faedc849c9
Update bug-report.md 2020-12-11 08:29:36 +01:00
Samuel Štancl
9e9899349f Simplify docker build, use stable PHP 8 image 2020-12-01 18:20:25 +01:00
Samuel Štancl
30a1f9102d
PHP 8 support (#542)
* PHP 8 support, test workflow syntax

* Try using a custom data structure in the workflow

* Try using matrix include

* Default PHP target

* single include

* fix composer package name

* [WIP] Try using dev-master for valuestore

* Update spatie/valuestore constraint to be stable
2020-11-30 17:30:42 +01:00
Samuel Štancl
126afcd0dd
Terminating pipelines (#527)
* Return false from CreateDatabase job

* Terminating pipeline tests
2020-11-15 16:26:26 +01:00
Samuel Štancl
8f12dd8829
Update TenantCouldNotBeIdentifiedById.php 2020-11-14 16:45:52 +01:00
stancl
19c5820efd Apply fixes from StyleCI 2020-11-13 21:00:16 +00:00
Samuel Štancl
dc60276e6d Inject the Application contract instead of the concrete class 2020-11-13 22:00:02 +01:00
Samuel Štancl
8f34a733d8
Add tenancy()->central() helper (#526)
* Add tenancy()->central() helper

* Apply fixes from StyleCI

* Add docblock

* Fix return typehint

Co-authored-by: stancl <stancl@users.noreply.github.com>
2020-11-13 08:15:24 +01:00
Pete Cooper
dd1b7fc86d
Fix tenants:list when not using multi-domain tenancy (#504)
* Fix tenants:list when not using multi-domain tenancy

* formatting

* update to an if/else
2020-11-12 17:23:58 +01:00
Cristian Tudorache
1c93360077
Fix Typo in TenantCouldNotBeIdentifiedById (#525)
* Fix Typo in TenantCouldNotBeIdentifiedById

* Fix Typo in TenantCouldNotBeIdentifiedById
2020-11-12 15:14:20 +01:00
Dylan Harbour
e0af2e9945
Fix issue 521: Array input for --tenants (#522)
* Fix issue 521: Array input for `--tenants`

Tenancy for Laravel docs refer to using multiple `--tenants=<...> ` options when running a command for multiple tenants explicitly: https://tenancyforlaravel.com/docs/v3/console-commands

However, the command input is not defined correctly to receive arrays.
https://laravel.com/docs/7.x/artisan#input-arrays

This PR adds a failing test, fixes the issue and corrects a typo in the contributing readme.

* Styleci

Co-authored-by: Dylan Harbour <dylanh@ringier.co.za>
2020-11-12 14:08:37 +01:00
Samuel Štancl
f273ed4f1e
Composer 2 (#517) 2020-10-29 11:59:28 +01:00
Samuel Štancl
2cbf8dbd4e
Remove Patreon and kofi 2020-10-25 16:33:49 +01:00
GENL
411d486282
Fix: The database name is displayed when the TenantDatabaseAlreadyExistsException exception is thrown. (#499)
* Fix: The database name is displayed when the TenantDatabaseAlreadyExistsException exception is thrown.

* Fix the code style

Co-authored-by: Henrich <Ekoumelong>
2020-09-23 19:47:35 +02:00
domkrm
894965d1a7
Extend GlobalCache facade from the original facade (#495) 2020-09-18 23:18:21 +02:00
domkrm
218a34c40e
Only bind UUID generator if one is specified in config (#493) 2020-09-16 15:06:24 +02:00
Samuel Štancl
5fe79fea33
Fix initialize() method (#488)
* Fix initialize() method

* Remove useless line
2020-09-08 21:19:39 +02:00
Andre Sayej
36aabb7883
First try at Laravel 8 (#491) 2020-09-08 21:11:56 +02:00
Samuel Štancl
375380cc7e Merge branch '3.x' of github.com:stancl/tenancy into 3.x 2020-09-02 19:45:10 +02:00
Samuel Štancl
3853c4cdcc Make annotations static 2020-09-02 19:45:06 +02:00
Andrei Ioniță
bb5baced2a
Update config links to v3 docs (#486) 2020-09-01 12:38:25 +02:00
Samuel Štancl
14370baaa7
Link to /issues 2020-08-31 21:34:56 +02:00
Samuel Štancl
14078b6720
Make documentation issues a link to tenancy-docs 2020-08-31 21:34:37 +02:00
Samuel Štancl
75ea844741
Delete documentation-issue.md 2020-08-31 21:34:01 +02:00
bepsvpt
1ff82fb2a0
reverse middlewares order before prepend (#479) 2020-08-18 16:02:26 +02:00
Samuel Štancl
2f6ff33bf9 Update typehint 2020-08-13 13:55:22 +02:00
Jørgen Solli
5c887c29f4
Added missing use-declaration (#474) 2020-08-13 13:49:28 +02:00