Skip to content

Symfonize all the things! #154

Open
Open
@aleksip

Description

@aleksip

I'd like to propose refactoring Pattern Lab PHP to use Symfony components and best practices as much as possible.

Pros:

  • Less custom code.
  • Pattern Lab PHP already uses several Symfony components.
  • Code is more approachable by people who know Symfony, making it easier to contribute.
  • Same skills can also be used in other projects like Drupal and Drupal Console. Lots of synergy opportunities!
  • Current static classes cause tight coupling and are bad for unit testing.
  • Dependency injection and decoupling console commands from business logic could make all kinds of interesting things possible...

Cons:

  • ?

Background:

The secret plan I mentioned in #150 was to replace Pattern Lab's console code with Symfony's Console component. My experiments with that have been very positive, but I quickly realized that a full rewrite using dependency injection and separation of concerns would be really nice. Or at least something I'd be very interested in and motivated to do! :)

Implementation plan:

We could add new Symfonized implementations of PL core code, with the old console commands using the old code and the new console commands using the new code. And when the time is right, we'd just leave out all the old code and release PL 3.0.

Tasks:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions