Download the PHP package huluti/doctrine-relations-analyser without Composer
On this page you can find all versions of the php package huluti/doctrine-relations-analyser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package doctrine-relations-analyser
Doctrine Relations Analyzer
Overview
Doctrine Relations Analyzer is a tool designed to analyze and visualize cascade relationships within Doctrine ORM entities in Symfony projects. It helps developers understand how deletion operations propagate through related entities and assists in identifying potential issues or optimizations in data management strategies.
[!NOTE] Why is it important?
Managing cascade operations, especially deletions, is crucial to avoid unintentional data loss. This tool provides a human-readable summary to help >developers review and understand these relationships, ensuring they are intentional and correctly implemented.
[!WARNING] This project is a work in progress. Contributions and feedback are welcome.
Usage
Requirements
- PHP >= 8.1
- Symfony >= 6.4
- Doctrine 2|3
- Graphviz:
- For Alpine Linux:
graphviz fontconfig ttf-freefont
- For Alpine Linux:
Installation
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
Usage
php bin/console doctrine-relations-analyser:analyse
Examples
To check deletion relations of two entities in a graph:
php bin/console doctrine-relations-analyser:analyse -o data/ -g --entities="App\\Entity\\User,App\\Entity\\Workspace" -m deletions
Command-line Arguments
- --entities: Optional. Comma-separated list of entities to analyze
- -m, --mode: Optional. Analysis mode (all, deletions) [default: "all"]
- -o, --output: Optional. Output path for reports generated
- -g, --graph: Optional. Generate Graphviz graph
- --graph-format: Optional. Graph image format (png, svg) [default: "png"]
- -V, --version: Optional. Display help for the given command. When no command is given display help for the list command
- -h, --help: Optional. Display this application version
Limitations
- Only work with first joinColumn for now.
Contributions
Contributions are welcome! If you have ideas for improvements, new features, or bug fixes, please open an issue or a pull request.
Interesting readings
Donations
Do you like the tool? Would you like to support its development? Feel free to donate 🤗
License
This project is licensed under the MIT License.
All versions of doctrine-relations-analyser with dependencies
symfony/console Version ^6.4|^7.0
symfony/http-kernel Version ^6.4|^7.0
doctrine/orm Version ^2.0|^3.0
symfony/dependency-injection Version ^6.4|^7.0
graphp/graphviz Version ^1@dev
graphp/graph Version ^1@dev
symfony/filesystem Version ^6.4|^7.0
symfony/framework-bundle Version ^6.4|^7.0
doctrine/doctrine-bundle Version ^2.12