Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit cc2a36e

Browse files
committed
Use paths relative to current working directory
Previously, using the construct `__DIR__ . '/../data/' for paths to keys causes fatal errors immediately when the user does not override the configuration, and instead uses the default configuration. This is particularly problematic because the documentation suggests that running `vendor/bin/generate-oauth2-keys` should be sufficient. This patch modifies those paths to be relative to the current working directory, `getcwd() . '/data'`, fixing those issues.
1 parent ee102a8 commit cc2a36e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

config/oauth2.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
* @see http://php.net/manual/en/class.dateinterval.php
1111
*/
1212
return [
13-
'private_key' => __DIR__ . '/../data/private.key',
14-
'public_key' => __DIR__ . '/../data/public.key',
15-
'encryption_key' => require __DIR__ . '/../data/encryption.key',
13+
'private_key' => getcwd() . '/data/private.key',
14+
'public_key' => getcwd() . '/data/public.key',
15+
'encryption_key' => require getcwd() . '/data/encryption.key',
1616
'access_token_expire' => 'P1D', // 1 day in DateInterval format
1717
'refresh_token_expire' => 'P1M', // 1 month in DateInterval format
1818
'auth_code_expire' => 'PT10M', // 10 minutes in DateInterval format

0 commit comments

Comments
 (0)