From 3df7c28263f5dabac5aaba6ec71c6e2fe0306b8f Mon Sep 17 00:00:00 2001 From: Laurent Declercq Date: Fri, 1 Mar 2019 18:16:08 +0100 Subject: [PATCH 1/3] Typo in \Zend\Expressive\Authentication\UserRepositoryPdoDatabaseFactory --- CHANGELOG.md | 22 ++++++++++++++++++++++ src/UserRepository/PdoDatabaseFactory.php | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac4e71a..d5725f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,28 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 1.0.2 - TBD + +### Added + +- Nothing. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#40](https://github.com/zendframework/zend-expressive-authentication/issues/40) typo in \Zend\Expressive\Authentication\UserRepositoryPdoDatabaseFactory + ## 1.0.1 - TBD ### Added diff --git a/src/UserRepository/PdoDatabaseFactory.php b/src/UserRepository/PdoDatabaseFactory.php index 82d2411..9bd6adb 100644 --- a/src/UserRepository/PdoDatabaseFactory.php +++ b/src/UserRepository/PdoDatabaseFactory.php @@ -24,7 +24,7 @@ public function __invoke(ContainerInterface $container) : PdoDatabase $pdo = $container->get('config')['authentication']['pdo'] ?? null; if (null === $pdo) { throw new Exception\InvalidConfigException( - 'PDO values are missing in user_register config' + 'PDO values are missing in authentication config' ); } if (! isset($pdo['dsn'])) { From c8b336391909de9b38d3b7d6321ae61ad04b7124 Mon Sep 17 00:00:00 2001 From: Laurent Declercq Date: Fri, 1 Mar 2019 19:05:54 +0100 Subject: [PATCH 2/3] Added test case for #40 --- test/UserRepository/PdoDatabaseFactoryTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/test/UserRepository/PdoDatabaseFactoryTest.php b/test/UserRepository/PdoDatabaseFactoryTest.php index fbb4086..6a70ab5 100644 --- a/test/UserRepository/PdoDatabaseFactoryTest.php +++ b/test/UserRepository/PdoDatabaseFactoryTest.php @@ -41,6 +41,7 @@ public function testInvokeWithEmptyConfig() $this->container->get('config')->willReturn([]); $this->expectException(InvalidConfigException::class); + $this->expectExceptionMessage('PDO values are missing in authentication config'); $pdoDatabase = ($this->factory)($this->container->reveal()); } From 5169f5b9867a9c1f708e3f0c11df71fd5603e5dd Mon Sep 17 00:00:00 2001 From: Laurent Declercq Date: Fri, 1 Mar 2019 22:03:29 +0100 Subject: [PATCH 3/3] Fixed CHANGELOG entry for #45 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5725f4..36bd6b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,8 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed -- [#40](https://github.com/zendframework/zend-expressive-authentication/issues/40) typo in \Zend\Expressive\Authentication\UserRepositoryPdoDatabaseFactory +- [#40](https://github.com/zendframework/zend-expressive-authentication/pull/45) Corrected wrong configuration parameter name + in \Zend\Expressive\Authentication\UserRepositoryPdoDatabaseFactory: `authentication` instead of `user_register`. ## 1.0.1 - TBD