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

Metadata\Source\Factory throws specific exception #170

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

Conversation

Naktibalda
Copy link

Metadata\Source\Factory throws specific exception when the platform is not supported.

It will help to catch this specific exception in zf-apigility-admin,
matching exception by text is too fragile.

https://github.com/zfcampus/zf-apigility-admin/pull/365/files

@adamlundrigan
Copy link
Contributor

Your changes have failed the coding standards check. Please refer to CONTRIBUTING.md for details on how to run php-cs-fixer on your changes to ensure they conform.

@Naktibalda
Copy link
Author

Done

@Naktibalda
Copy link
Author

Would it be better to rename InvalidArgumentException to UnknownPlatformException extends InvalidArgumentException

@ezimuel ezimuel added this to the 3.0.0 milestone Mar 8, 2017
@ezimuel
Copy link
Contributor

ezimuel commented Mar 8, 2017

@Naktibalda I'm planning to merge this PR for zend-db 3.0.0. It's ok using InvalidArgumentException as you did in the PR. We don't need a specific UnknownPlatformException becuase now we have a better namespace.
Can you send this PR against develop? Thanks!

@ezimuel ezimuel self-assigned this Mar 8, 2017
@Naktibalda Naktibalda changed the base branch from master to develop March 10, 2017 21:51
@Naktibalda
Copy link
Author

I changed the base branch, but I don't understand what you mean with "a better namespace", do I need to change anything in the code?

@michalbundyra
Copy link
Member

This repository has been moved to laminas/laminas-db. 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 laminas/laminas-db to another directory.
  • Copy the files from the second bullet point to the clone of laminas/laminas-db.
  • In your clone of laminas/laminas-db, 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.

@michalbundyra
Copy link
Member

This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at laminas/laminas-db#95.

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

Successfully merging this pull request may close these issues.

4 participants