Hi Adam,
first off, thanks for this plugin!
I have noticed that it is currently not compatible with vlucas/phpdotenv v5.5 and throws some fatal errors regarding phpdotenv internals. I created a fork and changed some things to make it work, that I would like to share with you:
1: bedrock-auth.php:15-18
namespace BedrockAuth;
use Dotenv;
use Env;
changed to
use function Env\env;
2: changed constructor from:
public function __construct()
{
$this->root_dir = dirname(dirname(ABSPATH));
$this->dotenv = new Dotenv\Dotenv($this->root_dir);
Env::init();
}
to:
public function __construct()
{
$this->root_dir = dirname(dirname(ABSPATH));
$this->dotenv = Dotenv\Dotenv::createUnsafeImmutable($this->root_dir);
}
After these changes, the plugin can be activated when using with vlucas/phpdotenv v5.5
Hi Adam, first off, thanks for this plugin! I have noticed that it is currently not compatible with vlucas/phpdotenv v5.5 and throws some fatal errors regarding phpdotenv internals. I created a fork and changed some things to make it work, that I would like to share with you:
1: bedrock-auth.php:15-18
changed to
2: changed constructor from:
to:
After these changes, the plugin can be activated when using with vlucas/phpdotenv v5.5