init without trunk

This commit is contained in:
Kevin Adametz 2020-07-09 12:49:32 +02:00
parent ed24ac4994
commit bb809e7233
14652 changed files with 177862 additions and 94817 deletions

View file

@ -0,0 +1,32 @@
<?php
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Tests\Fixtures\FooBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
/**
* @Route(service="test.invokable_class_level.predefined")
* @Template("FooBundle:Invokable:predefined.html.twig")
*/
class InvokableClassLevelController
{
/**
* @Route("/invokable/class-level/service/")
*/
public function __invoke()
{
return array(
'foo' => 'bar',
);
}
}

View file

@ -0,0 +1,61 @@
<?php
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Tests\Fixtures\FooBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class InvokableContainerController extends Controller
{
/**
* @Route("/invokable/variable/container/{variable}/")
* @Template()
*/
public function variableAction($variable)
{
}
/**
* @Route("/invokable/another-variable/container/{variable}/")
* @Template("FooBundle:InvokableContainer:variable.html.twig")
*/
public function anotherVariableAction($variable)
{
return array(
'variable' => $variable,
);
}
/**
* @Route("/invokable/variable/container/{variable}/{another_variable}/")
* @Template("FooBundle:InvokableContainer:another_variable.html.twig")
*/
public function doubleVariableAction($variable, $another_variable)
{
return array(
'variable' => $variable,
'another_variable' => $another_variable,
);
}
/**
* @Route("/invokable/predefined/container/")
* @Template("FooBundle:Invokable:predefined.html.twig")
*/
public function __invoke()
{
return array(
'foo' => 'bar',
);
}
}

View file

@ -0,0 +1,32 @@
<?php
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Tests\Fixtures\FooBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
/**
* @Route(service="test.invokable.predefined")
*/
class InvokableController
{
/**
* @Route("/invokable/predefined/service/")
* @Template("FooBundle:Invokable:predefined.html.twig")
*/
public function __invoke()
{
return array(
'foo' => 'bar',
);
}
}

View file

@ -0,0 +1,54 @@
<?php
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Tests\Fixtures\FooBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
/**
* @Template("FooBundle:Invokable:predefined.html.twig")
*/
class MultipleActionsClassLevelTemplateController extends Controller
{
/**
* @Route("/multi/one-template/1/")
*/
public function firstAction()
{
return array(
'foo' => 'bar',
);
}
/**
* @Route("/multi/one-template/2/")
* @Route("/multi/one-template/3/")
*/
public function secondAction()
{
return array(
'foo' => 'bar',
);
}
/**
* @Route("/multi/one-template/4/")
* @Template("FooBundle::overwritten.html.twig")
*/
public function overwriteAction()
{
return array(
'foo' => 'foo bar baz',
);
}
}

View file

@ -0,0 +1,22 @@
<?php
namespace Tests\Fixtures\FooBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;
/**
* @Route("/optional-arguments")
*/
class OptionalArgumentsController
{
/**
* @Route("/with-default-followed-by-mandatory", defaults={"e" = null})
* @ParamConverter(name="d", class="Tests\Fixtures\FooBundle\Entity\Foo")
*/
public function withDefaultFollowedByMandatory($d = null, $e)
{
return new Response(null === $d ? 'yes' : 'no');
}
}

View file

@ -0,0 +1,66 @@
<?php
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Tests\Fixtures\FooBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpFoundation\Response;
/**
* @Route(service="test.simple.multiple")
*/
class SimpleController
{
/**
* @Route("/simple/multiple/", defaults={"a": "a", "b": "b"})
* @Template()
*/
public function someAction($a, $b, $c = 'c')
{
}
/**
* @Route("/simple/multiple/{a}/{b}/")
* @Template("FooBundle:Simple:some.html.twig")
*/
public function someMoreAction($a, $b, $c = 'c')
{
}
/**
* @Route("/simple/multiple-with-vars/", defaults={"a": "a", "b": "b"})
* @Template(vars={"a", "b"})
*/
public function anotherAction($a, $b, $c = 'c')
{
}
/**
* @Route("/no-listener/")
*/
public function noListenerAction()
{
return new Response('<html><body>I did not get rendered via twig</body></html>');
}
/**
* @Route("/streamed/")
* @Template(isStreamable=true)
*/
public function streamedAction()
{
return array(
'foo' => 'foo',
'bar' => 'bar',
);
}
}