skilla/base-development-bundle

Symfony开发与测试新bundle的骨架。Esqueleto de bundle para desarrollar y testear nuevos bundles para symfony

安装: 22

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:symfony-bundle

1.0.8 2016-11-27 10:17 UTC

This package is auto-updated.

Last update: 2024-08-29 04:58:33 UTC


README

Symfony开发与测试新bundle的骨架

[状态]

Latest Stable Version Build Status Total Downloads Latest Unstable Version License composer.lock codecov

[英文]

如果您计划为Symfony 2或3创建bundle,这可以是一个良好的开始方式。

此仓库为您提供了开始编程的基本结构,无需在项目中包含您的bundle并从那里进行测试。

一旦克隆,只需运行一个脚本,该脚本将更新命名空间、类名和配置文件,以适应您的"用户/bundle"。

按照5个步骤使用

  • 克隆此仓库
  • 运行changeBundleName.php脚本以将bundle适应其"用户/bundle名称"
  • 在src/文件夹中初始化我们的git仓库
  • 将bundle上传到您的仓库
  • 开始编程您的项目

[西班牙语]

Si planeas crear un bundle para symfony 2 o 3, esta puede ser una buena manera de empezar.

Este repositorio le provee de la estructura básica para empezar a programar sin la necesidad de incluir su bundle en un proyecto y testearlo desde ahí.

Una vez clonado solo hay que ejecutar un script que actualizará los namespaces, los nombres de las clases y los ficheros de configuración para adaptarlos a su "user/bundle".

Como usarlo en 5 pasos

  • Clonar este repositorio
  • Ejecutar el script changeBundleName.php para adaptár el bundle a su "usuario/nombre del bundle"
  • Inicialice su repositorio git en la carpeta src/
  • Subir el bundle a su repositorio
  • Iniciar la programación de su proyecto

[示例 | 例子]

skilla@caribdis $ git clone https://github.com/skilla/BaseDevelopmentBundle.git MyNewBundle

Cloning into 'MyNewBundle'...
remote: Counting objects: 123, done.
remote: Compressing objects: 100% (69/69), done.
remote: Total 123 (delta 32), reused 0 (delta 0), pack-reused 53
Receiving objects: 100% (123/123), 33.07 KiB | 0 bytes/s, done.
Resolving deltas: 100% (49/49), done.
Checking connectivity... done.

skilla@caribdis $ cd MyNewBundle
skilla@caribdis MyNewBundle$ php changeBundleName.php User/TestBundle

Checking number of arguments ... OK
Checking bundle name ... OK
Replacing app config values ... OK
Replacing appKernel values ... OK
Replacing DependencyInjection/Configuration values ... OK
Replacing DependencyInjection/Extension values ... OK
Renaming DependencyInjection/Extension ... OK
Replacing Bundle values ... OK
Renaming bundle ... OK
Replacing composer values ... OK
Updating composer ... ... Removing vendors ... OK
Removing composer.lock ... OK
Installing vendors ...
Loading composer repositories with package information
Updating dependencies (including require-dev)
Installing symfony/polyfill-mbstring (v1.2.0)
Loading from cache

Installing symfony/translation (v3.1.6)
Loading from cache

Installing symfony/templating (v3.1.6)
Loading from cache

Installing symfony/stopwatch (v3.1.6)
Loading from cache

Installing symfony/polyfill-util (v1.2.0)
Loading from cache

. . .
. . .

Installing phpunit/phpunit (5.6.2)
Loading from cache

Installing incenteev/composer-parameter-handler (v2.1.2)
Loading from cache

symfony/security-core suggests installing symfony/expression-language (For using the expression voter)
symfony/security-core suggests installing symfony/ldap (For using LDAP integration)
symfony/security-core suggests installing symfony/validator (For using the user password constraint)
paragonie/random_compat 建议安装 ext-libsodium(提供现代加密API,可用于生成随机字节。)
symfony/routing 建议安装 symfony/expression-language(用于使用表达式匹配)
symfony/http-kernel 建议安装 symfony/browser-kit()
symfony/http-kernel 建议安装 symfony/var-dumper()
symfony/dependency-injection 建议安装 symfony/expression-language(用于在服务容器配置中使用表达式)
symfony/dependency-injection 建议安装 symfony/proxy-manager-bridge(生成服务代理以延迟加载它们)
symfony/class-loader 建议安装 symfony/polyfill-apcu(用于在HHVM上使用 ApcClassLoader)
symfony/cache 建议安装 symfony/polyfill-apcu(用于在HHVM上使用 ApcuAdapter)
symfony/framework-bundle 建议安装 ext-apcu(用于系统缓存的最佳性能)
symfony/framework-bundle 建议安装 symfony/form(用于使用表单)
symfony/framework-bundle 建议安装 symfony/process(用于使用 server:run、server:start、server:stop 和 server:status 命令)
symfony/framework-bundle 建议安装 symfony/property-info(用于使用 property_info 服务)
symfony/framework-bundle 建议安装 symfony/serializer(用于使用序列化服务)
symfony/framework-bundle 建议安装 symfony/validator(用于使用验证)
symfony/console 建议安装 symfony/process()
sebastian/global-state 建议安装 ext-uopz (*)
phpunit/phpunit 建议安装 phpunit/php-invoker (~1.1)
写入锁文件
生成自动加载文件

Incenteev\ParameterHandler\ScriptHandler::buildParameters
创建 "app/config/parameters.yml" 文件
缺少一些参数。请提供它们。
secret ('这是 symfony/framework 的内核密钥。')
OK

执行 app/console

Symfony 版本 3.1.6 - app/dev/debug

用法
command [options] [arguments]

选项
-h, --help 显示此帮助信息
-q, --quiet 不输出任何信息
-V, --version 显示此应用程序版本
--ansi 强制 ANSI 输出
--no-ansi 禁用 ANSI 输出
-n, --no-interaction 不询问任何交互性问题
-e, --env=ENV 环境名称。[默认: "dev"]
--no-debug 禁用调试模式。
-v|vv|vvv, --verbose 增加消息的详细程度:1 为正常输出,2 为更详细的输出,3 为调试

可用命令
help 显示命令的帮助
list 列出命令
assets
assets:install 在公共Web目录下安装组件Web资产
cache
cache:clear 清除缓存
cache:warmup 为空缓存预热
config
config:dump-reference 为扩展导出默认配置
debug
debug:config 为扩展导出当前配置
debug:container 显示应用程序当前的服务
debug:event-dispatcher 显示应用程序配置的监听器
debug:translation 显示翻译消息信息
lint
lint:yaml 检查文件并输出遇到的错误
translation
translation:update 更新翻译文件
删除原始 .git 目录 ... OK

记住在 composer.json 中更改作者名称和电子邮件

祝我们的新组件好运

skilla@caribdis MyNewBundle$ cd src
skilla@caribdis src$ git init

在 .../MyNewBundle/src/.git/ 中初始化空的 Git 仓库

skilla@caribdis src$ echo "# MyNewBundle" >> README.md
skilla@caribdis src$ git add .
skilla@caribdis src$ git commit -m "first commit"

[master (root-commit) ce3f704] 第一次提交
xxx 文件已更改,xxxx 插入(+)
创建模式 100644 README.md
. . .
. . .

skilla@caribdis src$ git remote add origin https://github.com/skilla/MyNewBundle.git
skilla@caribdis src$ git push -u origin master

计算对象:3,完成。
写入对象:100% (3/3),235 字节 | 0 字节/s,完成。
总计 3 (delta 0),重用 0 (delta 0)
https://github.com/skilla/MyNewBundle.git
[新分支] master -> master
分支 master 已设置为跟踪远程分支 origin/master。