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

Main < Development #65

Merged
merged 5 commits into from
Oct 9, 2024
Merged

Main < Development #65

merged 5 commits into from
Oct 9, 2024

Conversation

aristotelesbr
Copy link
Owner

Description

This pull request introduces new functionality and tests related to the mounting of controllers and the execution of hooks and plugins within the application. The key features and changes include:

Features Added:

Controller Mounting:
Implemented a method to mount controllers, allowing them to be added to the application dynamically.
The mount method logs the mounting action for better traceability.

Hook and Route Merging:
Enhanced the logic to merge routes and hooks from mounted controllers.
Ensures that both before and after hooks, as well as global hooks, are correctly integrated.

Tests Added:
Hook Execution Tests:
Added tests to verify that before and after hooks are executed as expected when routes are accessed.

Plugin Execution Tests:

Added tests to ensure that plugin methods are executed correctly when their routes are accessed.
These changes aim to improve the modularity and extensibility of the application by allowing dynamic controller mounting and ensuring that all associated hooks and plugins are properly executed.

Guides update
Update getting-started guides with examples to use

- Added `test_merge` to verify merging of identical routes.
- Added `test_merge_variables_in_different_routes` to test merging with variable routes.
- Added `test_mount_hooks_must_be_executed` to verify execution of before and after hooks.
- Added `test_mount_routes_with_plugins_must_be_executed` to ensure plugin methods are executed correctly
- Added `_applications` method to store mounted controllers.
- Implemented `mount` method to add controllers to the applications list and log the mounting action.
- Enhanced merging logic to include routes and hooks from mounted controllers
@aristotelesbr aristotelesbr added documentation Improvements or additions to documentation good first issue Good for newcomers labels Oct 9, 2024
@aristotelesbr aristotelesbr self-assigned this Oct 9, 2024
@aristotelesbr aristotelesbr merged commit ad72326 into main Oct 9, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant