zend-db icon indicating copy to clipboard operation
zend-db copied to clipboard

Metadata\Source\Factory throws specific exception

Open Naktibalda opened this issue 9 years ago • 7 comments

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

Naktibalda avatar Sep 23 '16 22:09 Naktibalda

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.

adamlundrigan avatar Oct 02 '16 17:10 adamlundrigan

Done

Naktibalda avatar Oct 02 '16 17:10 Naktibalda

Would it be better to rename InvalidArgumentException to UnknownPlatformException extends InvalidArgumentException

Naktibalda avatar Nov 09 '16 10:11 Naktibalda

@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 avatar Mar 08 '17 14:03 ezimuel

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?

Naktibalda avatar Mar 10 '17 21:03 Naktibalda

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 avatar Jan 16 '20 19:01 michalbundyra

This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at https://github.com/laminas/laminas-db/issues/95.

michalbundyra avatar Jan 16 '20 19:01 michalbundyra