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

275 commits

Author SHA1 Message Date
Samuel Štancl
72b1b48edd
[3.x] Laravel 11 support (#1180)
* Laravel 11 support

* wip

* trigger ci

* fix ci file

* try setting charset and collation on the default mysql connection

* Set default cache driver to redis in tests

* drop and recreate id column separately in autoincrement_ids_are_supported

* set default redis client to predis in tests

* revert fail-fast

* try reverting TenantModelTest change

* migrate phpunit configuration

* add parent::tearDown() call
2024-03-12 15:04:54 +01:00
chillbram
5fe8825f13
Make universal routes work for controller middleware (#1151)
* Make universal routes work for controller middleware

* add a fallback

---------

Co-authored-by: chillbram <7299762+chillbram@users.noreply.github.com>
Co-authored-by: Samuel Štancl <samuel@archte.ch>
2024-01-25 22:34:47 +01:00
d268a06f5d tests: assert that tenants:run runs only for the specified tenants 2024-01-18 14:30:40 +01:00
Samuel Štancl
85c7465aca remove unnecessary import 2023-09-02 03:20:42 +02:00
Samuel Štancl
caf2267a08 reimplement TenantAssetsController::validatePath() (fixes #1143) 2023-09-02 03:19:37 +02:00
Samuel Štancl
4af70d302f add extra $path validation to TenantAssetsController 2023-08-24 18:21:23 +02:00
Guilherme Saade
d4a99011e6
[3.x] L10 compatibility (#1065)
* Bump dependencies for Laravel 10

* Update GitHub Actions for Laravel 10

* ci: do not test L10 using PHP 7.3

* drop < L9 support

* use `dispatch_sync` instead of `dispatch_now`

* migrate phpunit configuration

* Update ci.yml

* drop laravel < 9 support

* misc L10 fixes, new docker image

* specify odbc version

* wip

* properly list php versions as strings

* minor changes

* Add `getValue($queryGrammar)` to raw query

* Clean up `isVersion8` code

* rewrite hasFailed assertion

* phpunit schema update

* Upgrade `doctrine/dbal`

---------

Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
Co-authored-by: lukinovec <lukinovec@gmail.com>
2023-02-16 17:21:06 +01:00
Samuel Štancl
596c47329a remove import of Foundation\Vite in tests 2022-09-28 17:17:21 +02:00
Samuel Štancl
8ecdb49531 skip vite test in Laravel < 9 2022-09-28 16:49:41 +02:00
Samuel Štancl
ab2af5b388 rewrite ViteBundlerTest to phpunit syntax 2022-09-28 16:43:20 +02:00
Wilsen Hernández
d093c1387d [3.x] Add Vite helper for tenancy (#956)
* Add Vite helper for tenancy

* Move Vite bundler to an Optional Feature

* Rename to foundation vite

* Add ViteBundlerTest

* Add missing end of file

* Update tests

* remove unnecessary end() call

Co-authored-by: Samuel Štancl <samuel@archte.ch>
2022-09-28 16:24:49 +02:00
George Bishop
1ea3cefa1d
Add support for nested tenant config override (#920)
* feat: add support for nested tenant config override

* test: ensure nested tenant values are mapped
2022-08-21 16:43:01 +02:00
Bram Wubs
747c192979
Fix ArgumentCountError on the TenantAssetsController (#894)
* Fix ArgumentCount exception on the TenantAssetsController when no `$path` is provided

* CS

* CS

* Handle null case explicitly

* code style

Co-authored-by: Bram Wubs <bram@sibi.nl>
Co-authored-by: Samuel Štancl <samuel@archte.ch>
2022-07-20 21:35:33 +02:00
Nathan Dunn
40bf576e00
[3.x] Update PostgreSQLSchemaManager to set correct config key value (#840)
* Update PostgreSQLSchemaManager to set correct config key value

* Update to use version_compare

* Update TenantDatabaseManagerTest

* Improve TenantDatabaseManagerTest

* Update TenantDatabaseManager
2022-04-08 03:13:29 +02:00
Samuel Štancl
349125c02e
Merge hotfix branch (#834)
* try specifying the signature in __construct

* constructor doesn't work since Reflection is used, try specifying getDefaultName() instead

* Fixed: make migration commands compatible

* Fix failing tests

* Fix username generation

* Re-create tmp dir as well if needed

* wip
2022-03-30 18:00:55 +02:00
Samuel Štancl
e1ae6f4380 re-add queuetest.json 2022-03-23 20:57:15 +01:00
Samuel Štancl
5026f54a6d fix path prefixing 2022-03-23 20:48:55 +01:00
Erik Gaal
79e3d53b06
[3.x] Compatibility with Laravel 9 (#802)
* Test on Laravel 9

* Don't extend final Kernel class

* Make FilesystemTenancyBootstrapper compatible with Flysystem v3

Co-authored-by: George <jiri.zizka@funfirst.cz>

* Update tenant maintenance mode te be in line with Laravel

* Exclude PHP 7.4 <> L9 combination from testing

* add root_override-related assertions

* getPrefix -> getPathPrefix

* handle / inconsistency in s3 prefix

* Refactor Storage facade changes

Co-authored-by: George <jiri.zizka@funfirst.cz>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2022-03-08 01:50:25 +01:00
Samuel Štancl
8e9485f9b1 add empty queuetest.json 2022-02-19 16:31:31 +01:00
Samuel Štancl
27f916c323 end tenancy in queue if the next job is not tenant aware 2022-02-19 16:12:38 +01:00
Erik Gaal
9c79267e24
Fix .env loading in development (#799)
* Upgrade vlucas/phpdotenv to ^5.0

`Dotenv::create($paths)` was the syntax for releases before v4

* Remove vlucas/phpdotenv dependency and make it work with newer versions.
2022-02-14 14:31:01 +01:00
Samuel Štancl
a83568ded2 Only use JobRetryRequested in Laravel 8 2021-12-31 18:28:37 +01:00
Samuel Štancl
49ef28da05 6.x support 2021-12-31 18:19:53 +01:00
Samuel Štancl
73a4a3018c Improve queue tenancy 2021-12-31 18:10:03 +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
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
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
d20056b804 Fix subdomain middleware 2020-08-01 15:07:10 +02:00
stancl
dbc77a110e Apply fixes from StyleCI 2020-07-06 12:45:10 +00:00
Samuel Štancl
f483d0b8cf Extract VirtualColumn package 2020-07-06 14:44:49 +02:00
Samuel Štancl
405a137ca1 Better solution for tenant DB exception 2020-06-29 12:18:03 +02:00
Samuel Štancl
41aead5da2 Revert "Get rid of TenantDatabaseDoesNotExist exception"
This reverts commit fe52a3c4ea.
2020-06-29 12:14:58 +02:00
Samuel Štancl
0c575f2463 Merge branch '3.x' of github.com:stancl/tenancy into 3.x 2020-06-29 09:59:23 +02:00
Samuel Štancl
fe52a3c4ea Get rid of TenantDatabaseDoesNotExist exception 2020-06-29 09:58:37 +02:00
stancl
c8ed904d16 Apply fixes from StyleCI 2020-06-28 16:25:43 +00:00
Samuel Štancl
8bf673098b Fix guzzle issue 2020-06-28 18:24:41 +02:00
Samuel Štancl
02e049b59e Convert domains to lowercase, persist current domain model on resolver 2020-06-28 11:45:08 +02:00
Samuel Štancl
e93e766f92 Remove unnecessary typehints 2020-06-08 21:35:41 +02:00
Samuel Štancl
6735d0a589 Switch to using MySQL for tests, resolve FK constraint issues 2020-06-07 10:28:55 +02:00
stancl
e1c79bab11 Apply fixes from StyleCI 2020-06-02 18:26:37 +00:00
Samuel Štancl
ba7257670f Add check to invalidateCache() 2020-06-02 20:26:17 +02:00
Samuel Štancl
da23662d7b Clenup for resource syncing 2020-06-01 09:51:22 +02:00
Samuel Štancl
6dad6ce49a Allow array values for Tenant Config
Closes #412
2020-05-30 17:14:56 +02:00
Samuel Štancl
579779b88b Move DatabaseManager 2020-05-30 15:38:29 +02:00
stancl
d94ff22170 Apply fixes from StyleCI 2020-05-26 11:25:35 +00:00
Samuel Štancl
ed200ab733 Universal routes 2020-05-26 13:25:24 +02:00
Samuel Štancl
2839f45196 Refactor models & config 2020-05-24 20:40:10 +02:00
Samuel Štancl
f0ff8248e7 Clean up global state in tests 2020-05-22 20:08:50 +02:00
stancl
f639909eb7 Apply fixes from StyleCI 2020-05-22 10:34:35 +00:00
Samuel Štancl
800e8d5a56 Enable caching in initialization mw 2020-05-22 12:34:25 +02:00