PHP code example of fei / phing-service

1. Go to this page and download the library: Download fei/phing-service library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fei / phing-service example snippets



return [
    new EntityManager('branding', [
        'entities.locations' => ['app/features/Branding/src/Entity'],
        'driver'             => 'pdo_mysql',
        'host'               => 'branding_db',
        'port'               => 3306,
        'user'               => 'branding',
        'password'           => 'branding',
        'dbname'             => 'branding',
        'charset'            => 'UTF8',
        'mapping_types'      => []
    ])
];


return [
    new EntityManager('branding', [
        'entities.locations' => ['app/features/Branding/src/Entity'],
        'driver'             => '@doctrine.driver@',
        'host'               => '@doctrine.host@',
        'port'               => 3306,
        'user'               => '@doctrine.user@',
        'password'           => '@doctrine.password@',
        'dbname'             => '@doctrine.dbname@',
        'charset'            => 'UTF8',
        'mapping_types'      => []
    ])
];


if (file_exists(__DIR__ . '/../c3.php')) {
    
ini
[NAME OF CONFIG FILE].[YOUR OWN KEY]

actor: ApiTester
modules:
    enabled:
        - \Helper\Api
        - REST:
            url: http://[containerPHPName]
            depends: PhpBrowser
        - Filesystem
        - Db
    config:
        Db:
            dsn: 'mysql:host=[containerDBName];dbname=branding'
            user: 'root'
            password: ''
            cleanup: true
            reconnect: true
            populator: "vendor/bin/phing 'create-database'"
            populate: true
gherkin:
    contexts:
        default:
            - WebGuy
            - ApiTester
coverage:
    enabled: false

actor: ApiTester
modules:
    enabled:
        - \Helper\Api
        - REST:
            url: http://qaPattern
            depends: PhpBrowser
        - Filesystem
        - Db
    config:
        Db:
            dsn: 'mysql:host=qaDatabase;dbname=branding'
            user: 'root'
            password: ''
            cleanup: true
            reconnect: true
            populator: "vendor/bin/phing -f phing.xml -propertyfile settings_local.ini 'create-database'"
            populate: true
gherkin:
    contexts:
        default:
            - WebGuy
            - ApiTester
coverage:
    enabled: false