1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 13:34:04 +00:00
Commit graph

1286 commits

Author SHA1 Message Date
PHP CS Fixer
470b84d172 Fix code style (php-cs-fixer) 2025-01-16 09:25:44 +00:00
lukinovec
9a2d3bdb80 Delete bootstrapper combining test 2024-12-27 09:02:32 +01:00
lukinovec
c6a524f171 Revert attempt to maintain compatibility between the two bootstrappers 2024-12-27 08:54:14 +01:00
2da2ffbc2b Merge branch 'master' into fix-url-bootstrappers 2024-12-23 21:06:53 +01:00
lukinovec
81917b86fb Improve TenancyUrlGenerator and RootUrlBootstrapperTest clarity 2024-12-23 15:08:41 +01:00
lukinovec
5c8933bd14 Use $this->app instead of app() 2024-12-23 12:58:28 +01:00
lukinovec
4d8b092e56 Fix bootstrapper order in test, add url('/') assertion 2024-12-20 11:22:27 +01:00
354ec1fb2a simplify test: use concrete values instead of overly dynamic code 2024-12-20 03:55:10 +01:00
79444723dd phpstan fix 2024-12-20 03:47:35 +01:00
lukinovec
cb0d7e2902
Improve early identification tests (#66)
* Separate route-level domain identification test from path/request to improve readability WIP

* Get rid of confusing datasets in route-level identifcation tests

* Clean up updated tests

* Simplify early id tests

* Reduce dataset duplication

* Improve test readability, fix false positive,  polish details

* Separate early ID test from defaulting test (WIP)

* Finish improving and correcting the early identification/default route mode tests

* Make flag/default mode usage more clear by improving the docblock in DealsWithRouteContexts

* Fix PHPUnit deprecation warnings

* code review

* code review

---------

Co-authored-by: Samuel Štancl <samuel@archte.ch>
2024-12-20 03:42:23 +01:00
4f94ccb5f7 clarify docblock 2024-12-19 21:50:59 +01:00
Samuel Štancl
e0cfdf09cb
add docblock 2024-12-19 18:58:36 +01:00
58cdae908a Merge branch 'master' into fix-url-bootstrappers 2024-11-25 04:51:57 +01:00
Samuel Štancl
48b916e182
Supported named in-memory SQLite databases (#69)
This PR adds support for named in-memory SQLite databases, making it feasible to use in-memory SQLite for tenant databases in tests.

The usage is simply creating a tenant with 'tenancy_db_name' => ':memory:' and the bootstrapper will automatically update the tenant with a database name derived from its tenant key.

There are static property hooks for keeping these DBs alive (at least one connection needs to be open, they don't have process lifetime and are essentially "refcounted") and closing them when the database is deleted. This gives the user control over the lifetimes of these databases.
2024-11-25 04:48:52 +01:00
Samuel Štancl
85bdbd57f7
Fix pullFromPendingPool() behavior (#70) 2024-11-25 04:44:39 +01:00
PHP CS Fixer
19631f4e9a Fix code style (php-cs-fixer) 2024-11-09 19:54:56 +00:00
56dd4117ab Fix origin id w/ empty header & using full-hostname subdomain records
This makes it possible to have Domain records in both `foo` and
`foo.{centralDomain}` format when using the combined domain/subdomain
identification middleware, or the origin header id mw which extends it.

This commit also refactors some related logic.
2024-11-09 20:48:45 +01:00
c199a6e0c8 Merge branch 'master' of github.com:tenancy-for-laravel/v4 2024-10-11 23:01:25 +02:00
10b214c452 add phpstan ignore 2024-10-11 23:01:12 +02:00
lukinovec
5f8a3d2ffe
Improve the tests where the removed universal_channel() was still used (#64) 2024-10-11 22:50:38 +02:00
a07ba8c76c docker: add composer back 2024-10-11 21:54:10 +02:00
PHP CS Fixer
d4b9972600 Fix code style (php-cs-fixer) 2024-10-11 19:32:21 +00:00
9ee1d63dce sqlite: use WAL journal mode by default 2024-10-11 21:31:54 +02:00
43d821ca49 docker: base Dockerfile on php images, misc improvements 2024-10-11 21:29:54 +02:00
a52efe5cf0 wip broadcasting test fixes 2024-10-03 21:34:05 +02:00
a37dc9b449 reimplement broadcasting channel helpers to support model binding 2024-10-03 21:12:09 +02:00
836a258a78 sqlite: use .sqlite suffix if db.suffix is empty 2024-09-30 16:49:46 +02:00
c6ba62bdd0 ParallelCommand: add -P option for bypassing MAX_PROCESSES 2024-09-30 16:36:37 +02:00
303b52d25a minor improvements to parallelization logic 2024-09-29 12:42:29 +02:00
075789eb91 fix typo in ParallelCommand 2024-09-29 12:25:46 +02:00
f017b6509b fix sysctl string 2024-09-27 23:21:08 +02:00
b01c16f4fc phpstan fixes 2024-09-27 23:16:39 +02:00
39bcbda5d0 parallel commands: core # autodetect, bugfixes, improved output 2024-09-27 23:02:03 +02:00
b4a055315b improve command output 2024-09-27 22:50:22 +02:00
232f3ceb4e update prompts dependency 2024-09-27 21:13:20 +02:00
5929ff9da2 rename mail bootstrapper test file 2024-09-27 21:03:39 +02:00
0c105c6d37 backport ed02943 from v3 2024-09-17 18:29:07 +02:00
0fc105487b Tenant DB manager database() -> connection() 2024-09-12 18:34:45 +02:00
f3e01c1581 fix docblock formatting 2024-09-10 12:02:14 +02:00
8b41ea3184 install command: support noninteractive use 2024-08-30 19:25:54 +02:00
4e126846f9 refactor RootUrlBootstrapper 2024-08-29 22:31:08 +02:00
PHP CS Fixer
9f09c9e6dd Fix code style (php-cs-fixer) 2024-08-29 14:10:45 +00:00
lukinovec
42e7ec329c Take care of doubling tenant keys in TenancyUrlGenerator, add regression test for using UrlGenerator and RootUrl bootstrappers together 2024-08-29 16:09:59 +02:00
lukinovec
2266c47722 Make resolving 'url' return a pre-created generator instance instead of creating it on every app('url') call 2024-08-29 16:02:28 +02:00
lukinovec
ab02d2885c Make RootUrlBootstrapper run ONLY in CLI by default (add $rootUrlOverrideInTests), work with resolved UrlGenerator 2024-08-29 15:58:50 +02:00
lukinovec
2c0f61585d
Make RootUrlBootstrapper only have an effect in CLI (#58)
* Interrupt RootUrlBootstrapper's bootstrap() execution if the app isn't running in console, add docblock

* Improve overrideUrlInTenantContext() documentation [ci skip]

* Improve RootUrlBootstrapper [ci skip]
2024-08-28 00:42:36 +02:00
lukinovec
6b74589d76
Update specific attributes of pending tenants while they're being pulled (#59)
* Add option to update attributes of pending tenants while pulling them

* Fix failing toEqualCanonicalizing tests

* Fix code style (php-cs-fixer)

* fix code errors

* lock phpcsfixer to 3.62.0 due to a bug in 3.63.1

---------

Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
Co-authored-by: Samuel Štancl <samuel@archte.ch>
2024-08-28 00:41:16 +02:00
87e02f207f more phpstan fixes 2024-08-06 18:26:46 +02:00
PHP CS Fixer
a4318d81bd Fix code style (php-cs-fixer) 2024-08-06 02:35:55 +00:00
4372e1bef2 fix phpstan errors 2024-08-06 04:35:25 +02:00