docs: add run_instruction.md - #43
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new documentation contains a few verified inaccuracies/non-runnable snippets that should be corrected before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a new developer-facing “Run Instructions” guide to clarify how to install, verify, and test the QueryBuilder PHP library locally and in consuming projects.
Changes:
- Introduces
run_instruction.mdcovering prerequisites, installation, and basic usage examples. - Documents how to run the PHPUnit suite via Composer and via the PHPUnit binary.
- Adds troubleshooting guidance for common setup/test issues.
File summaries
| File | Description |
|---|---|
| run_instruction.md | New end-to-end run/testing instructions and usage snippets for the library |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - **Data Collections**: Query results are returned wrapped in custom fluent `Collection` objects (`Abdulelahragih\QueryBuilder\Data\Collection`) with helper methods (`map`, `filter`, `pluck`, `chunk`, `sorted`, etc.). | ||
| - **Pagination Support**: Provides both length-aware (`LengthAwarePaginator`) and lightweight simple pagination (`SimplePaginator`). | ||
| - **Facades & Helpers**: Includes an instance-based wrapper (`DB`) and a static facade (`DBSingleton`) with automatic transaction management. | ||
| - **Safety First**: Implements safeguards such as forbidding `UPDATE` or `DELETE` operations without a `WHERE` clause unless explicitly configured, throwing `QueryBuilderException`. |
Comment on lines
+136
to
+138
| use Abdulelahragih\QueryBuilder\DBSingleton; | ||
|
|
||
| DBSingleton::init($pdo); |
Comment on lines
+221
to
+223
| ### 2. `QueryBuilderException: UPDATE or DELETE without WHERE clause is not allowed` | ||
| - **Cause**: An `update()` or `delete()` operation was invoked without defining condition clauses. This is an intentional safeguard to prevent accidental data truncation. | ||
| - **Resolution**: Ensure you chain a `.where(...)` condition before calling `update()` or `delete()`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.