Samuel Štancl
c2c90ff755
[3.x] Use static properties instead of config for features ( #391 )
...
* Use static properites instead of config for features
* update tests
2020-05-03 18:12:40 +02:00
Samuel Štancl
3bb2759fe2
[3.x] DB users ( #382 )
...
* Initial draft
* Apply fixes from StyleCI
* Use CI on master branch too
* Pass correct argument to queued DB creators/deleters
* Apply fixes from StyleCI
* Remove new interface from MySQLDBManager
* Make phpunit run
* Apply fixes from StyleCI
* Fix static property
* Default databaseName
* Use database transactions for creating users & granting permissions
* Apply fixes from StyleCI
* Get old tests to pass
* Apply fixes from StyleCI
* Add tests for PermissionControlledMySQLDatabaseManager
* Apply fixes from StyleCI
* Write test for extra config, fix bug with extra config
* Apply fixes from StyleCI
2020-05-03 18:12:27 +02:00
Samuel Štancl
60665517a0
[v3] Rename tenant redirect macro ( #389 )
...
* [v3] Rename tenant redirect macro
* update tests
2020-05-03 17:59:59 +02:00
Samuel Štancl
5972364075
[3.x] Rename facades ( #387 )
...
* Remove Facade suffix from facades, fix #386
* Apply fixes from StyleCI
* Fix facade test
2020-05-03 17:59:35 +02:00
Samuel Štancl
5dc80473d3
[2.3.1] Fix exit codes in TenantAwareCommand ( #336 )
...
* Fix exit codes in TenantAwareCommand
* Cast result to int
* Assert exit code 0
2020-03-30 21:09:58 +02:00
Devon Mather
cf339a5e82
Add return value to execute method ( #333 )
...
* Add command for test
* Write test to verify issue
* Make test pass
2020-03-21 02:05:17 +01:00
Samuel Štancl
30bab68b6a
Laravel 7 support ( #304 )
...
* Laravel 7 support
* Remove language from travis.yml
* Fix travis.yml
* Consistent indentation in travis.yml
* Use dev-master for phpcov
* Cleanup
* switch up envs
* verify both laravel versions are used
* 6 -> 7
* Fix travis yml
* Use stable phpcov
* Different installation for Laravel 7
* Indentation
* Fix dockerfile
* Fix indentation
* Fix tests
* Remove fail() calls
2020-03-17 18:47:24 +01:00
Samuel Štancl
526f0826a4
Use seeder params in tenants:seed instead of just the automatic seeder ( #317 )
...
* Use seeder params in tenants:seed instead of just the automatic seeder
* Left trim - from option names
* Use no seeder params for tests
2020-03-17 15:59:45 +01:00
Samuel Štancl
776af4643c
Make null falsey for cache config because config is not merged recursively
2020-03-17 15:30:24 +01:00
Samuel Štancl
f6115d590a
[2.3.0] More identification middleware ( #323 )
...
* Added request data identification middleware (#207 )
* Added request data identification middleware
* Fixed styling
* Changed to Illuminate request instead of helper
* Enabled header and querystring customisation
Co-authored-by: Jesper Jacobsen <joj@webshipper.com>
* Apply fixes from StyleCI
* Use constructor parameter instead of config
* Add tests
* Apply fixes from StyleCI
Co-authored-by: JapSeyz <JapSeyz@JapSeyz.com>
Co-authored-by: Jesper Jacobsen <joj@webshipper.com>
2020-03-17 00:02:57 +01:00
Samuel Štancl
c7c6a7fec8
[2.3.0] Cached tenant lookup ( #316 )
...
* Begin work on cached lookup
* Apply fixes from StyleCI
* wip
* wip cache invalidation
* Apply fixes from StyleCI
* Finish cache invalidation
* Apply fixes from StyleCI
* Remove config from TestCase
* Enable cache in the single test file
* Separate data & domains logic
* Apply fixes from StyleCI
* wip
* Apply fixes from StyleCI
2020-03-14 19:52:35 +01:00
Noor Adiana
d0023c482a
Add support for postgres schema ( #237 )
...
* Add support for postgres schema
* wip
* Apply fixes from StyleCI
* revert to db as default for pgsql
* Move separate_by to database
* Fixing testing
* Fixing style
* Reverted change
* Store string instead of Connection instance
* Remove use statement
* Add use statement for DB facade
* mysql -> pgsql
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2020-03-10 20:15:07 +01:00
Samuel Štancl
292b7acd16
Make asset tenancy optional ( #300 )
2020-02-26 09:14:40 +01:00
Samuel Štancl
98ce0ee294
Make DB creation optional ( #299 )
2020-02-26 08:49:08 +01:00
curious-jim
06ee1ff0e2
Migration paths ( #268 )
...
* allow multiple paths for tenant migrations
* tests: allow multiple paths for tenant migrations
* Update tests/CommandsTest.php
Co-Authored-By: Samuel Štancl <samuel.stancl@gmail.com>
* Update src/Traits/DealsWithMigrations.php
Co-Authored-By: Samuel Štancl <samuel.stancl@gmail.com>
* Update tests/CommandsTest.php
Co-Authored-By: Samuel Štancl <samuel.stancl@gmail.com>
* Update src/Traits/DealsWithMigrations.php
Co-Authored-By: Samuel Štancl <samuel.stancl@gmail.com>
* Update tests/TestCase.php
Co-Authored-By: Samuel Štancl <samuel.stancl@gmail.com>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2020-02-16 12:10:50 +01:00
Samuel Štancl
bb46767257
Add regression test for #271
2020-01-19 12:15:26 +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
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
ccb68f5400
Add test for tenant.creating hook
2019-10-29 21:49:50 +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
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
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
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
Samuel Štancl
a1270189da
[2.1.0] Tenant Run ( #163 )
...
* $tenant->run()
* Add assertion
2019-10-11 21:02:54 +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
24ce8f9454
Disable all features by default
2019-10-04 22:10:02 +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
b66574b1ab
Disable TenantConfig by default
2019-10-04 21:33:48 +02:00
Samuel Štancl
d4472469f0
[2.x] Add CreateTenant command ( #153 )
...
* Add CreateTenant command, fix TenantList output
* Create command test
2019-10-04 20:22:23 +02:00
Samuel Štancl
c965ca5c93
[2.x] Restructure drivers config ( #151 )
...
* Restructure drivers config
* Apply fixes from StyleCI
2019-09-30 18:38:32 +02:00
Samuel Štancl
d0b1729258
[2.x] Migrate fresh ( #148 )
...
* Remove comment
* migrate-fresh first draft
* Final
* DB name -> DB connection
* Add array_filter for consistency with Laravel
* Add test for migrate-fresh
* Apply fixes from StyleCI
2019-09-30 17:01:01 +02:00
Samuel Štancl
56a2bdf5af
[2.x] Tenant config ( #145 )
...
* TenantConfig first draft
* Apply fixes from StyleCI
* Add unsetTenantConfig
* Fix DB storage driver bug, add regression test (tenant_data_can_be_set_during_creation)
* Add tests & config keys
* Apply fixes from StyleCI
2019-09-30 16:52:46 +02:00
Samuel Štancl
4b5554dcac
Fix issues with bootstrappers' state
2019-09-27 22:35:59 +02:00
Samuel Štancl
97d88af798
Disable RedisTenancyBootstrapper by default
2019-09-27 21:08:46 +02:00
Chris Brown
a166de2ef6
Rename migration stubs so they show next to each other ( #127 )
2019-09-25 08:07:01 +02:00
Samuel Štancl
88fbd9779d
Add default value
2019-09-21 20:44:58 +02:00
Samuel Štancl
8dae2dcc6f
Fix db_name_is_prefixed test
2019-09-21 19:37:19 +02:00
stancl
a4ab7ac080
Apply fixes from StyleCI
2019-09-21 17:29:17 +00:00
Samuel Štancl
75f00a58dd
Fix asset tests
2019-09-21 18:13:29 +02:00
Samuel Štancl
bd08979e0c
global_asset test
2019-09-21 17:29:26 +02:00
Samuel Štancl
b9054864aa
Fix forced root
2019-09-21 17:22:33 +02:00
Samuel Štancl
74aead2a60
Add test for tenancy.database.based_on null
2019-09-21 14:06:42 +02:00
Samuel Štancl
c475e7a43d
Fix transactions
2019-09-21 13:54:02 +02:00
Samuel Štancl
eb6cba8f1a
Create MySQL/PostgreSQL DBs while using sqlite as the central DB driver
2019-09-21 11:11:36 +02:00
Samuel Štancl
509d00f9f3
Add docblocks
2019-09-20 20:14:58 +02:00
Samuel Štancl
93fc961b34
Tenant::with
2019-09-20 19:44:05 +02:00
Samuel Štancl
61cc0d9364
Update tenant tests
2019-09-20 19:24:02 +02:00