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

307 commits

Author SHA1 Message Date
Samuel Štancl
c62dc0f0f3 code improvements 2022-09-29 17:01:27 +02:00
Abrar Ahmad
8aea33c0f2 add test 2022-09-29 16:11:08 +05:00
Abrar Ahmad
e1229ef446 allow defining a mix of attribute names and default values 2022-09-28 13:38:01 +05:00
Abrar Ahmad
5b34b0283a Update ResourceSyncingTest.php 2022-09-28 11:32:11 +05:00
Abrar Ahmad
0d3ac1f206 Update ResourceSyncingTest.php 2022-09-12 11:16:11 +05:00
Abrar Ahmad
b17882fcf8 method rename 2022-09-12 11:10:12 +05:00
Abrar Ahmad
4245f46bc1 method rename 2022-09-02 18:01:59 +05:00
Abrar Ahmad
5aa8231c81
Merge branch 'master' into resource-syncing 2022-08-30 13:05:28 +05:00
Abrar Ahmad
aaffc1d6b0 Update ResourceSyncingTest.php 2022-08-30 12:35:22 +05:00
Abrar Ahmad
d22224c945 merge default values with sync attributes and tests 2022-08-30 12:29:52 +05:00
Samuel Štancl
8af354c20e get phpstan errors down from 252 to 189 2022-08-30 05:44:23 +02:00
Abrar Ahmad
62c9516ec1 Update ResourceSyncingTest.php 2022-08-29 13:16:00 +05:00
Abrar Ahmad
eef51f40b9 classes at the end 2022-08-29 12:34:24 +05:00
Abrar Ahmad
55d858b601 assert that creation attributes returns null 2022-08-29 12:16:34 +05:00
Samuel Štancl
40bf28c7d0 general refactor, move more classes under Database namespace 2022-08-27 03:17:16 +02:00
Samuel Štancl
55d0a9ab87 misc improvements - stronger types, exception refactor 2022-08-26 21:35:17 +02:00
Samuel Štancl
931c76d697
Pull 3.x changes into master (#922)
* 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>

* Add support for nested tenant config override (#920)

* feat: add support for nested tenant config override

* test: ensure nested tenant values are mapped

* Update TenantConfigTest.php

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: George Bishop <email.georgebishop@gmail.com>
Co-authored-by: Abrar Ahmad <abrar.dev99@gmail.com>
2022-08-22 17:59:43 +02:00
Abrar Ahmad
6ffa3d2b55 wip 2022-08-16 15:59:52 +05:00
Abrar Ahmad
f02aa1a6f2 wip 2022-08-16 15:50:22 +05:00
Abrar Ahmad
3e514461ca wip 2022-08-16 15:27:34 +05:00
Abrar Ahmad
e756b54b31 Update ResourceSyncingTest.php 2022-08-10 13:42:48 +05:00
Abrar Ahmad
3bba3bd3de Update ResourceSyncingTest.php 2022-08-10 13:41:14 +05:00
Abrar Ahmad
ea21291b3e update comment 2022-08-10 13:13:54 +05:00
Abrar Ahmad
5ba92859e4 Update ResourceSyncingTest.php 2022-08-10 13:09:13 +05:00
Abrar Ahmad
69a44335f7 Update ResourceSyncingTest.php 2022-08-10 13:06:37 +05:00
Abrar Ahmad
724ed5a502 Revert "improve comments, move method to SyncMaster interface"
This reverts commit 5ddd50deb9.
2022-08-10 13:03:17 +05:00
Abrar Ahmad
5ddd50deb9 improve comments, move method to SyncMaster interface 2022-08-10 12:56:16 +05:00
Abrar Ahmad
818026eaaa
Update tests/ResourceSyncingTest.php
Co-authored-by: Samuel Štancl <samuel@archte.ch>
2022-08-10 12:05:56 +05:00
Abrar Ahmad
3951680a98 comments 2022-08-09 10:19:53 +05:00
Abrar Ahmad
2409746449 Update ResourceSyncingTest.php 2022-08-08 17:21:30 +05:00
Abrar Ahmad
c109d27a9f Update ResourceSyncingTest.php 2022-08-08 17:06:17 +05:00
Abrar Ahmad
b90fb6ec77 configure attributes for creating resource 2022-08-08 16:55:27 +05:00
Abrar Ahmad
a45aa8e274
Improve tenants:run command (#912)
* improve `tenants:run` command

* Update Run.php
2022-08-04 20:29:39 +02:00
Samuel Štancl
d0baabbc9d Merge branch 'master' of github.com:archtechx/tenancy 2022-07-28 15:30:19 +02:00
Samuel Štancl
be13160133 wip Debuggable trait 2022-07-28 15:14:29 +02:00
Abrar Ahmad
29634dda84
added $this->mockConsoleOutput (#907) 2022-07-27 01:35:55 +02:00
beezerk23
233a1222bf
feat(UniversalRoutes): Stop overwriting the (maybe) customized onFail… (#679)
* feat(UniversalRoutes): Stop overwriting the (maybe) customized onFail method and just call it in case of an exception

* throw correct exception when `$originalOnFail()` is null

* Update DomainTest.php

* convert test to pest and renamed

* Update tests/DomainTest.php

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

Co-authored-by: Abrar Ahmad <abrar.dev99@gmail.com>
Co-authored-by: Samuel Štancl <samuel@archte.ch>
2022-07-25 18:37:52 +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
Abrar Ahmad
627233d07a
[4.x] Don't use onDeleteCascade in the migrations (#883)
* removed `cascade` on delete for domains

* removed only `onDelete` cascade

* keep impersonation migrations unchanged

* domains set null on delete

* Update 2019_09_15_000020_create_domains_table.php

* Added DeleteDomain Job while deleting tenant.

* Update assets/TenancyServiceProvider.stub.php

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

* renamed class

* Update DeleteDomains.php

* onDelete restrict

* revert nullable

* removed `shouldQueue` interface

* Update TenancyServiceProvider.stub.php

* fetch and delete domains individually

* Update DeleteDomains.php

* tests for `DeleteDomains` job

Co-authored-by: Samuel Štancl <samuel@archte.ch>
2022-07-20 13:02:33 +02:00
Nick Kitchen
cc6d4fe0dd
[4.x] Added support for Microsoft Sql Server (#715)
* added support for microsoft sql server database

* added support for microsoft sql server database

* trigger ci

* revert change

* trigger ci

* Try installing pdo_sqlsrv

* different approach for installing sqlsrv via pecl

* add dependencies

* add gnupg2

* Update Dockerfile

* try skipping msodbcsql17

* Update Dockerfile

* add dependency back

* update before installing

* try to add mssql

* mssql host

* TENANCY_TEST_MSSQL_HOST env var

* add env vars for mssql

* add sqlsrv vars to TestCase

* rename vars to SQLSRV [skip ci]

* MSSQL -> SQLSRV

Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2022-06-23 13:04:53 +02:00
Victor R
7d98ebb5d1
[4.x] Add tenant schema dump command (#807)
* Add tenant dump command

* Register tenant schema dump command

* Added tests for tenant schema dump command

* remove docblocks, fix tenant() logic

* trigger ci

* Install mysql-client

* mysql-client -> mariadb-client

* add tenant-schema-test.dump to .gitignore

Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2022-06-01 16:12:59 +02:00
Samuel Štancl
eca7b336bc merge 3.x 2022-06-01 14:58:44 +02:00
Nathan Dunn
40bf576e00
[3.x] Update PostgreSQLSchemaManager to set correct config key value (#840)
* Update PostgreSQLSchemaManager to set correct config key value

* Update to use version_compare

* Update TenantDatabaseManagerTest

* Improve TenantDatabaseManagerTest

* Update TenantDatabaseManager
2022-04-08 03:13:29 +02:00
Samuel Štancl
349125c02e
Merge hotfix branch (#834)
* try specifying the signature in __construct

* constructor doesn't work since Reflection is used, try specifying getDefaultName() instead

* Fixed: make migration commands compatible

* Fix failing tests

* Fix username generation

* Re-create tmp dir as well if needed

* wip
2022-03-30 18:00:55 +02:00
Samuel Štancl
e1ae6f4380 re-add queuetest.json 2022-03-23 20:57:15 +01:00
Samuel Štancl
5026f54a6d fix path prefixing 2022-03-23 20:48:55 +01: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
Samuel Štancl
8e9485f9b1 add empty queuetest.json 2022-02-19 16:31:31 +01:00