This course is still being released! Check back later for more chapters.

Get Notified About this Course!

We will send you messages regarding this course only
and nothing else, we promise.
You can unsubscribe anytime by emailing us at:
privacy@symfonycasts.com
> Symfony 7 >

Course Overview

Login to bookmark this course

Desarrollo de bundle de Symfony: Comparte el amor

Go from empty folder to polished Symfony bundle — complete with services, config, testing, CI, and a Flex recipe — and learn how to share your code with the world.

  • advanced
  • 317 students
  • EN/ES Captions
  • EN/ES Script
  • Certificate of Completion

Your Guides

About this course

What PHP libraries does this tutorial use?

// composer.json
{
    "require": {
        "php": ">=8.2",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "doctrine/dbal": "^3.10.0", // 3.10.0
        "doctrine/doctrine-bundle": "^2.15", // 2.15.0
        "doctrine/doctrine-migrations-bundle": "^3.4.2", // 3.4.2
        "doctrine/orm": "^3.5.0", // 3.5.0
        "league/commonmark": "^2.7.1", // 2.7.1
        "symfony/asset": "7.3.*", // v7.3.0
        "symfony/asset-mapper": "7.3.*", // v7.3.0
        "symfony/console": "7.3.*", // v7.3.1
        "symfony/crowdin-translation-provider": "7.3.*", // v7.3.0
        "symfony/dotenv": "7.3.*", // v7.3.0
        "symfony/flex": "^2.8.1", // v2.8.1
        "symfony/framework-bundle": "7.3.*", // v7.3.1
        "symfony/runtime": "7.3.*", // v7.3.1
        "symfony/stimulus-bundle": "^2.28", // v2.28.0
        "symfony/translation": "7.3.*", // v7.3.1
        "symfony/twig-bundle": "7.3.*", // v7.3.1
        "symfony/yaml": "7.3.*", // v7.3.1
        "symfonycasts/object-translation-bundle": "@dev", // dev-_tuts/bundle/3-install-our-bundle
        "symfonycasts/tailwind-bundle": "^0.10.1", // v0.10.1
        "twig/extra-bundle": "^2.12|^3.21", // v3.21.0
        "twig/markdown-extra": "^3.21", // v3.21.0
        "twig/string-extra": "^3.21", // v3.21.0
        "twig/twig": "^2.12|^3.21.1" // v3.21.1
    },
    "require-dev": {
        "phpunit/phpunit": "^9.6.23", // 9.6.23
        "symfony/browser-kit": "7.3.*", // v7.3.0
        "symfony/css-selector": "7.3.*", // v7.3.0
        "symfony/debug-bundle": "7.3.*", // v7.3.0
        "symfony/maker-bundle": "^1.64", // v1.64.0
        "symfony/monolog-bundle": "^3.10", // v3.10.0
        "symfony/phpunit-bridge": "^7.3.1", // v7.3.1
        "symfony/stopwatch": "7.3.*", // v7.3.0
        "symfony/web-profiler-bundle": "7.3.*", // v7.3.1
        "zenstruck/browser": "^1.9.1", // v1.9.1
        "zenstruck/foundry": "^2.6.1" // v2.6.1
    }
}

¿Alguna vez te has preguntado cómo se crean esos bundles de Symfony que instalas con Composer? En este curso, construirás uno desde cero y verás cómo encajan todas las piezas. Desde el primer composer init hasta el cableado de servicios, la adición de entidades y la creación de opciones de configuración, obtendrás un recorrido completo entre bastidores del desarrollo de un bundle.

Aprenderás a:

  • Configurar una estructura moderna de bundles de Symfony 6.1+
  • Diseñar tu código teniendo en cuenta la compatibilidad con versiones anteriores para que tu bundle pueda evolucionar sin interrumpir a los usuarios
  • Conectar servicios, entidades y configuración a la manera del bundle
  • Añadir una extensión Twig
  • Crear comandos de consola
  • Escribir pruebas para mantener la solidez de tu bundle
  • Mantener la coherencia del estilo del código con PHP-CS-Fixer
  • Configurar y ejecutar análisis de código estático con PHPStan
  • Subirlo a GitHub y configurar GitHub Actions para realizar pruebas en diferentes versiones de PHP y Symfony
  • Crear una receta Symfony Flex para que la instalación se sienta como magia

Al final, sabrás cómo empaquetar tu propio código en un bundle pulido y reutilizable, listo para compartir, ya sea con tu equipo, con tu futuro yo, o con toda la comunidad Symfony.

Next courses in the Symfony 7: Go Further section of the Symfony 7 Track!

10 Comments

Sort By
Login or Register to join the conversation
Gigi-P avatar Gigi-P 2 days ago

Just wanted to say I am really enjoying this course so far! Great job and thanks!

| Reply |

Hey Gigi,

Thank you for your feedback! ❤️ We're very happy to hear it :)

Stay tuned for more tutorials ;)

Cheers!

| Reply |

Will there be a section concerning documentation? For example, for the README.md and docs/index.rst files.

| Reply |

Hey @seb-jean!

To add to Victor's comment, the current recommendation is to use md instead of rst. Rst isn't render too well on GitHub. I also like to keeps documentation in the readme until a time the docs get too big. Then I switch to the docs folder.

--Kevin

1 | Reply |

Thank you very much, Kevin!

| Reply |

Hey @seb-jean,

Yes, we will mention the docs in this course. Actually, you may want to add docs to your bundle as soon as you can as it will help your users a lot. On practice, libs/bundles without docs (or with bad/poor docs) people just avoid as it's getting tricky to implement that in their projects. So, definitely add some docs on the early stage when you think your bundle is ready for real user projects. Basically, you want to explain how to install, configure, and use your bundle. You can take as an example your favorite bundle docs. The best would be to stick to Markdown format I think - simple and easy to start, Symfony uses .rst format internally for a reason.

I hope this helps!

Cheers!

1 | Reply |

Thank you very much, Victor!

| Reply |

I was checking in on SymfonyCasts, wondering when you guys and girls would tackle translating database content and wondering why you had not started that...

Then I found this, absolutely genious idea! Now I have to hurry up with the translating course.

Thanks for this!

| Reply |

Hey Odds,

Thanks for your feedback! We're super happy to hear you loved this idea :)

Cheers!

| Reply |

Yes please ;)

| Reply |

Delete comment?

Share this comment

astronaut with balloons in space

"Houston: no signs of life"
Start the conversation!