diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..aaeb057 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,15 @@ +pipeline: + composer-install: + image: fpfis/php56-build + commands: + - composer install + + test: + image: fpfis/php56-build + commands: + - php -l index.php + + run-code: + image: fpfis/php56-build + commands: + - php index.php diff --git a/composer.json b/composer.json index e7ac977..00e7dd8 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { "require": { - "symfony/yaml" : "*", + "symfony/yaml" : "*" } } diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..5dfec5b --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,18 @@ +version: '2' +services: + + # Define a PHP webserver + php-webserver: + # Use a PHP image with apache + image: fpfis/php56-dev + # Define settings + environment: + - XDEBUG=true + - DOCUMENT_ROOT=/var/www/html/ + # Mount a local volume in the container + volumes: + - ./:/var/www/html/ + # Share the container port with the host + ports: + - 8080:8080 + diff --git a/index.php b/index.php index 03efc33..3c60641 100644 --- a/index.php +++ b/index.php @@ -4,10 +4,9 @@ use Symfony\Component\Yaml\Yaml; - $array = array( 'foo' => 'bar', - 'bar' => array('foo' => 'bar', 'bar' => 'baz' => 'test'), + 'bar' => array('foo' => 'bar', 'bar' => 'baz'), ); - -echo Yaml::dump($array); +echo Yaml:: +dump($array);