|
| 1 | +# Gemini Code Assistant Context |
| 2 | + |
| 3 | +## Project Overview |
| 4 | + |
| 5 | +This project is a Symfony bundle named `CleverAge/DoctrineProcessBundle`. It is part of the `CleverAge/ProcessBundle` ecosystem and provides Doctrine ORM integration for data processing tasks. The bundle allows developers to create and configure ETL-like processes (Extract, Transform, Load) that can read from and write to a database using Doctrine entities. |
| 6 | + |
| 7 | +The core of the bundle is a set of "tasks" that can be chained together in a process. These tasks include: |
| 8 | + |
| 9 | +* **Reading:** Fetching entities from the database based on criteria. |
| 10 | +* **Writing:** Creating or updating entities. |
| 11 | +* **Batch Writing:** Writing entities in batches for better performance. |
| 12 | +* **Removing:** Deleting entities. |
| 13 | +* **Cleaning/Detaching:** Managing the Doctrine entity manager's identity map. |
| 14 | + |
| 15 | +The bundle is built for Symfony and integrates with the Doctrine project. |
| 16 | + |
| 17 | +## Building and Running |
| 18 | + |
| 19 | +The project uses Docker for its development environment. The following commands are available in the `Makefile`: |
| 20 | + |
| 21 | +* **`make start`**: Starts the Docker containers for the development environment. |
| 22 | +* **`make stop`**: Stops the Docker containers. |
| 23 | +* **`make bash`**: Opens a bash shell inside the PHP container. |
| 24 | + |
| 25 | +### Dependencies |
| 26 | + |
| 27 | +PHP dependencies are managed with Composer. To install them, run: |
| 28 | + |
| 29 | +```bash |
| 30 | +make src/vendor |
| 31 | +``` |
| 32 | + |
| 33 | +This is typically done as part of the `make start` or `make up` commands. |
| 34 | + |
| 35 | +### Testing |
| 36 | + |
| 37 | +The project uses PHPUnit for testing. To run the test suite: |
| 38 | + |
| 39 | +```bash |
| 40 | +make tests |
| 41 | +``` |
| 42 | +or |
| 43 | +```bash |
| 44 | +make phpunit |
| 45 | +``` |
| 46 | + |
| 47 | +### Quality and Linting |
| 48 | + |
| 49 | +The project has a set of quality tools to ensure code standards. The main command is: |
| 50 | + |
| 51 | +```bash |
| 52 | +make quality |
| 53 | +``` |
| 54 | + |
| 55 | +This command runs the following tools: |
| 56 | + |
| 57 | +* **PHPStan**: Static analysis to find potential bugs. |
| 58 | + ```bash |
| 59 | + make phpstan |
| 60 | + ``` |
| 61 | +* **PHP-CS-Fixer**: Enforces a consistent coding style. |
| 62 | + ```bash |
| 63 | + make php-cs-fixer |
| 64 | + ``` |
| 65 | +* **Rector**: Provides automated refactoring to improve code quality. |
| 66 | + ```bash |
| 67 | + make rector |
| 68 | + ``` |
| 69 | + |
| 70 | +## Development Conventions |
| 71 | + |
| 72 | +### Coding Style |
| 73 | + |
| 74 | +The project follows the official Symfony coding standards, as enforced by the `.php-cs-fixer.dist.php` configuration. It uses the `@Symfony` and `@DoctrineAnnotation` rule sets. All files should include a license header. |
| 75 | + |
| 76 | +### Branching and Commits |
| 77 | + |
| 78 | +While not explicitly defined in the repository, a standard Git flow (e.g., feature branches, pull requests) is expected, as indicated by the presence of a `PULL_REQUEST_TEMPLATE.md`. |
| 79 | + |
| 80 | +### Documentation |
| 81 | + |
| 82 | +The `docs` directory contains user-facing documentation for the bundle and its tasks. When adding a new task, it should be documented in a corresponding `.md` file. |
0 commit comments