1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 14:14:04 +00:00
Automatic multi-tenancy for Laravel. No code changes needed. https://tenancyforlaravel.com
Find a file
Samuel Štancl eecf6f21c8
Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43)
* Run cache tests on all supported drivers

* update ci healthcheck for memcached

* remove memcached healthcheck

* fix typos in test comments, expand internal.md [ci skip]

* add empty line [ci skip]

* switch to using $store->setPrefix()

* add dynamodb

* refactor try-finally to try-catch

* remove unnecessary clearResolvedInstances() call

* add dual Cache:: and cache() assertions

* add apc

* Flush APCu cache in test setup

* Revert "add dual Cache:: and cache() assertions"

This reverts commit a0bab162fbe2dd0d25e7056ceca4fb7ce54efc77.

* phpstan fix

* Add logic for scoping 'file' disks to FilesystemTenancyBootstrapper

* minor changes, add todos

* refactor how the session.connection is used in the DB session bootstrapper

* add session forgery prevention logic to the db session bootstrapper

* only use the fs bootstrapper for file disk in 'cache data is separated' dataset

* minor session scoping test changes

* Add session scoping logic to FilesystemTenancyBootstrapper, correctly update disk roots even with storage_path_tenancy disabled

* Fix code style (php-cs-fixer)

* update docblock

* make not-null check more explicit

* separate bootstrapper tests, fix swapped test names for two tests

* refactor cache bootstrapper tests

* resolve global cache todo

* expand tests: session separation tests, more filesystem separation assertions; change prefix_base-type config keys to templates/formats

* add apc session scoping test, various session separation bugfixes

* phpstan + minor logic fixes

* prefix_format -> prefix

* fix database session separation test

* revert composer.json changes, update laravel dependencies to expected next release

* only run session scoping logic in cache bootstrapper for redis, memcached, dynamodb, apc; update gitattributes

* tenancy.central_domains -> tenancy.identification.central_domains

* db session separation test: add datasets

---------

Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2024-04-09 20:40:27 +02:00
.github Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43) 2024-04-09 20:40:27 +02:00
art Update artwork 2020-06-09 15:36:47 +02:00
assets Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43) 2024-04-09 20:40:27 +02:00
doctum wip 2023-04-14 17:23:19 +02:00
src Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43) 2024-04-09 20:40:27 +02:00
tests Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43) 2024-04-09 20:40:27 +02:00
.gitattributes Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43) 2024-04-09 20:40:27 +02:00
.gitignore Laravel 11 support + Docker improvements (#29) 2024-02-18 00:18:31 +01:00
.php-cs-fixer.php Enable single_line_empty_body phpcsfixer rule 2024-04-02 04:31:03 +02:00
composer.json Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43) 2024-04-09 20:40:27 +02:00
CONTRIBUTING.md Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43) 2024-04-09 20:40:27 +02:00
docker-compose-m1.override.yml Laravel 11 support + Docker improvements (#29) 2024-02-18 00:18:31 +01:00
docker-compose.yml Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43) 2024-04-09 20:40:27 +02:00
Dockerfile Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43) 2024-04-09 20:40:27 +02:00
DONATIONS.md update md files 2020-06-08 22:42:13 +02:00
INTERNAL.md Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43) 2024-04-09 20:40:27 +02:00
LICENSE Initial commit 2019-01-17 22:24:12 +01:00
phpstan.neon Filesystem logic refactor, improved defaults for cache tenancy (#42) 2024-04-02 04:26:10 +02:00
phpunit.xml Misc test fixes (#44) 2024-04-06 19:17:34 +02:00
README.md update laravel version 2023-04-24 22:02:32 +02:00
SUPPORT.md Discord link 2022-06-13 19:16:35 +02:00
t Laravel 11 support + Docker improvements (#29) 2024-02-18 00:18:31 +01:00
test Filesystem logic refactor, improved defaults for cache tenancy (#42) 2024-04-02 04:26:10 +02:00

Tenancy for Laravel logo

Laravel 10.x Latest Stable Version GitHub Actions CI status Donate

Tenancy for Laravel — stancl/tenancy

Automatic multi-tenancy for your Laravel app.

You won't have to change a thing in your application's code.

  • ✔️ No model traits to change database connection
  • ✔️ No replacing of Laravel classes (Cache, Storage, ...) with tenancy-aware classes
  • ✔️ Built-in tenant identification based on hostname (including second level domains)

Documentation

Documentation can be found here: https://tenancyforlaravel.com/docs/v3/

The repository with the documentation source code can be found here: stancl/tenancy-docs.

Need help?

Credits