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

11 commits

Author SHA1 Message Date
8960a83047
[4.x] Laravel 12 support (#1321)
* Add Laravel 12 support, drop Laravel 11 support

* Fix RLS tree generation (specify schema name in generateTrees())

* ci fixes, use stable virtualcolumn version

---------

Co-authored-by: lukinovec <lukinovec@gmail.com>
2025-02-25 16:26:18 +01: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
Jori Stein
e4f5b92485
[4.x] Update commands CLI outputs (#968)
* Using laravel components

* Ensure commands returns success

* update tests

* clean

* bump EndBug version

* Update ci.yml

* Update ci.yml

* Update ci.yml

* revert CI changes

* Update ci.yml

* Update ci.yml

* Update ci.yml

* revert CI changes to it's original state

* fix typos, improve code

* improve Install & TenantList commands

* php-cs-fixer

* type GitHub properly

Co-authored-by: Abrar Ahmad <abrar.dev99@gmail.com>
Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2022-10-18 19:11:57 +02:00
Jori Stein
3f60c4a652
Add maintenance mode events (#979) 2022-10-17 19:48:24 +02:00
Jori Stein
121370ea01
[4.x] Add command to bring the tenants up and down from maintenance and remove deprecated exception (#761)
* Add bring up from maintenance function

* Add up and down tenant maintenance commands

* Rename commands signatures

* Update TenancyServiceProvider.php

* Complying to Laravel maintenance code and parameters

* Update MaintenanceModeTest.php

* Add maintenance mode via commands test

* Update CheckTenantForMaintenanceMode.php

* Update MaintenanceModeTest.php

* Cookie bypass only for > Laravel 8

* minor formatting change, trigger CI

* clean

* Update MaintenanceModeTest.php

* Add comments for using the 'tenants' option in runForMultiple

* improve code

* php-cs-fixer

* fix php cs fixer config

* improve test logic

* remove version check since v4 will be L9+

Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: lukinovec <lukinovec@gmail.com>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2022-09-29 15:59:14 +02:00
Samuel Štancl
f9c9d8615f Refactor tests to use pest() helper 2022-07-23 01:16:50 +02:00
Samuel Štancl
b47c5549ef
[4.x] Migrate tests to Pest (#884)
* Add Pest dependencies

* Add base Pest file

* Convert test cases

* Remove non-compound imports

* Adopt expectation API

* Optimize uses

* Shift cleanup

* phpunit -> pest

* Fix tests in PR #884 PHPUnit to Pest Converter  (#885)

* fixed tests, remove method duplications, restore necessary inner classes

* Update CommandsTest.php

* temporary checks run on `shift-64622` on branch.

* fixed `TestSeeder` class not resolved

* fixed messed up names

* removed `uses` from individual files and add it in `Pest`

* extract tests to helpers

* use pest dataset

* Update AutomaticModeTest.php

* newline

* todo convention

* resolve reviews

* added `// todo@tests`

* remove shift branch from CI workflow

Co-authored-by: Samuel Štancl <samuel@archte.ch>

* check if I have write permission

* Convert newly added tests to Pest

Co-authored-by: Shift <shift@laravelshift.com>
Co-authored-by: Abrar Ahmad <abrar.dev99@gmail.com>
2022-07-22 19:26:59 +02:00
Abrar Ahmad
97ab483173
Completing PR #881 (#902)
* install PHP CS Fixer

* Fix styling

* remove StyleCI config

* use config from archtechx/template

* Fix styling

* added `php-cs-fixer`

* Update .php-cs-fixer.php

* added GitHub token

* Update ci.yml

* Update ci.yml

* Update ci.yml

* php-cs-fixer workflow same as template

Co-authored-by: Erik Gaal <me@erikgaal.nl>
Co-authored-by: erikgaal <erikgaal@users.noreply.github.com>
2022-07-20 15:28:45 +02: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
stancl
6955512a6b Apply fixes from StyleCI 2020-05-22 09:01:31 +00:00
Samuel Štancl
2fedd5ce88 Tenant-specific maintenance mode 2020-05-20 21:50:10 +02:00