Skip to content

fix: Exception rework #8728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
May 23, 2024
Merged

fix: Exception rework #8728

merged 32 commits into from
May 23, 2024

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Apr 7, 2024

Description
Supersedes #8470
Closes #4358

  • add new Exception classes in CodeIgniter\Exceptions
    • LogicException
    • RuntimeException
    • BadFunctionCallException
    • BadMethodCallException
    • InvalidArgumentException
  • add domain-level ExceptionInterface to catch all Exceptions in the domain
    • Files
    • HTTP
    • Router

exceptions-database-class-dia

  • all Exception classes that the framework throws
    • implement CodeIgniter\Exceptions\ExceptionInterface
    • extend \Exception (not \Error)
    • extend \LogicException or \RuntimeException

exceptions-class-dia

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the 4.6 label Apr 7, 2024
@kenjis kenjis changed the base branch from develop to 4.6 April 7, 2024 23:38
@kenjis kenjis changed the title Exception rework 4.6 fix: Exception rework Apr 7, 2024
@kenjis kenjis marked this pull request as draft April 7, 2024 23:39
@kenjis kenjis added bug Verified issues on the current code behavior or pull requests that will fix them breaking change Pull requests that may break existing functionalities enhancement PRs that improve existing functionalities docs needed Pull requests needing documentation write-ups and/or revisions. labels Apr 7, 2024
@kenjis kenjis force-pushed the exception-rework-4.6 branch from 0d6b649 to a248547 Compare April 8, 2024 00:57
@MGatner
Copy link
Member

MGatner commented Apr 10, 2024

Looks good to me.

@kenjis kenjis force-pushed the exception-rework-4.6 branch 2 times, most recently from 5d7c14c to f3cb449 Compare April 16, 2024 03:10
@kenjis kenjis removed the docs needed Pull requests needing documentation write-ups and/or revisions. label Apr 16, 2024
@kenjis kenjis marked this pull request as ready for review April 16, 2024 04:44
@kenjis
Copy link
Member Author

kenjis commented Apr 16, 2024

Updated code and added user guide.

@kenjis kenjis force-pushed the exception-rework-4.6 branch 2 times, most recently from 1225408 to aba67c4 Compare April 16, 2024 09:10
@github-actions github-actions bot added the stale Pull requests with conflicts label Apr 18, 2024
Copy link

👋 Hi, @kenjis!

We detected conflicts in your PR against the base branch 🙊
You may want to sync 🔄 your branch with upstream!

Ref: Syncing Your Branch

@kenjis kenjis force-pushed the exception-rework-4.6 branch from aba67c4 to b5921f6 Compare April 18, 2024 23:09
@kenjis kenjis removed the stale Pull requests with conflicts label Apr 18, 2024
Copy link

github-actions bot commented May 5, 2024

👋 Hi, @kenjis!

We detected conflicts in your PR against the base branch 🙊
You may want to sync 🔄 your branch with upstream!

Ref: Syncing Your Branch

@github-actions github-actions bot added the stale Pull requests with conflicts label May 5, 2024
@kenjis kenjis force-pushed the exception-rework-4.6 branch from b5921f6 to 9d4c707 Compare May 6, 2024 08:58
@kenjis kenjis removed the stale Pull requests with conflicts label May 6, 2024
kenjis added 23 commits May 6, 2024 19:19
If there are more than one Exception class in the domain,
provide a domain-level interface for capture of all exceptions.
@kenjis kenjis force-pushed the exception-rework-4.6 branch from 9d4c707 to f1359dd Compare May 6, 2024 10:19
@MGatner
Copy link
Member

MGatner commented May 23, 2024

UG changes look good, thanks for the thorough coverage.

@kenjis kenjis merged commit a640e3b into codeigniter4:4.6 May 23, 2024
41 checks passed
@kenjis kenjis deleted the exception-rework-4.6 branch May 23, 2024 12:05
@kenjis
Copy link
Member Author

kenjis commented May 23, 2024

@MGatner Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Pull requests that may break existing functionalities bug Verified issues on the current code behavior or pull requests that will fix them enhancement PRs that improve existing functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants