Actualizacion commit inicial - configuracion symfony

parent 1ed1d547
/web/bundles/
/app/bootstrap.php.cache
/app/cache/*
/app/config/parameters.yml
/app/logs/*
!app/cache/.gitkeep
!app/logs/.gitkeep
/app/phpunit.xml
/build/
/vendor/
/bin/
/composer.phar
/web/bundles/
/app/bootstrap.php.cache
/app/cache/*
/app/config/parameters.yml
/app/logs/*
!app/cache/.gitkeep
!app/logs/.gitkeep
/app/phpunit.xml
/build/
/vendor/
/bin/
/composer.phar
/nbproject/private/
\ No newline at end of file
......@@ -16,6 +16,7 @@ class AppKernel extends Kernel
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new AppBundle\AppBundle(),
new NutrapharmBundle\NutrapharmBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
......
......@@ -2,6 +2,7 @@ imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: services.yml }
- { resource: "@NutrapharmBundle/Resources/config/services.yml" }
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
......
nutrapharm:
resource: "@NutrapharmBundle/Resources/config/routing.yml"
prefix: /
app:
resource: '@AppBundle/Controller/'
type: annotation
......@@ -5,7 +5,7 @@
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": {
"AppBundle\\": "src/AppBundle"
"": "src/"
},
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
},
......@@ -16,6 +16,9 @@
"php": ">=5.3.9",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/orm": "^2.4.8",
"dompdf/dompdf": "^0.8.3",
"jms/serializer-bundle": "^1.1",
"propel/propel-bundle": "^1.5",
"incenteev/composer-parameter-handler": "~2.0",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "^3.0.2",
......
include.path=${php.global.include.path}
php.version=PHP_70
source.encoding=UTF-8
src.dir=src
tags.asp=false
tags.short=false
web.root=.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>nutrapharm-test</name>
</data>
</configuration>
</project>
<?php
namespace NutrapharmBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
{
public function indexAction()
{
return $this->render('NutrapharmBundle:Default:index.html.twig');
}
}
<?php
namespace NutrapharmBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class NutrapharmBundle extends Bundle
{
}
nutrapharm_homepage:
path: /
defaults: { _controller: NutrapharmBundle:Default:index }
services:
# nutrapharm.example:
# class: NutrapharmBundle\Example
# arguments: ["@service_id", "plain_value", "%parameter%"]
<?php
namespace NutrapharmBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/');
$this->assertContains('Hello World', $client->getResponse()->getContent());
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment