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

1350 commits

Author SHA1 Message Date
943b960718 lower laravel/prompts minimal version 2024-04-09 16:16:03 +02:00
Samuel Štancl
d9ca3cec38
Misc test fixes (#44)
* Add suffix_storage_path test

* Get filesystem bootstrapper coverage to 100%

* Delete enabling DB bootstrapper in TestCase

* Complete most of test todos

* Complete last tests todo

* Fix docblock

* add todo

---------

Co-authored-by: lukinovec <lukinovec@gmail.com>
2024-04-06 19:17:34 +02:00
489fbb9402 add prompts to tenant:tinker 2024-04-06 01:22:14 +02:00
4cc9fbe7ea fix bootstrapper names in config 2024-04-05 20:04:42 +02:00
4f76af7673 Merge branch 'master' of github.com:tenancy-for-laravel/v4 2024-04-05 19:49:02 +02:00
ac5948dfd1 add Tenancy::$findWith 2024-04-05 19:48:50 +02:00
lukinovec
be031ad45a Clear bootstrappers in TestCase 2024-04-04 18:04:45 +02:00
5ef7604e17 phpstan fix 2024-04-03 19:51:07 +02:00
PHP CS Fixer
47364007aa Fix code style (php-cs-fixer) 2024-04-03 17:47:00 +00:00
6f4b9dadf1 add tenant:tinker command 2024-04-03 19:46:27 +02:00
29d1469651 use getAttribute() in HasDatabase to support encrypted columns 2024-04-02 20:25:17 +02:00
711352db38 make MigrateFreshOverride compatible with Laravel 11.2 2024-04-02 20:19:15 +02:00
1d80604cff Enable single_line_empty_body phpcsfixer rule 2024-04-02 04:31:03 +02:00
Samuel Štancl
a41ad69023
Filesystem logic refactor, improved defaults for cache tenancy (#42)
* refactor FilesystemTenancyBootstrapper

* clean up tests and improve coverage

* minor maintenance mode changes

* Improve tenants:migrate --skip-failing logic

* make tenants:migrate output consistently formatted

* minor RootUrlBootstrapper + misc changes

* cache bootstrapper-related improvements

* Fix code style (php-cs-fixer)

* misc refactor

* Fix code style (php-cs-fixer)

* add %original_storage_path% to fs bootstrapper, improve default config for cache

* rename method

* inject concrete implementations where needed instead of abstracts

* Fix code style (php-cs-fixer)

* refactor DealsWithTenantSymlinks

* remove obsolete phpstan ignore

---------

Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2024-04-02 04:26:10 +02:00
PHP CS Fixer
4b6fa22aa7 Fix code style (php-cs-fixer) 2024-03-29 20:42:20 +00:00
f8512886a0 fix tenants:list and tenants:dump --prune 2024-03-29 21:41:50 +01:00
Samuel Štancl
9f94505cb4
Rename bootstrappers (#40)
* SessionTenancyBootstrapper -> DatabaseSessionBootstrapper

* FortifyRouteTenancyBootstrapper -> FortifyRouteBootstrapper

* BatchTenancyBootstrapper -> JobBatchBootstrapper

* ScoutTenancyBootstrapper -> ScoutPrefixBootstrapper, also fix logic and remove todo

* MailTenancyBootstrapper -> MailConfigBootstrapper

* PrefixCacheTenancyBootstrapper -> CacheTenancyBootstrapper

* remove todo

* improve config file
2024-03-28 03:18:23 +01:00
Samuel Štancl
0c11f29c19
Resolver refactor, path identification improvements (#41)
* resolver refactor

* Fix code style (php-cs-fixer)

* make tenant column used in PathTenantResolver configurable, fix phpstan errors, minor improvements

* support binding route fields, write tests for customizable tenant columns

* Invalidate cache for all possible columns in path resolver

* implement proper cache separation logic for different columns used by PathTenantResolver

* improve return type

---------

Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2024-03-28 03:18:11 +01:00
Samuel Štancl
dc430666ba
Add more tenant key generators (#36)
* Add RandomHexGenerator, create new namespace

* phpstan ignore

* add base64 generator

* add note about base64 being case sensitive

* docblock updates

* replace old UUIDGenerator with a class that throws an exception

* replace base64 generator with a random string generator

* Fix namespace

* Fix code style (php-cs-fixer)

* add test for the deprecated uuid generator

* update comments

---------

Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2024-03-28 03:17:55 +01:00
bf1ba69fe3 add $ignoreExisting static property to CreateDatabase 2024-03-27 21:44:30 +01:00
fdd401fc8f Fix tenant asset controller middleware() logic 2024-03-27 16:44:17 +01:00
d243309bcf minor testcase changes 2024-03-24 04:35:04 +01:00
1d42f33d34 better defaults 2024-03-24 04:28:11 +01:00
6c5bde7d07 add todo 2024-03-20 12:23:29 +01:00
d9d9d047b6 merge 2024-03-19 20:36:43 +01:00
cc2d555e3e Write test for specifying headers in TenantAssetController, fix error introduced in previous commit 2024-03-19 20:36:01 +01:00
PHP CS Fixer
d0cbee0aa3 Fix code style (php-cs-fixer) 2024-03-19 19:27:16 +00:00
a39da042af Add the option to set headers and middleware in TenantAssetController 2024-03-19 20:26:38 +01:00
a0da54cfdc categorize todos 2024-03-12 17:29:00 +01:00
a85708429e add todo 2024-03-12 17:22:23 +01:00
Samuel Štancl
fd6070ff1b
Update SQL syntax in tests for MySQL 8 (#35)
* Bump MySQL to v8 in CI

* Remove `identified by` from queries executed in tests
2024-03-12 16:34:20 +01:00
ce8e74e978 Remove Laravel 10 from CI matrix 2024-03-12 16:16:52 +01:00
d6b5a6ab6c remove HasPending from the base Tenant model 2024-03-03 06:49:37 +01:00
e8c3c75d7c Simplify TenantWithDatabase interface, move tenantConfig() logic 2024-03-01 10:48:33 +01:00
PHP CS Fixer
8a269f8dd8 Fix code style (php-cs-fixer) 2024-03-01 07:42:38 +00:00
af3b693dd1 Simplify Tenant contract (remove run method), move run logic to Tenancy, add generics 2024-03-01 08:42:11 +01:00
Samuel Štancl
32a063b834
Laravel 11 support + Docker improvements (#29)
* wip

* bump jobpipeline dependency

* bump pest dependency

* fix composer.json syntax

* minor changes to docker setup

* more docker changes

* compact pest output, remove unnecessary env vars from composer.json

* minor pest tweaks

* mssql fix

* try enabling colors in CI

* try setting --columns=max for pest in CI

* try setting columns using env var instead of --columns in CI

* Revert "try setting columns using env var instead of --columns in CI"

This reverts commit eb3c177aefa97b0a3140d7f0e89c5012a854ff42.

* replace --compact with --no-progress

* try setting a hardcoded columns value in CI

* remove --columns (doesn't work), add back --compact

* try setting COLUMNS to a hardcoded value in CI

* remove alternative env syntax from CI

* fix PrefixCacheBootstrapperTest on L11, skip on L10

* add one more skip() call

* fix validate.yml

* Simplify schema dump, skip dump-related tests in L10

* Rename 'dump' table to 'example'

* Bring schema dump-related tests together, add comments

* Merge schema path-related tests into one, add comments

* Rename dataset parameter

---------

Co-authored-by: lukinovec <lukinovec@gmail.com>
2024-02-18 00:18:31 +01:00
Samuel Štancl
d2ab2dacf2
Merge pull request #32 from tenancy-for-laravel/merge-3x-feb2024
Merge 3.x into master
2024-02-11 00:23:32 +01:00
bcf8256ef6 Merge branch 'merge-3x-feb2024' of github.com:tenancy-for-laravel/v4 into merge-3x-feb2024 2024-02-11 00:08:15 +01:00
4b52fed4a0 fix more files broken in automerge 2024-02-11 00:07:38 +01:00
PHP CS Fixer
640305284b Fix code style (php-cs-fixer) 2024-02-10 23:04:12 +00:00
56a6f25dac fix phpstan errors 2024-02-10 23:55:56 +01:00
2eda22772c import Exception 2024-02-10 23:51:04 +01:00
a7368264c2 remove duplicate method from automerge 2024-02-10 23:40:04 +01:00
99706f95ef fix ci.yml 2024-02-10 23:37:46 +01:00
7c29764d81 Merge remote-tracking branch 'origin/3.x' 2024-02-10 23:34:47 +01:00
fe4ee6336f Merge remote-tracking branch 'origin/merge-3.x' 2024-02-10 23:02:12 +01:00
Samuel Štancl
05e2167e9b
Merge pull request #31 from tenancy-for-laravel/merge-public-repo-master
Merge archtechx/tenancy master into v4/master
2024-02-10 22:01:32 +01:00
a430b1de29 Merge remote-tracking branch 'origin/master' into merge-public-repo-master 2024-02-10 21:55:54 +01:00
lukinovec
222bbe4c02
Final filesystem-related changes (#25)
* Change %tenant_id% to %tenant%

* ID -> key

---------

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2024-02-10 19:13:02 +01:00