{"action":"created","issue":{"url":"https://api.github.com/repos/hyn/multi-tenant/issues/615","repository_url":"https://api.github.com/repos/hyn/multi-tenant","labels_url":"https://api.github.com/repos/hyn/multi-tenant/issues/615/labels{/name}","comments_url":"https://api.github.com/repos/hyn/multi-tenant/issues/615/comments","events_url":"https://api.github.com/repos/hyn/multi-tenant/issues/615/events","html_url":"https://github.com/hyn/multi-tenant/issues/615","id":360137011,"node_id":"MDU6SXNzdWUzNjAxMzcwMTE=","number":615,"title":"integration with event projector","user":{"login":"dbrw","id":2887587,"node_id":"MDQ6VXNlcjI4ODc1ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/2887587?v=4","gravatar_id":"","url":"https://api.github.com/users/dbrw","html_url":"https://github.com/dbrw","followers_url":"https://api.github.com/users/dbrw/followers","following_url":"https://api.github.com/users/dbrw/following{/other_user}","gists_url":"https://api.github.com/users/dbrw/gists{/gist_id}","starred_url":"https://api.github.com/users/dbrw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbrw/subscriptions","organizations_url":"https://api.github.com/users/dbrw/orgs","repos_url":"https://api.github.com/users/dbrw/repos","events_url":"https://api.github.com/users/dbrw/events{/privacy}","received_events_url":"https://api.github.com/users/dbrw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-14T02:46:30Z","updated_at":"2018-09-15T08:49:56Z","closed_at":null,"author_association":"NONE","body":"__Description__\r\n\r\nI started a new project that needs multi tenant setup and event sourcing, so I went to this wonderful package and spatie/laravel-event-projector. I followed Ashok's tutorial on https://medium.com/@ashokgelal/a-full-featured-multi-tenant-app-with-laravel-part-1-4049a3cc229d and all went smoothly even with the 5.2 upgrade (I changed some code based on tenancy's documentation). The problem occured after I added spatie/laravel-event-projector to the project.\r\n\r\nWhen I run tests, I always got `Illuminate\\Contracts\\Container\\BindingResolutionException` like bellow:\r\n\r\n```text\r\n>  newportal [develop] ⚡ vendor/bin/phpunit tests/Feature/TenantDeleteCommandTest.php\r\nPHPUnit 7.3.5 by Sebastian Bergmann and contributors.\r\n\r\n.E                                                                  2 / 2 (100%)\r\n\r\nTime: 2.46 seconds, Memory: 18.00MB\r\n\r\nThere was 1 error:\r\n\r\n1) Tests\\Feature\\TenantDeleteCommandTest::testCanDeleteExistingTenant\r\nIlluminate\\Contracts\\Container\\BindingResolutionException: Unresolvable dependency resolving [Parameter #0 [ <required> array $config ]] in class Spatie\\EventProjector\\Projectionist\r\n\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:948\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:886\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:827\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:795\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:646\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:601\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:734\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:900\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:828\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:795\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:646\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:601\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:734\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:398\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:375\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:209\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:182\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php:162\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:173\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:156\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php:36\r\n/home/dim/Codes/web/portal2/newportal/vendor/hyn/multi-tenant/src/Providers/TenancyProvider.php:66\r\n/home/dim/Codes/web/portal2/newportal/vendor/hyn/multi-tenant/src/Providers/TenancyProvider.php:43\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:573\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:75\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:548\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php:17\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:206\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:297\r\n/home/dim/Codes/web/portal2/newportal/tests/CreatesApplication.php:18\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:91\r\n/home/dim/Codes/web/portal2/newportal/tests/TenantAwareTestCase.php:26\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:68\r\n/home/dim/Codes/web/portal2/newportal/tests/TenantAwareTestCase.php:19\r\n/home/dim/Codes/web/portal2/newportal/tests/Feature/TenantDeleteCommandTest.php:14\r\n\r\nERRORS!\r\nTests: 2, Assertions: 1, Errors: 1.\r\n\r\n```\r\n\r\nAny input is very appriciated.\r\n\r\n---\r\n\r\n__Actual behavior__\r\n\r\nError when running test with `spatie/laravel-event-projector`.\r\n\r\n__Expected behavior__\r\n\r\nTests run smoothly.\r\n\r\n---\r\n__Information__\r\n\r\n- hyn/multi-tenant version: 5.2\r\n- laravel version: 5.6\r\n- database driver and version: postgre 9.6\r\n- webserver software and version: nginx 1.14\r\n- php version: 7.2\r\n\r\n---\r\n\r\n__tenancy.php config__\r\n\r\n```php\r\n<?php\r\n\r\n/*\r\n * This file is part of the hyn/multi-tenant package.\r\n *\r\n * (c) Daniël Klabbers <daniel@klabbers.email>\r\n *\r\n * For the full copyright and license information, please view the LICENSE\r\n * file that was distributed with this source code.\r\n *\r\n * @see https://laravel-tenancy.com\r\n * @see https://github.com/hyn/multi-tenant\r\n */\r\n\r\nuse Hyn\\Tenancy\\Database\\Connection;\r\n\r\nreturn [\r\n    'models' => [\r\n        /**\r\n         * Specify different models to be used for the global, system database\r\n         * connection. These are also used in their relationships. Models\r\n         * used have to implement their respective contracts and\r\n         * either extend the SystemModel or use the trait\r\n         * UsesSystemConnection.\r\n         */\r\n\r\n        // Must implement \\Hyn\\Tenancy\\Contracts\\Hostname\r\n        'hostname' => App\\Models\\Hostname::class,\r\n\r\n        // Must implement \\Hyn\\Tenancy\\Contracts\\Website\r\n        'website' => App\\Models\\Website::class,\r\n    ],\r\n    /**\r\n     * The package middleware. Removing a middleware here will disable it.\r\n     * You can of course extend/replace them or add your own.\r\n     */\r\n    'middleware' => [\r\n        // The eager identification middleware.\r\n        \\Hyn\\Tenancy\\Middleware\\EagerIdentification::class,\r\n\r\n        // The hostname actions middleware (redirects, https, maintenance).\r\n        \\Hyn\\Tenancy\\Middleware\\HostnameActions::class,\r\n    ],\r\n    'website' => [\r\n        /**\r\n         * Each website has a short random hash that identifies this entity\r\n         * to the application. By default this id is randomized and fully\r\n         * auto-generated. In case you want to force your own logic for\r\n         * when you need to have a better overview of the complete\r\n         * tenant folder structure, disable this and implement\r\n         * your own id generation logic.\r\n         */\r\n        'disable-random-id' => false,\r\n\r\n        /**\r\n         * The random Id generator is responsible for creating the hash as mentioned\r\n         * above. You can override what generator to use by modifying this value\r\n         * in the configuration.\r\n         *\r\n         * @warn This won't work if disable-random-id is true.\r\n         */\r\n        'random-id-generator' => Hyn\\Tenancy\\Generators\\Uuid\\ShaGenerator::class,\r\n\r\n        /**\r\n         * Enable this flag in case you're using a driver that does not support\r\n         * database username or database name with a length of more than 32 characters.\r\n         *\r\n         * This should be enabled for MySQL, but not for MariaDB and PostgreSQL.\r\n         */\r\n        'uuid-limit-length-to-32' => env('LIMIT_UUID_LENGTH_32', false),\r\n\r\n        /**\r\n         * Specify the disk you configured in the filesystems.php file where to store\r\n         * the tenant specific files, including media, packages, routes and other\r\n         * files for this particular website.\r\n         *\r\n         * @info If not set, will revert to the default filesystem.\r\n         * @info If set to false will disable all tenant specific filesystem auto magic\r\n         *       like the config, vendor overrides.\r\n         */\r\n        'disk' => null,\r\n\r\n        /**\r\n         * Automatically generate a tenant directory based on the random id of the\r\n         * website. Uses the above disk to store files to override system-wide\r\n         * files.\r\n         *\r\n         * @info set to false to disable.\r\n         */\r\n        'auto-create-tenant-directory' => true,\r\n\r\n        /**\r\n         * Automatically rename the tenant directory when the random id of the\r\n         * website changes. This should not be too common, but in case it happens\r\n         * we automatically want to move files accordingly.\r\n         *\r\n         * @info set to false to disable.\r\n         */\r\n        'auto-rename-tenant-directory' => true,\r\n\r\n        /**\r\n         * Automatically deletes the tenant specific directory and all files\r\n         * contained within.\r\n         *\r\n         * @see\r\n         * @info set to true to enable.\r\n         */\r\n        'auto-delete-tenant-directory' => false,\r\n\r\n        /**\r\n         * Time to cache websites in minutes. Set to false to disable.\r\n         */\r\n        'cache' => 10,\r\n    ],\r\n    'hostname' => [\r\n        /**\r\n         * If you want the multi tenant application to fall back to a default\r\n         * hostname/website in case the requested hostname was not found\r\n         * in the database, complete in detail the default hostname.\r\n         *\r\n         * @warn this must be a FQDN, these have no protocol or path!\r\n         */\r\n        'default' => env('TENANCY_DEFAULT_HOSTNAME'),\r\n        /**\r\n         * The package is able to identify the requested hostname by itself,\r\n         * disable to get full control (and responsibility) over hostname\r\n         * identification. The hostname identification is needed to\r\n         * set a specific website as currently active.\r\n         *\r\n         * @see src/Jobs/HostnameIdentification.php\r\n         */\r\n        'auto-identification' => env('TENANCY_AUTO_HOSTNAME_IDENTIFICATION', true),\r\n\r\n        /**\r\n         * In case you want to have the tenancy environment set up early,\r\n         * enable this flag. This will run the tenant identification\r\n         * inside a middleware. This will eager load tenancy.\r\n         *\r\n         * A good use case is when you have set \"tenant\" as the default\r\n         * database connection.\r\n         */\r\n        'early-identification' => env('TENANCY_EARLY_IDENTIFICATION', true),\r\n\r\n        /**\r\n         * Abort application execution in case no hostname was identified. This will throw a\r\n         * 404 not found in case the tenant hostname was not resolved.\r\n         */\r\n        'abort-without-identified-hostname' => true,\r\n\r\n        /**\r\n         * Time to cache hostnames in minutes. Set to false to disable.\r\n         */\r\n        'cache' => 10,\r\n\r\n        /**\r\n         * Automatically update the app.url configured inside Laravel to match\r\n         * the tenant FQDN whenever a hostname/tenant was identified.\r\n         *\r\n         * This will resolve issues with password reset mails etc using the\r\n         * correct domain.\r\n         */\r\n        'update-app-url' => false,\r\n    ],\r\n    'db' => [\r\n        /**\r\n         * The default connection to use; this overrules the Laravel database.default\r\n         * configuration setting. In Laravel this is normally configured to 'mysql'.\r\n         * You can set a environment variable to override the default database\r\n         * connection to - for instance - the tenant connection 'tenant'.\r\n         */\r\n        'default' => env('TENANCY_DEFAULT_CONNECTION'),\r\n        /**\r\n         * Used to give names to the system and tenant database connections. By\r\n         * default we configure 'system' and 'tenant'. The tenant connection\r\n         * is set up automatically by this package.\r\n         *\r\n         * @see src/Database/Connection.php\r\n         * @var system-connection-name The database connection name to use for the global/system database.\r\n         * @var tenant-connection-name The database connection name to use for the tenant database.\r\n         */\r\n        'system-connection-name' => env('TENANCY_SYSTEM_CONNECTION_NAME', Connection::DEFAULT_SYSTEM_NAME),\r\n        'tenant-connection-name' => env('TENANCY_TENANT_CONNECTION_NAME', Connection::DEFAULT_TENANT_NAME),\r\n\r\n        /**\r\n         * The tenant division mode specifies to what database websites will be\r\n         * connecting. The default setup is to use a new database per tenant.\r\n         * In case you prefer to use the same database with a table prefix,\r\n         * set the mode to 'prefix'.\r\n         *\r\n         * @see src/Database/Connection.php\r\n         */\r\n        'tenant-division-mode' => env('TENANCY_DATABASE_DIVISION_MODE', 'database'),\r\n\r\n        /**\r\n         * The database password generator takes care of creating a valid hashed\r\n         * string used for tenants to connect to the specific database. Do\r\n         * note that this will only work in 'division modes' that set up\r\n         * a connection to a separate database.\r\n         */\r\n        'password-generator' => Hyn\\Tenancy\\Generators\\Database\\DefaultPasswordGenerator::class,\r\n\r\n        /**\r\n         * The tenant migrations to be run during creation of a tenant. Specify a directory\r\n         * to run the migrations from. If specified these migrations will be executed\r\n         * whenever a new tenant is created.\r\n         *\r\n         * @info set to false to disable auto migrating.\r\n         *\r\n         * @warn this has to be an absolute path, feel free to use helper methods like\r\n         * base_path() or database_path() to set this up.\r\n         */\r\n        'tenant-migrations-path' => database_path('migrations/tenant'),\r\n\r\n        /**\r\n         * The default Seeder class used on newly created databases and while\r\n         * running artisan commands that fire seeding.\r\n         *\r\n         * @info requires tenant-migrations-path in order to seed newly created websites.\r\n         * @info seeds stored in `database/seeds/tenants` need to be configured in your composer.json classmap.\r\n         *\r\n         * @warn specify a valid fully qualified class name.\r\n         */\r\n        'tenant-seed-class' => TenantDatabaseSeeder::class,\r\n//      eg an admin seeder under `app/Seeders/AdminSeeder.php`:\r\n//        'tenant-seed-class' => App\\Seeders\\AdminSeeder::class,\r\n\r\n        /**\r\n         * Automatically generate a tenant database based on the random id of the\r\n         * website.\r\n         *\r\n         * @info set to false to disable.\r\n         */\r\n        'auto-create-tenant-database' => true,\r\n\r\n        /**\r\n         * Automatically generate the user needed to access the database.\r\n         *\r\n         * @info Useful in case you use root or another predefined user to access the\r\n         *       tenant database.\r\n         * @info Only creates in case tenant databases are set to be created.\r\n         *\r\n         * @info set to false to disable.\r\n         */\r\n        'auto-create-tenant-database-user' => true,\r\n\r\n        /**\r\n         * Automatically rename the tenant database when the random id of the\r\n         * website changes. This should not be too common, but in case it happens\r\n         * we automatically want to move databases accordingly.\r\n         *\r\n         * @info set to false to disable.\r\n         */\r\n        'auto-rename-tenant-database' => true,\r\n\r\n        /**\r\n         * Automatically deletes the tenant specific database and all data\r\n         * contained within.\r\n         *\r\n         * @info set to true to enable.\r\n         */\r\n        'auto-delete-tenant-database' => env('TENANCY_DATABASE_AUTO_DELETE', false),\r\n\r\n        /**\r\n         * Automatically delete the user needed to access the tenant database.\r\n         *\r\n         * @info Set to false to disable.\r\n         * @info Only deletes in case tenant database is set to be deleted.\r\n         */\r\n        'auto-delete-tenant-database-user' => env('TENANCY_DATABASE_AUTO_DELETE_USER', false),\r\n\r\n        /**\r\n         * Define a list of classes that you wish to force onto the tenant or system connection.\r\n         * The connection will be forced when the Model has booted.\r\n         *\r\n         * @info Useful for overriding the connection of third party packages.\r\n         */\r\n        'force-tenant-connection-of-models' => [\r\n            App\\Models\\Tenant\\User::class,\r\n//            App\\User::class\r\n        ],\r\n        'force-system-connection-of-models' => [\r\n            App\\Models\\System\\User::class,\r\n//            App\\User::class\r\n        ],\r\n    ],\r\n\r\n    /**\r\n     * Global tenant specific routes.\r\n     * Making it easier to distinguish between landing and tenant routing.\r\n     *\r\n     * @info only works with `tenancy.hostname.auto-identification` or identification happening\r\n     *       before the application is booted (eg inside middleware or the register method of\r\n     *       service providers).\r\n     */\r\n    'routes' => [\r\n        /**\r\n         * Routes file to load whenever a tenant was identified.\r\n         *\r\n         * @info Set to false or null to disable.\r\n         */\r\n        'path' => base_path('routes/tenants.php'),\r\n\r\n        /**\r\n         * Set to true to flush all global routes before setting the routes from the\r\n         * tenants.php routes file.\r\n         */\r\n        'replace-global' => false,\r\n    ],\r\n\r\n    /**\r\n     * Folders configuration specific per tenant.\r\n     * The following section relates to configuration to files inside the tenancy/<uuid>\r\n     * tenant directory.\r\n     */\r\n    'folders' => [\r\n        'config' => [\r\n            /**\r\n             * Merge configuration files from the config directory\r\n             * inside the tenant directory with the global configuration files.\r\n             */\r\n            'enabled' => true,\r\n\r\n            /**\r\n             * List of configuration files to ignore, preventing override of crucial\r\n             * application configurations.\r\n             */\r\n            'blacklist' => ['database', 'tenancy', 'webserver'],\r\n        ],\r\n        'routes' => [\r\n            /**\r\n             * Allows adding and overriding URL routes inside the tenant directory.\r\n             */\r\n            'enabled' => true,\r\n\r\n            /**\r\n             * Prefix all tenant routes.\r\n             */\r\n            'prefix' => null,\r\n        ],\r\n        'trans' => [\r\n            /**\r\n             * Allows reading translation files from a trans directory inside\r\n             * the tenant directory.\r\n             */\r\n            'enabled' => true,\r\n\r\n            /**\r\n             * Will override the global translations with the tenant translations.\r\n             * This is done by overriding the laravel default translator with the new path.\r\n             */\r\n            'override-global' => true,\r\n\r\n            /**\r\n             * In case you disabled global override, specify a namespace here to load the\r\n             * tenant translation files with.\r\n             */\r\n            'namespace' => 'tenant',\r\n        ],\r\n        'vendor' => [\r\n            /**\r\n             * Allows using a custom vendor (composer driven) folder inside\r\n             * the tenant directory.\r\n             */\r\n            'enabled' => true,\r\n        ],\r\n        'media' => [\r\n            /**\r\n             * Mounts the assets directory with (static) files for public use.\r\n             */\r\n            'enabled' => true,\r\n        ],\r\n        'views' => [\r\n            /**\r\n             * Adds the vendor directory of the tenant inside the application.\r\n             */\r\n            'enabled' => true,\r\n\r\n            /**\r\n             * Specify a namespace to use with which to load the views.\r\n             *\r\n             * @eg setting `tenant` will allow you to use `tenant::some.blade.php`\r\n             * @info set to null to add to the global namespace.\r\n             */\r\n            'namespace' => null,\r\n\r\n            /**\r\n             * If `namespace` is set to null (thus using the global namespace)\r\n             * make it override the global views. Disable by setting to false.\r\n             */\r\n            'override-global' => true,\r\n        ]\r\n    ]\r\n];\r\n\r\n```\r\n\r\n__webserver.php config__\r\n\r\n```php\r\n<?php\r\n\r\n/*\r\n * This file is part of the hyn/multi-tenant package.\r\n *\r\n * (c) Daniël Klabbers <daniel@klabbers.email>\r\n *\r\n * For the full copyright and license information, please view the LICENSE\r\n * file that was distributed with this source code.\r\n *\r\n * @see https://laravel-tenancy.com\r\n * @see https://github.com/hyn/multi-tenant\r\n */\r\n\r\nreturn [\r\n\r\n    /**\r\n     * Apache2 is one of the most widely adopted webserver packages available.\r\n     *\r\n     * @see http://httpd.apache.org/docs/\r\n     * @see https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu\r\n     */\r\n    'apache2' => [\r\n        /**\r\n         * Whether the integration with Apache2 is currently active.\r\n         */\r\n        'enabled' => false,\r\n\r\n        /**\r\n         * Define the ports of your Apache service.\r\n         */\r\n        'ports' => [\r\n            /**\r\n             * HTTP, non-SSL port.\r\n             *\r\n             * @default 80\r\n             */\r\n            'http' => 80,\r\n            /**\r\n             * HTTPS, SSL port.\r\n             *\r\n             * @default 443\r\n             */\r\n            'https' => 443\r\n        ],\r\n\r\n        /**\r\n         * The generator taking care of hooking into the Apache services and files.\r\n         */\r\n        'generator' => \\Hyn\\Tenancy\\Generators\\Webserver\\Vhost\\ApacheGenerator::class,\r\n\r\n        /**\r\n         * The view that holds the vhost configuration template.\r\n         */\r\n        'view' => 'tenancy.generators::webserver.apache.vhost',\r\n\r\n        /**\r\n         * Specify the disk you configured in the filesystems.php file where to store\r\n         * the tenant vhost configuration files.\r\n         *\r\n         * @info If not set, will revert to the default filesystem.\r\n         */\r\n        'disk' => null,\r\n\r\n        'paths' => [\r\n\r\n            /**\r\n             * Location where vhost configuration files can be found.\r\n             */\r\n            'vhost-files' => [\r\n                '/etc/apache2/sites-enabled/'\r\n            ],\r\n\r\n            /**\r\n             * Actions to run to work with the Apache2 service.\r\n             */\r\n            'actions' => [\r\n                /**\r\n                 * Action that asserts Apache2 is installed.\r\n                 */\r\n                'exists' => '/etc/init.d/apache2',\r\n                /**\r\n                 * Action to run to test the apache configuration.\r\n                 *\r\n                 * @set to a boolean to force the response of the test command.\r\n                 * @info true succeeds, false fails\r\n                 */\r\n                'test-config' => 'apache2ctl -t',\r\n                /**\r\n                 * Action to run to reload the apache service.\r\n                 *\r\n                 * @info set to null to disable reloading.\r\n                 */\r\n                'reload' => 'apache2ctl graceful'\r\n            ]\r\n        ]\r\n    ],\r\n\r\n    /**\r\n     * Nginx webserver support.\r\n     *\r\n     * @see http://nginx.org\r\n     */\r\n    'nginx' => [\r\n        /**\r\n         * Whether the integration with nginx is currently active.\r\n         */\r\n        'enabled' => false,\r\n\r\n        /**\r\n         * The php sock to be used.\r\n         */\r\n        'php-sock' => 'unix:/var/run/php/php7.1-fpm.sock',\r\n\r\n        /**\r\n         * Define the ports of your nginx service.\r\n         */\r\n        'ports' => [\r\n            /**\r\n             * HTTP, non-SSL port.\r\n             *\r\n             * @default 80\r\n             */\r\n            'http' => 80,\r\n            /**\r\n             * HTTPS, SSL port.\r\n             *\r\n             * @default 443\r\n             */\r\n            'https' => 443\r\n        ],\r\n\r\n        /**\r\n         * The generator taking care of hooking into the nginx services and files.\r\n         */\r\n        'generator' => \\Hyn\\Tenancy\\Generators\\Webserver\\Vhost\\NginxGenerator::class,\r\n\r\n        /**\r\n         * The view that holds the vhost configuration template.\r\n         */\r\n        'view' => 'tenancy.generators::webserver.nginx.vhost',\r\n\r\n        /**\r\n         * Specify the disk you configured in the filesystems.php file where to store\r\n         * the tenant vhost configuration files.\r\n         *\r\n         * @info If not set, will revert to the default filesystem.\r\n         */\r\n        'disk' => null,\r\n\r\n        'paths' => [\r\n\r\n            /**\r\n             * Location where vhost configuration files can be found.\r\n             */\r\n            'vhost-files' => [\r\n                '/etc/nginx/sites-enabled/'\r\n            ],\r\n\r\n            /**\r\n             * Actions to run to work with the Nginx service.\r\n             */\r\n            'actions' => [\r\n                /**\r\n                 * Action that asserts nginx is installed.\r\n                 */\r\n                'exists' => '/etc/init.d/nginx',\r\n                /**\r\n                 * Action to run to test the nginx configuration.\r\n                 *\r\n                 * @info set to a boolean to force the response of the test command.\r\n                 *  true succeeds, false fails\r\n                 */\r\n                'test-config' => '/etc/init.d/nginx configtest',\r\n                /**\r\n                 * Action to run to reload the nginx service.\r\n                 *\r\n                 * @info set to null to disable reloading.\r\n                 */\r\n                'reload' => '/etc/init.d/nginx reload'\r\n            ]\r\n        ]\r\n    ]\r\n];\r\n```\r\n\r\n---\r\n\r\n__Error log__\r\n\r\n```text\r\nPHPUnit 7.3.5 by Sebastian Bergmann and contributors.\r\n\r\n.E                                                                  2 / 2 (100%)\r\n\r\nTime: 2.46 seconds, Memory: 18.00MB\r\n\r\nThere was 1 error:\r\n\r\n1) Tests\\Feature\\TenantDeleteCommandTest::testCanDeleteExistingTenant\r\nIlluminate\\Contracts\\Container\\BindingResolutionException: Unresolvable dependency resolving [Parameter #0 [ <required> array $config ]] in class Spatie\\EventProjector\\Projectionist\r\n\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:948\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:886\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:827\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:795\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:646\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:601\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:734\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:900\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:828\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:795\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:646\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Container/Container.php:601\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:734\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:398\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:375\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:209\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:182\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php:162\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:173\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:156\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php:36\r\n/home/dim/Codes/web/portal2/newportal/vendor/hyn/multi-tenant/src/Providers/TenancyProvider.php:66\r\n/home/dim/Codes/web/portal2/newportal/vendor/hyn/multi-tenant/src/Providers/TenancyProvider.php:43\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:573\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:75\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:548\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php:17\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:206\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:297\r\n/home/dim/Codes/web/portal2/newportal/tests/CreatesApplication.php:18\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:91\r\n/home/dim/Codes/web/portal2/newportal/tests/TenantAwareTestCase.php:26\r\n/home/dim/Codes/web/portal2/newportal/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:68\r\n/home/dim/Codes/web/portal2/newportal/tests/TenantAwareTestCase.php:19\r\n/home/dim/Codes/web/portal2/newportal/tests/Feature/TenantDeleteCommandTest.php:14\r\n\r\nERRORS!\r\nTests: 2, Assertions: 1, Errors: 1.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/hyn/multi-tenant/issues/comments/421542124","html_url":"https://github.com/hyn/multi-tenant/issues/615#issuecomment-421542124","issue_url":"https://api.github.com/repos/hyn/multi-tenant/issues/615","id":421542124,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTU0MjEyNA==","user":{"login":"luceos","id":504687,"node_id":"MDQ6VXNlcjUwNDY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/504687?v=4","gravatar_id":"","url":"https://api.github.com/users/luceos","html_url":"https://github.com/luceos","followers_url":"https://api.github.com/users/luceos/followers","following_url":"https://api.github.com/users/luceos/following{/other_user}","gists_url":"https://api.github.com/users/luceos/gists{/gist_id}","starred_url":"https://api.github.com/users/luceos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luceos/subscriptions","organizations_url":"https://api.github.com/users/luceos/orgs","repos_url":"https://api.github.com/users/luceos/repos","events_url":"https://api.github.com/users/luceos/events{/privacy}","received_events_url":"https://api.github.com/users/luceos/received_events","type":"User","site_admin":false},"created_at":"2018-09-15T08:49:56Z","updated_at":"2018-09-15T08:49:56Z","author_association":"MEMBER","body":"It seems to me that the service provider of event projector isn't active during tests. This has nothing to do with the package. The `$config` argument of the mentioned class is missing and instantiated into ioc as singleton [here](https://github.com/spatie/laravel-event-projector/blob/master/src/EventProjectorServiceProvider.php#L45-L55)."}}
{"actor":{"display_login":"luceos"}}