Skip to content
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

Add DependencyConnector to handle class dependencies in diagrams #10

Merged
merged 4 commits into from
Jun 25, 2024

Conversation

tasuku43
Copy link
Owner

@tasuku43 tasuku43 commented Jun 25, 2024

Pull Request Overview

This pull request introduces several significant updates and new features to the class diagram rendering system. Below are the key changes:

New Features

  1. DependencyConnector Implementation:

    • Added a new DependencyConnector class to handle class dependencies in diagrams.
    • This connector identifies dependencies from method parameters, return types, and instantiations within methods.
  2. Node Class Enhancements:

    • Updated the Node class to support dependencies.
    • Added a new method depend(Node $node) to manage dependencies.
    • Modified the relationships() method to include dependencies while filtering out properties, extensions, and implementations.
  3. Node Parsing Improvements:

    • Integrated DependencyConnector into the NodeParser class to automatically parse and detect dependencies.
  4. Relationship Rendering:

    • Added a new Dependency relationship class to render dependencies in the diagram.

Tests and Examples

  1. Class Diagram Tests:

    • Updated existing tests to include scenarios for dependency relationships.
    • Added new test cases to validate the proper parsing and rendering of dependencies.
  2. Example Class:

    • Added SomeClassE as an example class to demonstrate dependency relationships in tests.

Dependency Updates

  • Updated several dependencies to their latest versions, ensuring compatibility and security improvements.

Files Affected

  • src/ClassDiagramRenderer/Node/Connector/DependencyConnector.php: New file for handling dependencies.
  • src/ClassDiagramRenderer/Node/Node.php: Enhanced to support dependencies.
  • src/ClassDiagramRenderer/Node/NodeParser.php: Updated to parse dependencies.
  • src/ClassDiagramRenderer/Node/Nodes.php: Modified to retrieve all nodes.
  • src/ClassDiagramRenderer/Node/Relationship/Dependency.php: New file for rendering dependencies.
  • tests/ClassDiagram/ClassDiagramBuilderTest.php: Updated and added tests for dependency relationships.
  • tests/ClassDiagram/ClassDiagramTest.php: Updated and added tests for dependency relationships.
  • tests/ClassDiagram/data/SomeClassE.php: New example class demonstrating dependency relationships.

@tasuku43 tasuku43 force-pushed the feature/dependency branch from c30979c to 0114e2c Compare June 25, 2024 14:55
@tasuku43 tasuku43 merged commit c00955e into main Jun 25, 2024
1 check passed
@tasuku43 tasuku43 deleted the feature/dependency branch June 25, 2024 15:00
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