---
title: "Discussion on \"Symfony compiler pass - Strategy pattern: how to write code that is SOLID compatible\" | Hashnode"
description: "Discussion on \"Symfony compiler pass - Strategy pattern: how to write code that is SOLID compatible\". PHP strategy pattern with symfony. SOLID on practice. Open-close php principle. Clean code."
url: "https://hashnode.com/posts/symfony-compiler-pass-strategy-pattern-how-to-write-code-that-is-solid-compatible/65c8f0663af542cd21364570"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Symfony compiler pass - Strategy pattern: how to write code that is SOLID compatible](https://blog.vladverpeta.com/symfony-compiler-pass-strategy-pattern-how-to-write-code-that-is-solid-compatible?utm_source=hashnode&utm_medium=feed)

PHP strategy pattern with symfony. SOLID on practice. Open-close php principle. Clean code.

Feb 11, 2024 · 7 min read · blog.vladverpeta.com  
Read the article

-   [#php](https://hashnode.com/tag/php)
-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#design-patterns](https://hashnode.com/tag/design-patterns)
-   [#strategypattern](https://hashnode.com/tag/strategypattern)
-   [#solid-principles](https://hashnode.com/tag/solid-principles)
-   [#symfony](https://hashnode.com/tag/symfony)

## Written by

[Vlad Verpeta](https://hashnode.com/@vladyslav93)

@vladyslav93 · Ukraine, Kyiv

  
[View profile](https://hashnode.com/@vladyslav93)

PHP FullStack Engineer & manager

## Responses 2

Markdown supported · ⌘↵ to post

[Nacho](https://hashnode.com/@rocket760)

[May 20, 2024](https://hashnode.com/posts/symfony-compiler-pass-strategy-pattern-how-to-write-code-that-is-solid-compatible/65c8f0663af542cd21364570/comment/664b482da2d132682e28f650)

Hey, great! Another option could be using AutoConfigure and TaggedIterator attributes

[Kelly](https://hashnode.com/@kelly11)

[Feb 12, 2024](https://hashnode.com/posts/symfony-compiler-pass-strategy-pattern-how-to-write-code-that-is-solid-compatible/65c8f0663af542cd21364570/comment/65ca7da5f5edaac25a5512f3)

this is an awesome example for everyone who wants to create an elegant code. Kudos to author, thanks for sharing 👏🏻
