* 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>
* 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>
* 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>
* cache prefix
* prefix cache bootstrapper and tests
* remove comment
* DI app
* cache prefix base from config
* Create PrefixCacheBootstrapperTest.php
* remove `null` check
* fix phpstan error
* Update PrefixCacheTenancyBootstrapper.php
* Update PrefixCacheBootstrapperTest.php
* add comments
* Update PrefixCacheTenancyBootstrapper.php
* Update PrefixCacheBootstrapperTest.php
* Update config.php
* test names grammar
* user `getTenantKey` method
* assert tenants' data is accessible using the prefix from the central context
* remove unused line
* use proper DI
* build prefix using original prefix
* fix prefix test according to prefix changes
* fix test
* CacheManager dependency injection test
* CacheService class as singleton
* introduce second tenant in test
* use Repository in service class DI
* Update CacheAction.php
* Rename CacheAction to CacheService
* Update prefix bootstrapper and test (`setStore()` in CacheManager and Repository needed)
* Add macro
* Fix code style (php-cs-fixer)
* Simplify cache store refreshing
* Make Tenancy override CacheManager
* Update CacheManager, add refreshStore()
* Fix code style (php-cs-fixer)
* Uncomment cache tagging
* Revert condition in CacheManager to avoid excessive nesting
* Move `Cache::macro()` to a slightly more appropriate place
* Fix code style (php-cs-fixer)
* Use better class for the macro
* Toggle cache tags
* Make CacheManager::$addTags default to `true`
* Add changes to PR to Laravel
* Fix code style (php-cs-fixer)
* Revert changes, add comment
* Add test
* Make `$cache` non-nullable
Co-authored-by: Samuel Štancl <samuel@archte.ch>
* Add and test `nonTenantCacheDrivers`
* Add nonTenantCacheDrivers check
* Test that the prefix stays the same
* Change nonTenantCacheDrivers to tenantCacheStores
* Remove redundant CacheManager extend() call
* Make 'redis' the only tenant cache store in beforeEach, test that tenantCacheStores works
* Remove unused import, change word
* Make CacheService a singleton in a test
* Update test name
* Remove group('prefix')
* Rename CacheManagerService
* Improve specific cache store in a service test
* Improve comment
* Improve tests
* Use my Laravel fork
* Fix code style (php-cs-fixer)
* Downgrade Laravel
* Upgrade Laravel
* Hint Repository implementation instead of contract
* Fix types
* Fix code style (php-cs-fixer)
* Fix test
* Use Laravel fork in ci.yml
* use dev-master before our changes are released in L10
* remove laravel fork from repositories
* use 10.x-dev instead of master
* remove L9 support
* 10.x-dev (fix conflict resolution)
* use the laravel version from the ci matrix for the phpstan job as well
* Revert "use the laravel version from the ci matrix for the phpstan job as well"
This reverts commit 5f3079d2ff.
* Test that non-default stores get prefixed too
* Use new Laravel release, remove L9 support
* Complete L9 support removal
* Specify 10.1.1 as the minimal Laravel version in ci.yml
* Use 10.x-dev
* Prefix all cache stores specified in `$tenantCacheStores`
* Update Laravel
* Use tmpfs in docker-compose
* Add customizing cache store prefixes
* Test cache prefixing customization
* Fix code style (php-cs-fixer)
* Update ci.yml
* Delete tmpfs from docker-compose.yml (there were no benefits)
* Use default prefix generator inline, delete the 'default' key logic
* Fix original prefix logic
* Update tests
* Delete CacheTenancyBootstrapper
* Reset static properties in afterEach
* Use `$this->config` instead of `config()`
* Disable cache tagging by default, add CacheTagBootstrapper
* Fix code style (php-cs-fixer)
* Rename bootstrapper
* Improve CacheManager
* Move logic from separate method to __call
* Make original prefixes customizable
* Add info in comment
* Add defaultPrefix property
* Use `$this->app` instead of `app()`
* Rename bootstrapper
* Fix code style (php-cs-fixer)
* Use a single original prefix
* Update prefix generator logic + tests
* Correct `$addTags` reset in a test
* Update cache tests so that both prefixing and tagging is covered
* Simplify cache tests
* Delete afterEach
* Small testing improvements
* Set `cache.default` in beforeEach
* Update cache prefixing and tests
* Add assertion
* Refactor assertion
* Refactor assertions
* Delete TTL from cache put calls
* Add re-initialization cache assertion
* Assert that cache is null from the beginning
* Merge the tenantCacheStores tests
* Fix formatting
* Improve test name
* Improve tests
* Add cache manager config key
* Fix code style (php-cs-fixer)
* Update defaulting test
* Add todo
* Update comments
* Extract duplicate assertions into a closure
* Update comment
* Add assertions + comment
* Delete redundant config put calls
* Use `tenancy.cache.manager` config instead of `Stancl\Tenancy\CacheManager`
* Change setting to assertion, add comment
* Inline variable & config key assignment
* Delete `cache.default` assertion
* Override cache manager only in CacheTagsBootstrapper
* Fix code style (php-cs-fixer)
* Prefix both drivers by default, add assertions for the second driver where missing
* Clean up global state (static properties) in before/afterEach
* Add docblock to tags bootstrapper
* Delete extra dependency
* Add `illuminate/support` dependency back
* Use `$addTags` approach again
* Fix code style (php-cs-fixer)
* Revert "Fix code style (php-cs-fixer)"
This reverts commit ea805fa231.
* Revert "Use `$addTags` approach again"
This reverts commit 8f5a4e4eb6.
* Add commented CacheTagsBootstrapper with info to the bootstrappers config
* Delete legacy bootstrapper from the bootstrappers config, add info to the bootstrapper's docblock
* Delete "?" from `tenant()?->getTenantKey()
* call generatePrefix() on $bootstrapper
* misc improvements
---------
Co-authored-by: lukinovec <lukinovec@gmail.com>
Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
* 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>
* PHP 8 support, test workflow syntax
* Try using a custom data structure in the workflow
* Try using matrix include
* Default PHP target
* single include
* fix composer package name
* [WIP] Try using dev-master for valuestore
* Update spatie/valuestore constraint to be stable