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

Throw exception when query does not work #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Colmbus72
Copy link

Throw an exception when we find out that execute() did not work. Since execute() returns false when there is an error we can bubble this up to let the user know their auth roles or auth details query from the config was incorrect.

Provide a narrative description of what you are trying to accomplish:

  • Are you fixing a bug?
    • Detail how the bug is invoked currently.
      If the user puts an incorrect sql query in their auth config it will role over this without telling them it was wrong.
    • Detail the original, incorrect behavior.
      If an incorrect sql query is used in the auth config it will show every user has possibly no role or no details
    • Detail the new, expected behavior.
      When an incorrect sql query is passed in the config and ran against the db a runtime exception will be thrown showing the details return from errorInfo() on the prepared statement.
    • Base your feature on the master branch, and submit against that branch.

Throw an exception when we find out that execute() did not work. Since execute() returns false when there is an error we can bubble this up to let the user know their query was incorrect.
@weierophinney
Copy link
Member

This repository has been closed and moved to mezzio/mezzio-authentication; a new issue has been opened at mezzio/mezzio-authentication#1.

@weierophinney
Copy link
Member

This repository has been moved to mezzio/mezzio-authentication. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone mezzio/mezzio-authentication to another directory.
  • Copy the files from the second bullet point to the clone of mezzio/mezzio-authentication.
  • In your clone of mezzio/mezzio-authentication, commit the files, push to your fork, and open the new PR.
    We will be providing tooling via laminas/laminas-migration soon to help automate the process.

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

Successfully merging this pull request may close these issues.

3 participants