Skip to content

Optimize Service Provider Bindings and Remove Circular Dependencies#1158

Closed
sweep-ai-deprecated[bot] wants to merge 1 commit intomainfrom
sweep/Optimize-Service-Provider-Bindings-and-Remove-Circular-Dependencies
Closed

Optimize Service Provider Bindings and Remove Circular Dependencies#1158
sweep-ai-deprecated[bot] wants to merge 1 commit intomainfrom
sweep/Optimize-Service-Provider-Bindings-and-Remove-Circular-Dependencies

Conversation

@sweep-ai-deprecated
Copy link
Copy Markdown
Contributor

This pull request was created by Sweep to resolve the following request by @curtisdelicata:

@php artisan package:discover --ansi

In Application.php line 1053:

Maximum call stack size of 16728064 bytes (zend.max_allowed_stack_size - ze
nd.reserved_stack_size) reached. Infinite recursion?

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Error: Process completed with exit code 1.

Continue chatting at https://app.sweep.dev/c/c3d45f4e-e8bd-4416-9dd2-f7aa67d60e39.

Purpose

This pull request optimizes the dependency injection bindings in the TeamServiceProvider to prevent potential circular dependencies and improve application performance.

Description

The main change focuses on refactoring the TeamServiceProvider class to use simpler and more direct class bindings instead of callback-based bindings. This modification:

  1. Removes unnecessary callback wrappers that were previously used for dependency resolution
  2. Implements direct class bindings using the class names
  3. Simplifies the binding registration process
  4. Reduces potential memory usage by eliminating closure creation

The change maintains the same functionality while providing a more efficient and cleaner implementation of the service provider bindings.

Summary

  • Refactored TeamServiceProvider class in app/Providers/TeamServiceProvider.php
  • Replaced callback-based bindings with direct class bindings
  • Modified bindings for the following classes:
    • BatchData
    • Family
    • FamilyEvent
    • FamilySlgs
    • Person
    • PersonAsso
    • PersonAlia
    • PersonEvent
    • Addr
    • Chan
    • Subm
  • Improved code maintainability and reduced complexity
  • Eliminated potential circular dependency issues

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