init without trunk
This commit is contained in:
parent
ed24ac4994
commit
bb809e7233
14652 changed files with 177862 additions and 94817 deletions
|
|
@ -0,0 +1,18 @@
|
|||
<?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\ActionArgumentsBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class ActionArgumentsBundle extends Bundle
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Fixtures\ActionArgumentsBundle\Controller;
|
||||
|
||||
use Psr\Http\Message\MessageInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* @Route("/nullable-arguments")
|
||||
*/
|
||||
class NullableArgumentsController
|
||||
{
|
||||
/**
|
||||
* @Route("/invoke/")
|
||||
*/
|
||||
public function __invoke(RequestInterface $request, MessageInterface $message, ServerRequestInterface $serverRequest)
|
||||
{
|
||||
return new Response('<html><body>ok</body></html>');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/with-default")
|
||||
*/
|
||||
public function withDefaultAction(string $d = null)
|
||||
{
|
||||
return new Response(null === $d ? 'yes' : 'no');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/without-default")
|
||||
*/
|
||||
public function withoutDefaultAction(string $d)
|
||||
{
|
||||
return new Response(null === $d ? 'yes' : 'no');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/nullable")
|
||||
*/
|
||||
public function nullableAction(?string $d)
|
||||
{
|
||||
return new Response(null === $d ? 'yes' : 'no');
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
);
|
||||
}
|
||||
}
|
||||
32
vendor/sensio/framework-extra-bundle/Tests/Fixtures/FooBundle/Controller/InvokableController.php
vendored
Normal file
32
vendor/sensio/framework-extra-bundle/Tests/Fixtures/FooBundle/Controller/InvokableController.php
vendored
Normal 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',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
66
vendor/sensio/framework-extra-bundle/Tests/Fixtures/FooBundle/Controller/SimpleController.php
vendored
Normal file
66
vendor/sensio/framework-extra-bundle/Tests/Fixtures/FooBundle/Controller/SimpleController.php
vendored
Normal 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',
|
||||
);
|
||||
}
|
||||
}
|
||||
18
vendor/sensio/framework-extra-bundle/Tests/Fixtures/FooBundle/Entity/Foo.php
vendored
Normal file
18
vendor/sensio/framework-extra-bundle/Tests/Fixtures/FooBundle/Entity/Foo.php
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Fixtures\FooBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping;
|
||||
|
||||
/**
|
||||
* @Mapping\Entity
|
||||
*/
|
||||
class Foo
|
||||
{
|
||||
/**
|
||||
* @Mapping\Column(type="integer")
|
||||
* @Mapping\Id
|
||||
* @Mapping\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
}
|
||||
18
vendor/sensio/framework-extra-bundle/Tests/Fixtures/FooBundle/FooBundle.php
vendored
Normal file
18
vendor/sensio/framework-extra-bundle/Tests/Fixtures/FooBundle/FooBundle.php
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?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;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class FooBundle extends Bundle
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<html><body>{{ foo }}</body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<html><body>{{ variable }},{{ another_variable }}</body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<html><body>{{ variable }}</body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<html><body>{{ a }}, {{ b }}</body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<html><body>{{ a }}, {{ b }}, {{ c }}</body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<html><body>{{ foo }}, {{ bar }}</body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<html><body>{{ foo }}</body></html>
|
||||
49
vendor/sensio/framework-extra-bundle/Tests/Fixtures/TestKernel.php
vendored
Normal file
49
vendor/sensio/framework-extra-bundle/Tests/Fixtures/TestKernel.php
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?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;
|
||||
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
/**
|
||||
* Used for functional tests.
|
||||
*/
|
||||
class TestKernel extends Kernel
|
||||
{
|
||||
public function registerBundles()
|
||||
{
|
||||
return array(
|
||||
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new \Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
|
||||
new \Symfony\Bundle\TwigBundle\TwigBundle(),
|
||||
new \Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||
new \Tests\Fixtures\FooBundle\FooBundle(),
|
||||
new \Tests\Fixtures\ActionArgumentsBundle\ActionArgumentsBundle(),
|
||||
);
|
||||
}
|
||||
|
||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||
{
|
||||
$loader->load(__DIR__.'/config/config.yml');
|
||||
|
||||
if (PHP_VERSION_ID >= 70100) {
|
||||
$loader->load(__DIR__.'/config/nullable_type/config.yml');
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDir()
|
||||
{
|
||||
return $this->rootDir.'/cache/'.$this->environment;
|
||||
}
|
||||
}
|
||||
|
||||
class_alias('Tests\Fixtures\TestKernel', 'TestKernel');
|
||||
24
vendor/sensio/framework-extra-bundle/Tests/Fixtures/config/config.yml
vendored
Normal file
24
vendor/sensio/framework-extra-bundle/Tests/Fixtures/config/config.yml
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
framework:
|
||||
test: true
|
||||
secret: test
|
||||
templating:
|
||||
engine: [twig, php]
|
||||
router:
|
||||
resource: "%kernel.root_dir%/config/routing.yml"
|
||||
doctrine:
|
||||
dbal:
|
||||
driver: pdo_sqlite
|
||||
path: "%kernel.root_dir%/data/db.sqlite"
|
||||
|
||||
orm:
|
||||
auto_mapping: true
|
||||
|
||||
services:
|
||||
test.invokable.predefined:
|
||||
class: Tests\Fixtures\FooBundle\Controller\InvokableController
|
||||
|
||||
test.invokable_class_level.predefined:
|
||||
class: Tests\Fixtures\FooBundle\Controller\InvokableClassLevelController
|
||||
|
||||
test.simple.multiple:
|
||||
class: Tests\Fixtures\FooBundle\Controller\SimpleController
|
||||
3
vendor/sensio/framework-extra-bundle/Tests/Fixtures/config/nullable_type/config.yml
vendored
Normal file
3
vendor/sensio/framework-extra-bundle/Tests/Fixtures/config/nullable_type/config.yml
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
framework:
|
||||
router:
|
||||
resource: '%kernel.root_dir%/config/nullable_type/routing.yml'
|
||||
7
vendor/sensio/framework-extra-bundle/Tests/Fixtures/config/nullable_type/routing.yml
vendored
Normal file
7
vendor/sensio/framework-extra-bundle/Tests/Fixtures/config/nullable_type/routing.yml
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
foo_bundle:
|
||||
resource: "@FooBundle/Controller"
|
||||
type: annotation
|
||||
|
||||
action_arguments_bundle:
|
||||
resource: "@ActionArgumentsBundle/Controller"
|
||||
type: annotation
|
||||
3
vendor/sensio/framework-extra-bundle/Tests/Fixtures/config/routing.yml
vendored
Normal file
3
vendor/sensio/framework-extra-bundle/Tests/Fixtures/config/routing.yml
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
foo_bundle:
|
||||
resource: "@FooBundle/Controller"
|
||||
type: annotation
|
||||
Loading…
Add table
Add a link
Reference in a new issue