Following the doc to setup the project, it seems there is interface duplication between the main framework and the sub packages causing some warnings
Warning: Ambiguous class resolution, "Tenancy\Identification\Drivers\Queue\Contracts\IdentifiesByQueue" was found in both "vendor/tenancy/identification-driver-queue/Contracts/IdentifiesByQueue.php" and "vendor/tenancy/tenancy/src/Identification/Queue/Contracts/IdentifiesByQueue.php", the first will be used.
Warning: Ambiguous class resolution, "Tenancy\Identification\Drivers\Queue\Events\Processing" was found in both "vendor/tenancy/identification-driver-queue/Events/Processing.php" and "vendor/tenancy/tenancy/src/Identification/Queue/Events/Processing.php", the first will be used.
Warning: Ambiguous class resolution, "Tenancy\Identification\Drivers\Queue\Middleware\ReadTenantFromQueuePayload" was found in both "vendor/tenancy/identification-driver-queue/Middleware/ReadTenantFromQueuePayload.php" and "vendor/tenancy/tenancy/src/Identification/Queue/Middleware/ReadTenantFromQueuePayload.php", the first will be used.
Warning: Ambiguous class resolution, "Tenancy\Identification\Drivers\Queue\Middleware\SaveTenantOnQueuePayload" was found in both "vendor/tenancy/identification-driver-queue/Middleware/SaveTenantOnQueuePayload.php" and "vendor/tenancy/tenancy/src/Identification/Queue/Middleware/SaveTenantOnQueuePayload.php", the first will be used.
Warning: Ambiguous class resolution, "Tenancy\Identification\Drivers\Queue\Providers\IdentificationProvider" was found in both "vendor/tenancy/identification-driver-queue/Providers/IdentificationProvider.php" and "vendor/tenancy/tenancy/src/Identification/Queue/Providers/IdentificationProvider.php", the first will be used.
Here is my composer require config
"require": {
"php": "^7.3",
"ext-json": "*",
"laravel/framework": "^7",
"tenancy/affects-configs": "^1.0",
"tenancy/affects-connections": "^1.0",
"tenancy/affects-filesystems": "^1.0",
"tenancy/affects-logs": "^1.0",
"tenancy/affects-mails": "^1.0",
"tenancy/affects-urls": "^1.0",
"tenancy/affects-views": "^1.0",
"tenancy/db-driver-mysql": "^1.0",
"tenancy/framework": "^1.0",
"tenancy/hooks-database": "^1.0",
"tenancy/identification-driver-http": "^1.0",
"tenancy/identification-driver-queue": "^1.0"
}
Relevant composer lock.json
{
"name": "tenancy/identification-driver-queue",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/tenancy/identification-driver-queue.git",
"reference": "d75d89dd2435da729e128d3976e5dc414d0fc065"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tenancy/identification-driver-queue/zipball/d75d89dd2435da729e128d3976e5dc414d0fc065",
"reference": "d75d89dd2435da729e128d3976e5dc414d0fc065",
"shasum": ""
},
"require": {
"tenancy/framework": "*"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Tenancy\\Identification\\Drivers\\Queue\\Providers\\IdentificationProvider"
]
}
},
"autoload": {
"psr-4": {
"Tenancy\\Identification\\Drivers\\Queue\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Arlon Antonius",
"email": "[email protected]",
"homepage": "https://arlon.dev"
}
],
"description": "The tenancy/tenancy identification driver for queues",
"keywords": [
"identification",
"queue",
"tenancy"
],
"time": "2020-07-08T18:48:47+00:00"
},
{
"name": "tenancy/tenancy",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/tenancy/tenancy.git",
"reference": "be9dae407ad4f2600a3665b7abab31c5b8f1c6ba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tenancy/tenancy/zipball/be9dae407ad4f2600a3665b7abab31c5b8f1c6ba",
"reference": "be9dae407ad4f2600a3665b7abab31c5b8f1c6ba",
"shasum": ""
},
"require": {
"doctrine/dbal": "^2.9",
"laravel/framework": "^7.0"
},
"replace": {
"tenancy/affects-broadcasts": "self.version",
"tenancy/affects-cache": "self.version",
"tenancy/affects-configs": "self.version",
"tenancy/affects-connections": "self.version",
"tenancy/affects-filesystems": "self.version",
"tenancy/affects-logs": "self.version",
"tenancy/affects-mails": "self.version",
"tenancy/affects-models": "self.version",
"tenancy/affects-routes": "self.version",
"tenancy/affects-urls": "self.version",
"tenancy/affects-views": "self.version",
"tenancy/db-driver-mysql": "self.version",
"tenancy/db-driver-sqlite": "self.version",
"tenancy/framework": "self.version",
"tenancy/hooks-database": "self.version",
"tenancy/hooks-migration": "self.version",
"tenancy/identification-driver-console": "self.version",
"tenancy/identification-driver-environment": "self.version",
"tenancy/identification-driver-http": "self.version",
"tenancy/testing": "self.version"
},
"require-dev": {
"fzaninotto/faker": "^1.7",
"laminas/laminas-diactoros": "^1.0",
"laravel/laravel": "^7.0",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^8.0",
"psalm/plugin-laravel": "^1.1",
"squizlabs/php_codesniffer": "^3.3"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Tenancy\\Providers\\TenancyProvider",
"Tenancy\\Affects\\Broadcasts\\Provider",
"Tenancy\\Affects\\Cache\\Provider",
"Tenancy\\Affects\\Configs\\Provider",
"Tenancy\\Affects\\Connections\\Provider",
"Tenancy\\Affects\\Filesystems\\Provider",
"Tenancy\\Affects\\Logs\\Provider",
"Tenancy\\Affects\\Mails\\Provider",
"Tenancy\\Affects\\Models\\Provider",
"Tenancy\\Affects\\Routes\\Provider",
"Tenancy\\Affects\\URLs\\Provider",
"Tenancy\\Affects\\Views\\Provider",
"Tenancy\\Identification\\Drivers\\Console\\Providers\\IdentificationProvider",
"Tenancy\\Identification\\Drivers\\Environment\\Providers\\IdentificationProvider",
"Tenancy\\Identification\\Drivers\\Http\\Providers\\IdentificationProvider",
"Tenancy\\Identification\\Drivers\\Queue\\Providers\\IdentificationProvider"
],
"aliases": {
"Tenancy": "Tenancy\\Facades\\Tenancy"
}
}
},
"autoload": {
"psr-4": {
"Tenancy\\": "src/Tenancy",
"Tenancy\\Affects\\": "src/Affects",
"Tenancy\\Database\\Drivers\\": "src/Database",
"Tenancy\\Hooks\\": "src/Hooks",
"Tenancy\\Identification\\Drivers\\": "src/Identification"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Arlon Antonius",
"email": "[email protected]",
"homepage": "https://arlon.dev"
}
],
"description": "Creating multi tenant saas from your Laravel app with ease",
"keywords": [
"aws",
"gce",
"laravel",
"multi-tenant",
"saas",
"tenancy"
],
"time": "2020-07-10T13:47:59+00:00"
},
This issue arise after installing the package tenancy/identification-driver-queue
that's not included in tenancy\tenancy
(according to composer)
Reproduction
composer require tenancy/tenancy
composer require tenancy/identification-driver-queue
Warning will popup after the end of the second command (if you implement the interfaces in your models beforehand)