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

59 commits

Author SHA1 Message Date
lukinovec
080b271bb3
[4.x] Drop tenant databases on migrate:fresh (#971)
* Test that `migrate:fresh` deletes tenant databases

* Delete tenants on `migrate:fresh`

* Fix code style (php-cs-fixer)

* Add config key for dropping tenant databases on `migrate:fresh`

* Add MigrateFreshOverride

* Try to override `migrate:fresh` in TenancyServiceProvider

* Update `migrate:fresh` test

* Fix code style (php-cs-fixer)

* Drop tenant databases by default

* Change `migrate:fresh` test to test if the tenant DBs are dropped by default

* Override `migrate:fresh` by extending `FreshCommand` in TenancyServiceProvider

* Update MigrateFreshOverride

* Fix code style (php-cs-fixer)

* Fix commands test

* Simplify handle method

* Fix code style (php-cs-fixer)

* Don't drop tenant DBs on migrate:fresh by default

* Change command overriding

* Update migrate:fresh test

* always register MigrateFreshOverride

* misc

Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2022-10-17 15:19:30 +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
Abrar Ahmad
3542b3f028
update spatie/ignition to support L9 (#930) 2022-08-30 15:21:19 +02:00
Samuel Štancl
8af354c20e get phpstan errors down from 252 to 189 2022-08-30 05:44:23 +02:00
Abrar Ahmad
fb8b9c1614
add phpstan (#926) 2022-08-29 20:55:33 +02:00
Samuel Štancl
40bf28c7d0 general refactor, move more classes under Database namespace 2022-08-27 03:17:16 +02:00
Samuel Štancl
2d7e9dfd89 Add 'composer coverage' 2022-08-26 22:29:40 +02:00
Samuel Štancl
5f41647a6b revert Tenancy changes, fix failing tests 2022-08-26 21:49:09 +02:00
Erik Gaal
ca2eefa30a
[WIP] Use a lighter Docker image, use it in CI (#793)
* Use action services and setup-php in workflow

* Fix codecov

* exclude master from CI

* Add space after 'up' in 'docker-compose up-d' (#900)

* Fix ArgumentCountError on the TenantAssetsController (#894)

* Fix ArgumentCount exception on the TenantAssetsController when no `$path` is provided

* CS

* CS

* Handle null case explicitly

* code style

Co-authored-by: Bram Wubs <bram@sibi.nl>
Co-authored-by: Samuel Štancl <samuel@archte.ch>

* Improve Dockerfile and use it in CI

* Update Dockerfile

* mssql CI health check

* cache key

* Update ci.yml

* Update ci.yml

* Update composer.json

* register dumcommand when L8

* Update ci.yml

* Update composer.json

* Update composer.json

* Update composer.json

* wip

* removed extensions config and php version from matrix

* introduce php-cs-fixer issue for testing

* Fix code style (php-cs-fixer)

* install composer in Docker and remove setup-php step

* added pcov for coverage

* on master branch

* composer test command

* tests above services

* Update ci.yml

* Revert "register dumcommand when L8"

This reverts commit f165fc58ba.

* removed composer cache dependencies

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
Co-authored-by: lukinovec <lukinovec@gmail.com>
Co-authored-by: Bram Wubs <megawubs@users.noreply.github.com>
Co-authored-by: Bram Wubs <bram@sibi.nl>
Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: Abrar Ahmad <abrar.dev99@gmail.com>
Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2022-08-25 19:52:46 +02:00
Samuel Štancl
05f2a828a1 Better M1 DX 2022-07-22 22:29:56 +02:00
Samuel Štancl
2f3d4b9953 Allow pest plugin 2022-07-22 19:48:56 +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
Samuel Štancl
4aec6bfda2
add phpunit dependency 2022-06-28 21:47:33 +02:00
Samuel Štancl
eca7b336bc merge 3.x 2022-06-01 14:58:44 +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
Erik Gaal
9c79267e24
Fix .env loading in development (#799)
* Upgrade vlucas/phpdotenv to ^5.0

`Dotenv::create($paths)` was the syntax for releases before v4

* Remove vlucas/phpdotenv dependency and make it work with newer versions.
2022-02-14 14:31:01 +01:00
Samuel Štancl
5980c46449 wip 2021-12-30 19:46:48 +01:00
Samuel Štancl
9883219544 wip 2021-12-13 13:09:16 +01:00
Samuel Štancl
30a1f9102d
PHP 8 support (#542)
* 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
2020-11-30 17:30:42 +01:00
Andre Sayej
36aabb7883
First try at Laravel 8 (#491) 2020-09-08 21:11:56 +02:00
Samuel Štancl
f483d0b8cf Extract VirtualColumn package 2020-07-06 14:44:49 +02:00
Samuel Štancl
1833622170 Extract JobPipelines to a separate package 2020-05-15 18:26:08 +02:00
Samuel Štancl
b772590479 Private repo composer.json 2020-05-13 07:12:25 +02:00
Samuel Štancl
86a98b2bc8 Queue tests 2020-05-11 05:22:55 +02:00
Samuel Štancl
00bb0d06b3 Use real queues in JobPipelineTest 2020-05-11 04:33:55 +02:00
Samuel Štancl
bd9aad229b vague first draft of v3. TenantModelTest is passing 2020-05-08 04:37:43 +02:00
Samuel Štancl
5972364075
[3.x] Rename facades (#387)
* Remove Facade suffix from facades, fix #386

* Apply fixes from StyleCI

* Fix facade test
2020-05-03 17:59:35 +02:00
Samuel Štancl
4b46c65b2f
Support ramsey/uuid v3 & v4 2020-03-27 17:47:43 +01:00
Samuel Štancl
30bab68b6a
Laravel 7 support (#304)
* Laravel 7 support

* Remove language from travis.yml

* Fix travis.yml

* Consistent indentation in travis.yml

* Use dev-master for phpcov

* Cleanup

* switch up envs

* verify both laravel versions are used

* 6 -> 7

* Fix travis yml

* Use stable phpcov

* Different installation for Laravel 7

* Indentation

* Fix dockerfile

* Fix indentation

* Fix tests

* Remove fail() calls
2020-03-17 18:47:24 +01:00
Samuel Štancl
4e477b472f
Move ignition contracts to require 2019-11-23 15:17:51 +01:00
Mads Møller
b3cf499ebd add missing json extension (#217) 2019-11-06 18:02:51 +01:00
Samuel Štancl
97d47e33d0
Move facade/ignition-contracts to require-dev 2019-10-13 17:29:41 +02:00
Samuel Štancl
6cb7f27e6c
Replace webpatser/laravel-uuid with ramsey/uuid (#150) 2019-09-30 18:13:52 +02:00
Samuel Štancl
553b162930 Clean endTenancy() calls at the end of commands 2019-09-27 22:57:10 +02:00
Samuel Štancl
6b103cd2cb Model timestamps 2019-09-27 22:53:38 +02:00
Samuel Štancl
bd1c829520 TenantCouldNotBeIdentified ProvidesSolution 2019-09-23 11:54:38 +02:00
Samuel Štancl
50a77ee826 Fix some tests 2019-09-16 17:36:32 +02:00
Samuel Štancl
dabaff1338 Remove Tenant facade, move facades to Facades 2019-09-08 17:24:03 +02:00
Samuel Štancl
ab0a40a17e Laravel 6 2019-09-08 12:22:18 +02:00
Samuel Štancl
f04ca349bd Tenant contract, Tenancy bootstrappers, drop predis 2019-09-06 18:51:34 +02:00
Samuel Štancl
824ecfce48
[1.8.0] Add Telescope tags with tenant ids (#77) 2019-08-19 21:11:55 +02:00
Samuel Štancl
b12b9c3a54
[1.8.0] Tenant redirect (#103) 2019-08-18 12:48:10 +02:00
Samuel Štancl
4aa35322da Add event prevents, Tenant facade 2019-08-14 22:16:51 +02:00
Samuel Štancl
e2d35bc18d Remove psysh dependency 2019-08-13 18:36:16 +02:00
Samuel Štancl
65b38827d5 drop 5.7 support 2019-08-04 20:24:48 +02:00
Samuel Štancl
89990799f2 add phpunit.xml variations 2019-08-04 17:40:44 +02:00
Samuel Štancl
92ebc1f01b
Add support for global cache (#78) 2019-07-30 21:05:30 +02:00
Samuel Štancl
dc30354699
Dockerize phpunit (#66) 2019-07-12 21:44:26 +02:00
Samuel Štancl
7c7ba28391 implementation -> package 2019-07-03 19:19:19 +02:00
Samuel Štancl
1b6759084f
Add Predis support (#59)
* wip

* Add Predis support

* Enable phpredis extension only for some builds

* Add note about phpredis

* Fix if command

* Revert travis changes & add a version check to predis tests
2019-07-03 14:48:55 +02:00