Samuel Štancl
609b6f12cf
Remove typehints passed to route()
2019-12-06 22:34:02 +01:00
Samuel Štancl
f99ecb72c7
Don't accept closures in tenant() helper
2019-12-03 22:52:30 +01:00
Samuel Štancl
9851f088ea
Make route parameter optional, fix #240
2019-12-03 22:49:20 +01:00
Samuel Štancl
a8f84d2808
Accept closures in tenant() helper
2019-12-02 17:57:16 +01:00
Samuel Štancl
fd00be646e
[2.3.0] tenant_route() helper ( #229 )
...
* Add tenant_route helper
* Add tests
* Remove redundant setUp()
* Fix test namespaces
* Apply fixes from StyleCI
2019-11-29 00:12:07 +01:00
Samuel Štancl
f34986b29f
[2.2.0] Tenant aware commands ( #221 )
...
* wip
* Apply fixes from StyleCI
* Return value when a single tenant is passed
* array map -> foreach
* bug fixes
2019-11-10 12:32:26 +01:00
Samuel Štancl
2b00665247
[2.2.0] Allow --path to be specified for migration commands ( #211 )
...
* Allow --path to be specified for migration commands
* Fix tests
2019-11-07 21:44:45 +01:00
Samuel Štancl
0edb751e26
Update config key
2019-11-06 18:02:12 +01:00
Samuel Štancl
e953b18eb3
Register tenant routes after other SPs are executed ( #216 )
2019-11-05 23:33:57 +01:00
Samuel Štancl
0616e608aa
Update docblock
2019-11-04 22:07:07 +01:00
Samuel Štancl
1ef061ffc7
Array with global MW
2019-11-04 18:36:22 +01:00
Samuel Štancl
31c9930c93
[2.2.0] Timestamps ( #213 )
...
* Timestamps
* Apply fixes from StyleCI
* Add void typehint
* wip
* Fix tests
* Apply fixes from StyleCI
2019-11-04 17:56:08 +01:00
Samuel Štancl
aeb15d4251
Fix Tenant::new()
2019-10-30 18:22:17 +01:00
Samuel Štancl
9c4f678321
Merge branch '2.x' of github.com:stancl/tenancy into 2.x
2019-10-30 18:11:56 +01:00
Samuel Štancl
8639e51c93
Clean up dependencies
2019-10-30 18:10:43 +01:00
Samuel Štancl
ab04ef025b
[2.2.0] Universal routes ( #210 )
...
* Universal routes
* Fix bugs
* Add universal MW group
2019-10-30 15:50:00 +01:00
Samuel Štancl
518ac4947c
Add extra dispatchNow tenancy init check
2019-10-29 22:06:42 +01:00
Samuel Štancl
eecadd6d39
Updating event
2019-10-29 20:16:45 +01:00
Samuel Štancl
596d43da2e
No need to use & for object methods
2019-10-29 20:12:24 +01:00
Samuel Štancl
44b2846bcd
Don't hardcode data
2019-10-29 19:53:15 +01:00
Samuel Štancl
7bc58f3980
Simplify reduce
2019-10-28 21:00:34 +01:00
Samuel Štancl
09412cd7ad
Pass variable
2019-10-28 15:27:32 +01:00
Samuel Štancl
853fdb19fa
Only put to storage when persisted
2019-10-28 15:01:14 +01:00
Samuel Štancl
464832be29
Pass arguments to events by reference
2019-10-28 14:59:25 +01:00
Samuel Štancl
3ec4314e91
[2.2.0] Optional storage path suffixing ( #197 )
...
* Optional storage path suffixing
* Default value true
2019-10-27 21:49:28 +01:00
Samuel Štancl
869ac32983
[2.2.0] [WIP] Add functionality ( #206 )
...
* TenantDatabaseDoesNotExistException
* Apply fixes from StyleCI
* User post-creation callbacks
* Rename method
* postCreationActions
* pass $tenant as parameter
* pass $tenant to async actions
* WIP findBy()
* findBy\* ForwardsCalls
* Apply fixes from StyleCI
* findBy DB storage driver
* Redis SD TODO message
* Apply fixes from StyleCI
* Fix chained jobs
* WIP event system
* import str
* instanceof closure check
* findBy instead of find
* Tenant -> Tenants
* dots
* Use DB hooks instead of a SC key
* Don't allow callables for queue chain
* CanDeleteKeys interface
* Apply fixes from StyleCI
* CanFindByAnyKey interface
* Apply fixes from StyleCI
* Ditch models for custom repositories
* Resolve circular dependency
* Apply fixes from StyleCI
* Fix tests
* Apply fixes from StyleCI
* FutureTest
* Prefix tenant events with 'tenant.'
* Event listener arguments test
2019-10-27 21:10:41 +01:00
Samuel Štancl
7389f44de9
[2.2.0] Use Tenant Run in console commands ( #205 )
...
* Utilize Tenant Run in commands
* Apply fixes from StyleCI
2019-10-27 20:50:49 +01:00
JapSeyz
77df467567
Fixes an issue where tests wouldn't have tenants in the tearDown method ( #198 )
...
* Fixes an issue where tests wouldn't have tenants in the tearDown method
* Styling
2019-10-26 21:18:03 +02:00
Samuel Štancl
bb4dc196b0
[2.2.0] Make tenancy initialization in global MW stack optional ( #203 )
...
* Make tenancy initialization in global MW stack optional
* update config key
2019-10-26 21:17:28 +02:00
Samuel Štancl
d4beae32ca
Add docblocks to helpers
2019-10-23 08:14:30 +02:00
Samuel Štancl
6fdc041f88
Don't purge centrail connections - fix issue caused by writing a regression test ( #192 )
2019-10-20 09:45:03 +02:00
Samuel Štancl
f489aba819
Respect custom columns during tenant creation ( #191 )
2019-10-20 00:27:52 +02:00
Samuel Štancl
479df83027
[2.x] Don't purge central connections ( #189 )
...
* Make sure central connections aren't ever purged
* Extract setDefaultConnection()
* Regression test w/ markTestIncomplete()
* Apply fixes from StyleCI
2019-10-19 23:52:13 +02:00
Samuel Štancl
c8a0a58df6
Create routes/tenant.php only if the file does not exist ( #188 )
...
* Create routes/tenant.php only if the file does not exist
* Move tenant routes to a stub file
2019-10-19 22:03:03 +02:00
Samuel Štancl
cfcb2574c2
[2.1.0] Central queue connections ( #181 )
...
* Central queues
* Better dependency injection
* tenancy=false => central=true; move config to env setup
* Apply fixes from StyleCI
2019-10-17 21:00:52 +02:00
Chris Brown
d5b01219fd
[2.x] Allow automatic seeding after automatic migrations ( #160 )
2019-10-17 19:25:30 +02:00
Jona Goldman
58fbdd5281
Use config charset and collation for MySQL ( #180 )
...
* Use config charset and collation for MySQL
* respect code styling
2019-10-17 14:00:33 +02:00
Samuel Štancl
3e78410d8a
[2.1.0] Fix queue race conditions ( #178 )
...
* Add TenantDoesNotExist exception, fix queued migrator serialization
* wip
* Apply fixes from StyleCI
* Use only one config for queueing
* Apply fixes from StyleCI
* rename test
* rename test
2019-10-17 13:55:10 +02:00
Samuel Štancl
cbd3850a8f
[2.1.0] Initialize tenancy before executing controller constructors ( #169 )
...
* Update message about migrations in Install
* wip
* Apply fixes from StyleCI
* string instead of array
* Fix globalUrl binding
* Simplify if condition in TenantRouteServiceProvider
* Apply fixes from StyleCI
* Improve PreventAccessFromTenantDomains - look into middleware subgroups
* Fix typo
* gatherMiddleware() instead of middleware()
* Fix tests
* Apply fixes from StyleCI
* Update install command
* Apply fixes from StyleCI
* Add the PreventAccess MW to tenant routes by default
2019-10-15 20:23:56 +02:00
Chris Brown
7143bce5f9
Update PreventAccessFromTenantDomains.php ( #171 )
...
* Update PreventAccessFromTenantDomains.php
* Update PreventAccessFromTenantDomains.php
* Update PreventAccessFromTenantDomains.php
2019-10-14 15:51:26 +02:00
Samuel Štancl
a1270189da
[2.1.0] Tenant Run ( #163 )
...
* $tenant->run()
* Add assertion
2019-10-11 21:02:54 +02:00
Chris Brown
cc74e9f3ca
Add migration reminder to install command ( #159 )
2019-10-09 19:50:09 +02:00
franzyke
f9c9bf088d
Fix typo ( #161 )
...
config `tenant_route_namespace` is used instead of
`tenancy.tenant_route_namespace`
2019-10-09 07:52:42 +02:00
Chris Brown
14843b4291
Refactor Config\Repository dependencies to use Contract ( #157 )
...
Fixes #156
2019-10-08 21:34:49 +02:00
Samuel Štancl
eea5ec908e
Update docblock
2019-10-04 23:17:14 +02:00
Samuel Štancl
13fbb9d6b3
Merge branch '2.x' of github.com:stancl/tenancy into 2.x
2019-10-04 22:47:12 +02:00
Samuel Štancl
6d00b9b866
Use $data instead of get() in TenantConfig
2019-10-04 22:32:43 +02:00
Samuel Štancl
abd0b8f04e
[2.x] Queued post-creation automigration ( #154 )
...
* Queued post-creation automigration
* Add shouldQueueMigration()
* Automigration test, config key, QueueTenancyBootstrapper support for QueueFake
* Apply fixes from StyleCI
* Fix if statement
2019-10-04 21:34:17 +02:00
Samuel Štancl
f77a929113
getDatabaseName() -> getConnectionName()
2019-10-04 21:31:21 +02:00
Samuel Štancl
709e295048
Use correct DB connection in seed command
2019-10-04 21:23:06 +02:00