Skip to content

Refactor: Split exception classes into separate files#22

Open
chrmarek wants to merge 1 commit intoroojs:masterfrom
chrmarek:split-exception-classes
Open

Refactor: Split exception classes into separate files#22
chrmarek wants to merge 1 commit intoroojs:masterfrom
chrmarek:split-exception-classes

Conversation

@chrmarek
Copy link
Copy Markdown

Split PDO_DataObject_Exception child classes from Exception.php into individual files in PDO/DataObject/Exception/ directory:

  • InvalidArgs.php
  • NoData.php
  • InvalidConfig.php
  • NoClass.php
  • Set.php
  • Connect.php
  • Query.php

Each child class now has its own file while maintaining the same class names and namespace structure. The base Exception.php file loads all child classes via require_once to maintain backward compatibility with existing code that uses the factory pattern.

This improves code organization and makes individual exception classes easier to locate and maintain.

Thix fixes the issue where phpstan complains about not finding sub exception classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant