Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Use string based accessor for Schema facade #38017

Merged
merged 3 commits into from
Jul 16, 2021

Conversation

driesvints
Copy link
Member

@driesvints driesvints commented Jul 15, 2021

This is a re-send of #25512 but one that keeps in mind the issues which originated from it with #27686

It moves the Schema facade to a string based accessor in the way facades were intended to work. This will make all facade accessors in Laravel string based which means we can remove any object checks. The way this PR solves the original issue from #27686 is by adding a new $cached check to the facade class. If caching is turned off, a fresh instance is always retrieved from the container, just like the facade is currently doing.

At the same time this PR solves #37983. The facade mocking will disregard the caching check and will always register a mock with the facade and thus enable all capabilities like spying, etc. Swapping is also supported now on the Schema facade.

Basically this PR should resolve all prior issues. While technically this should be good to go to 8.x, because the facade root isn't returning an object anymore I opted to send this in to master for the next major release.

I'd very much appreciate if @stancl (tenancy) and @awjudd (OP of the spying issue) could try out this PR.

@stancl
Copy link
Contributor

stancl commented Jul 15, 2021

While technically this should be good to go to 8.x, because the facade root isn't returning an object anymore I opted to send this in to master for the next major release.

I wonder if the change in logic (the removed is_object check) could somehow affect userland facades?

As for my part of the review, I'd appreciate if you could clone https://github.com/archtechx/tenancy, change the Laravel dependencies to 9.x in composer.json (hopefully this won't create any issues with the other dependencies), and run:

phpunit --filter migrate_command_works_with_tenants_option

I mentioned this test in my original bug report. It basically runs Schema::hasTable() after switching the default DB connection, which tests that the connection used by the Schema facade isn't cached and is always the current one unless explicitly specified otherwise.

@driesvints
Copy link
Member Author

I wonder if the change in logic (the removed is_object check) could somehow affect userland facades?

That's why I sent this to master. I believe we shouldn't support that workaround anymore as it was originally intended to only return strings from it (see the return type on the parent class). The Schema facade was an odd one at best.

I'd appreciate if you could clone https://github.com/archtechx/tenancy, change the Laravel dependencies to 9.x in composer.json (hopefully this won't create any issues with the other dependencies),

I can't... too much dependencies yet that can't be resolved 😞

@stancl
Copy link
Contributor

stancl commented Jul 15, 2021

Ah, that's unfortunate. Maybe you can replicate the test with something simple like:

config(['database.default' => 'foo']);
app('db.manager')->setDefaultConnection('foo');
Schema::getConnection()->getName(); // => foo

config(['database.default' => 'bar']);
app('db.manager')->setDefaultConnection('bar');
Schema::getConnection()->getName(); // => bar

(I believe it's db.manager, might be just db. I copied this from #27686 but added code for changing the default DB connection.)

In the broken version the second getConnection()->getName() call returned foo despite the default connection being bar.

@driesvints
Copy link
Member Author

@stancl I added the same changes to a branch of 8.x but I get the following on both 8.x and my branch:

PHPUnit output

$ phpunit --filter migrate_command_works_with_tenants_option                                                                                                                                                      ~/Sites/test-tenancy

PHPUnit 9.5.6 by Sebastian Bergmann and contributors.

Warning:       No code coverage driver available
Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

E                                                                   1 / 1 (100%)

Time: 00:00.098, Memory: 24.00 MB

There was 1 error:

1) Stancl\Tenancy\Tests\CommandsTest::migrate_command_works_with_tenants_option
Illuminate\Database\QueryException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')

/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:692
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:652
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:360
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php:125
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php:74
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/WipeCommand.php:69
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/WipeCommand.php:46
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Util.php:40
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Container.php:651
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:136
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Command/Command.php:299
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:121
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:68
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:28
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php:43
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Util.php:40
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Container.php:651
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:136
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Command/Command.php:299
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:121
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:978
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:295
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:167
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Application.php:92
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Application.php:184
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:263
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Testing/PendingCommand.php:219
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Testing/PendingCommand.php:367
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:66
/Users/driesvints/Sites/test-tenancy/tests/TestCase.php:27
/Users/driesvints/Sites/test-tenancy/tests/CommandsTest.php:26

Caused by
Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known

/Users/driesvints/Sites/test-tenancy/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
/Users/driesvints/Sites/test-tenancy/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:67
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:46
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:24
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:184
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:999
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:1035
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:426
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:352
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:685
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:652
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:360
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php:125
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php:74
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/WipeCommand.php:69
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/WipeCommand.php:46
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Util.php:40
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Container.php:651
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:136
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Command/Command.php:299
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:121
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:68
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:28
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php:43
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Util.php:40
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Container.php:651
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:136
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Command/Command.php:299
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:121
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:978
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:295
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:167
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Application.php:92
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Application.php:184
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:263
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Testing/PendingCommand.php:219
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Testing/PendingCommand.php:367
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:66
/Users/driesvints/Sites/test-tenancy/tests/TestCase.php:27
/Users/driesvints/Sites/test-tenancy/tests/CommandsTest.php:26

Caused by
PDOException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known

/Users/driesvints/Sites/test-tenancy/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:39
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:67
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:46
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:24
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:184
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:999
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:1035
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:426
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:352
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:685
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:652
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:360
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php:125
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php:74
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/WipeCommand.php:69
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/WipeCommand.php:46
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Util.php:40
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Container.php:651
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:136
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Command/Command.php:299
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:121
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:68
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:28
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php:43
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Util.php:40
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Container.php:651
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:136
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Command/Command.php:299
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:121
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:978
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:295
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:167
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Application.php:92
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Application.php:184
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:263
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Testing/PendingCommand.php:219
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Testing/PendingCommand.php:367
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:66
/Users/driesvints/Sites/test-tenancy/tests/TestCase.php:27
/Users/driesvints/Sites/test-tenancy/tests/CommandsTest.php:26

Caused by
PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known

/Users/driesvints/Sites/test-tenancy/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:39
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:67
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:46
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:24
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:184
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:999
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:1035
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:426
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:352
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:685
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:652
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Connection.php:360
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php:125
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php:74
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/WipeCommand.php:69
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/WipeCommand.php:46
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Util.php:40
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Container.php:651
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:136
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Command/Command.php:299
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:121
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:68
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:28
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php:43
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Util.php:40
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Container/Container.php:651
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:136
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Command/Command.php:299
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Command.php:121
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:978
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:295
/Users/driesvints/Sites/test-tenancy/vendor/symfony/console/Application.php:167
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Application.php:92
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Console/Application.php:184
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:263
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Testing/PendingCommand.php:219
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Testing/PendingCommand.php:367
/Users/driesvints/Sites/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:66
/Users/driesvints/Sites/test-tenancy/tests/TestCase.php:27
/Users/driesvints/Sites/test-tenancy/tests/CommandsTest.php:26

@GrahamCampbell
Copy link
Member

Isn't this just going to make all facades slightly slower for no real benefit?

@driesvints
Copy link
Member Author

@stancl Okay, I tried switching some connection stuff to connect to my local MySQL database and that tests passes on both 8.x and my branch.

Isn't this just going to make all facades slightly slower for no real benefit?

No? This doesn't affects other facades? And the only change is that schema builder is now resolved from the container rather than directly on the facade.

@stancl
Copy link
Contributor

stancl commented Jul 15, 2021

@driesvints Right, sorry I forgot to mention that the tests need docker-compose up -d to be ran first. I haven't worked with that repo much lately.

And if the test passes and this is the current behavior, then there shouldn't be any issues with this change 👍🏻

@taylorotwell taylorotwell merged commit 5d57904 into master Jul 16, 2021
@taylorotwell taylorotwell deleted the refactor-schema-facade branch July 16, 2021 13:34
@driesvints
Copy link
Member Author

@stancl are you in a position to re-try this PR now that we're closer to Laravel 9's release date?

@stancl
Copy link
Contributor

stancl commented Dec 3, 2021

Hey @driesvints, do you mean testing the compatibility with my package?

@driesvints
Copy link
Member Author

@stancl yeah

@stancl
Copy link
Contributor

stancl commented Dec 3, 2021

Will check it this weekend and let you know 👍

@stancl
Copy link
Contributor

stancl commented Dec 6, 2021

@driesvints do you happen to know if there's a way to use testbench for Laravel 9? I've updated the dependencies in my control to use Laravel's dev-master, but still can't get through this:

    - orchestra/testbench-browser-kit[v4.8.0, ..., 4.x-dev] require laravel/browser-kit-testing ^5.2 -> satisfiable by laravel/browser-kit-testing[v5.2.0].
    - orchestra/testbench-browser-kit[v4.0.0, ..., v4.7.0] require laravel/browser-kit-testing ^5.1.3 -> satisfiable by laravel/browser-kit-testing[v5.1.3, v5.1.4, v5.2.0].
    - orchestra/testbench-browser-kit[v5.2.0, ..., 5.x-dev, v6.1.0, ..., v6.16.1] require laravel/browser-kit-testing ^6.2 -> satisfiable by laravel/browser-kit-testing[v6.2.0, ..., 6.x-dev].
    - orchestra/testbench-browser-kit v6.0.0 requires laravel/browser-kit-testing ^6.1 -> satisfiable by laravel/browser-kit-testing[v6.1.0, ..., 6.x-dev].
    - orchestra/testbench-browser-kit[v5.0.0, ..., v5.1.0] require laravel/browser-kit-testing ^6.0 -> satisfiable by laravel/browser-kit-testing[v6.0.0, ..., 6.x-dev].
    - orchestra/testbench-browser-kit 6.x-dev requires laravel/browser-kit-testing ^6.2.2 -> satisfiable by laravel/browser-kit-testing[v6.2.2, v6.2.3, 6.x-dev].
    - laravel/browser-kit-testing[v5.1.3, ..., v5.2.0] require illuminate/support ~5.7.0|~5.8.0|^6.0 -> found illuminate/support[v5.7.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev] but it conflicts with your root composer.json require (dev-master).
    - laravel/browser-kit-testing[v6.0.0, ..., v6.1.0] require php ^7.2 -> your php version (8.0.6) does not satisfy that requirement.
    - laravel/browser-kit-testing[v6.2.0, ..., 6.x-dev] require illuminate/support ^7.0|^8.0 -> found illuminate/support[v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but it conflicts with your root composer.json require (dev-master).
    - Root composer.json requires orchestra/testbench-browser-kit ^4.0|^5.0|^6.0 -> satisfiable by orchestra/testbench-browser-kit[v4.0.0, ..., 4.x-dev, v5.0.0, ..., 5.x-dev, v6.0.0, ..., 6.x-dev].

@driesvints
Copy link
Member Author

@stancl sorry, forgot to get back to you. You should be able to pull dev-master from orchestra/testbench-browser-kit now and it'll install on Laravel dev-master. Can you try it out?

@stancl
Copy link
Contributor

stancl commented Dec 13, 2021

@driesvints No worries. Okay, setting everything up locally was a bit painful with some breaking changes in dependencies, but I managed to get most of the tests working with the relevant one passing without issues:

~/Projects/tenancy git:(v9-test) ✗ ./test --filter migrate_command_works_with_tenants_option 
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

.                                                                   1 / 1 (100%)

Time: 00:01.173, Memory: 48.00 MB

OK (1 test, 3 assertions)

So the Schema stuff works great 👍🏻

@driesvints
Copy link
Member Author

Thanks @stancl !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants