danielm/symfony-demo-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

danielm/symfony-demo-bundle

最新稳定版本:0.1.3

Composer 安装命令:

composer require danielm/symfony-demo-bundle

包简介

An Skeleton/Demo bundle

README 文档

README

Build Status Build Status Build Status

See my blog post about this:

https://danielmg.org/php/2023/02/extending-symfony-bundle-flex-recipes-and-private-repositories.html

About

This project is part of my Post series about how to build a Symfony Flex Recipes repository (private or not).

This bundle is a demo that shows a couple of things yo can do on a Symfony bundle, such as:

Includes

  • Console Command: bin/console demo:command
  • DemoServiceInterface & DemoService: Example of some kind of Contract/Adapter-like patter of a service
  • Events: Custom event UnnecessaryEvent and simple EventSubscriber DemoSubscriber
  • DemoTwigExtension: Adds a twig function demoFcn()
  • Controller:
    • Route /{a}/{b} -> Simple endpoint that returns a Json response with some values and adds a + b
    • Route /view -> Simple endpoint that renders a Twig template and returns HTML
    • Route /dispatch/{md5_hash} -> Simple endpoint to test dispatching our UnnecessaryEvent
  • Configuration
    • Using Bundle config parameters
    • Using Custom Env variables DEMO_SAMPLE_ENV
  • Usage of Translations and public assets.

Install

Using Symfony Recipe

composer require danielm/symfony-demo-bundle

Manually

Same composer command as using the Recipe, you will also need to create/edit some files manually (that's what a Symfony recipe does for you)

...

Composer scripts

Coding Standards (follows symfony's default rules)

# Displays errors
composer run cs:check
# Makes changes
composer run cs:fix

Testing

composer run test

PHP code analysis

composer run stan

Todo

  • Validators examples
  • Serialization examples
  • Test Event & dispatcher

统计信息

  • 总下载量: 25
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-18