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

Allow Provider Sources to choose a custom superclass #275

Merged
merged 2 commits into from
Aug 6, 2024

Commits on Aug 1, 2024

  1. Allow Provider Sources to choose a custom superclass

    Relates to hanami/hanami#1417
    
    The motivation for this is to allow consuming frameworks of dry-system
    to define their own superclass for providers, in order to add their own
    method apis to the class.
    
    The is only used for user-defined providers with a block implementation.
    
    External providers in a group do not allow this, because their
    superclass is defined ahead of time when they are added to the source
    registry. If an external provider source wants to use a different
    superclass, they can define a concrete class of their own instead.
    
    The custom superclass is assumed to be a child of
    Dry::System::Provider::Source.
    
    In addition to `provider_source_class`, ProviderRegistrar contains
    `provider_source_options` as an extension point for subclasses to send
    custom intialization params to the source class.
    alassek committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    a8caa31 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1cc03d9 View commit details
    Browse the repository at this point in the history