Skip to content

Commit ca54388

Browse files
committed
oauth_server.md: Install DB before enabling the bundles (#2397)
It avoids having `php bin/console` checking the bundles' configs. (cherry picked from commit f31b890)
1 parent 13e9c83 commit ca54388

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

docs/users/oauth_server.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,12 @@ You can install it with the following command:
1818
composer require ibexa/oauth2-server --with-all-dependencies
1919
```
2020

21-
Then, in `config/bundles.php`, at the end of an array with a list of bundles, add the following two lines :
22-
23-
```php
24-
<?php
25-
26-
return [
27-
// A lot of bundles…
28-
Ibexa\Bundle\OAuth2Server\IbexaOAuth2ServerBundle::class => ['all' => true],
29-
League\Bundle\OAuth2ServerBundle\LeagueOAuth2ServerBundle::class => ['all' => true],
30-
];
31-
```
32-
3321
Add the tables needed by the bundle:
3422

3523
=== "MySQL"
3624

3725
```bash
38-
mysql -u <username> -p <password> <database_name> -e 'SET FOREIGN_KEY_CHECKS=0;'
3926
php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/oauth2-server/src/bundle/Resources/config/schema.yaml | mysql -u <username> -p <password> <database_name>
40-
mysql -u <username> -p <password> <database_name> -e 'SET FOREIGN_KEY_CHECKS=1;'
4127
```
4228

4329
=== "PostgreSQL"
@@ -46,6 +32,18 @@ Add the tables needed by the bundle:
4632
php bin/console ibexa:doctrine:schema:dump-sql --force-platform=postgres vendor/ibexa/oauth2-server/src/bundle/Resources/config/schema.yaml | psql <database_name>
4733
```
4834

35+
Then, in `config/bundles.php`, at the end of an array with a list of bundles, add the following two lines :
36+
37+
```php
38+
<?php
39+
40+
return [
41+
// A lot of bundles…
42+
Ibexa\Bundle\OAuth2Server\IbexaOAuth2ServerBundle::class => ['all' => true],
43+
League\Bundle\OAuth2ServerBundle\LeagueOAuth2ServerBundle::class => ['all' => true],
44+
];
45+
```
46+
4947
## Authorization Server configuration
5048

5149
### Keys

0 commit comments

Comments
 (0)