chrisdahl/star-wars-names-bundle
Composer 安装命令:
composer require chrisdahl/star-wars-names-bundle
包简介
Generates random Star Wars names
README 文档
README
Download and install the below listed programs/tools/scripts
- PHP 7.0.x
- Symfony 3.1
- PHPUnit 5.6
- Console Support for Symfony
- Module php-xml for PHP (Example:
sudo apt-get install php-xml) - Optional: Docker 1.12.2 - if installation via Docker is prefered
Symfony Bundle Installation
Step 1a: Install the bundle via composer
composer require chrisdahl/star-wars-names-bundle
Step 1b: Install the project using Docker
Build the attached Dockerfile for an image containing everything
docker build Dockerfile
Run the image with interactive terminal and continue with the next step (
vimis pre-installed)docker run -it
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Chrisdahl\StarWarsNamesBundle\ChrisdahlStarWarsNamesBundle(),
);
// ...
}
// ...
}
Run
Open a console and change to your Symfony project root directory and then execute one of the following commands:
Get all the names:
php bin/console starwarsnames:all
Get a random name:
php bin/console starwarsnames:random
Get three random names:
php bin/console starwarsnames:random 3
Testing
phpunit vendor/chrisdahl/star-wars-names-bundle/Tests/
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-10-16