Skip to content

Commit 930490c

Browse files
committed
separate starter kit from kernel module. include symfony 2.5.0 starter kit.
1 parent 217662f commit 930490c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+235
-864
lines changed

STARTERKIT/.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/web/bundles/
2+
/app/bootstrap.php.cache
3+
/app/cache/*
4+
/app/config/parameters.yml
5+
/app/logs/*
6+
!app/cache/.gitkeep
7+
!app/logs/.gitkeep
8+
/build/
9+
/vendor/
10+
/bin/
11+
/composer.phar

STARTERKIT/.travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: php
2+
3+
php:
4+
- 5.3.3
5+
- 5.3
6+
- 5.4
7+
- 5.5
8+
- 5.6
9+
10+
before_script: composer install -n
11+
12+
script: phpunit -c app

STARTERKIT/LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2004-2013 Fabien Potencier
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.
File renamed without changes.

app/AppCache.php STARTERKIT/app/AppCache.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once __DIR__ . '/AppKernel.php';
3+
require_once __DIR__.'/AppKernel.php';
44

55
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
66

app/AppKernel.php STARTERKIT/app/AppKernel.php

+1-18
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,8 @@
33
use Symfony\Component\HttpKernel\Kernel;
44
use Symfony\Component\Config\Loader\LoaderInterface;
55

6-
/**
7-
* Class AppKernel
8-
*/
96
class AppKernel extends DrupalEmbeddedKernel
107
{
11-
/**
12-
* Returns an array of bundles to register.
13-
*
14-
* @return Symfony\Component\HttpKernel\Bundle\BundleInterface[] An array of bundle instances.
15-
*
16-
* @api
17-
*/
188
public function registerBundles()
199
{
2010
$bundles = array(
@@ -29,21 +19,14 @@ public function registerBundles()
2919
);
3020

3121
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
32-
$bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
22+
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
3323
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
3424
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
3525
}
3626

3727
return $bundles;
3828
}
3929

40-
/**
41-
* Loads the container configuration.
42-
*
43-
* @param LoaderInterface $loader A LoaderInterface instance
44-
*
45-
* @api
46-
*/
4730
public function registerContainerConfiguration(LoaderInterface $loader)
4831
{
4932
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>{% block title %}Welcome!{% endblock %}</title>
6+
{% block stylesheets %}{% endblock %}
7+
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
8+
</head>
9+
<body>
10+
{% block body %}{% endblock %}
11+
{% block javascripts %}{% endblock %}
12+
</body>
13+
</html>

app/SymfonyRequirements.php STARTERKIT/app/SymfonyRequirements.php

+13-1
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,8 @@ class_exists('Locale'),
648648
||
649649
(extension_loaded('apc') && ini_get('apc.enabled'))
650650
||
651+
(extension_loaded('Zend Optimizer+') && ini_get('zend_optimizerplus.enable'))
652+
||
651653
(extension_loaded('Zend OPcache') && ini_get('opcache.enable'))
652654
||
653655
(extension_loaded('xcache') && ini_get('xcache.cacher'))
@@ -661,6 +663,16 @@ class_exists('Locale'),
661663
'Install and enable a <strong>PHP accelerator</strong> like APC (highly recommended).'
662664
);
663665

666+
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
667+
$this->addPhpIniRecommendation(
668+
'realpath_cache_size',
669+
create_function('$cfgValue', 'return (int) $cfgValue > 1000;'),
670+
false,
671+
'realpath_cache_size should be above 1024 in php.ini',
672+
'Set "<strong>realpath_cache_size</strong>" to e.g. "<strong>1024</strong>" in php.ini<a href="#phpini">*</a> to improve performance on windows.'
673+
);
674+
}
675+
664676
$this->addPhpIniRecommendation('short_open_tag', false);
665677

666678
$this->addPhpIniRecommendation('magic_quotes_gpc', false, true);
@@ -678,7 +690,7 @@ class_exists('PDO'),
678690
if (class_exists('PDO')) {
679691
$drivers = PDO::getAvailableDrivers();
680692
$this->addRecommendation(
681-
count($drivers),
693+
count($drivers) > 0,
682694
sprintf('PDO should have some drivers installed (currently available: %s)', count($drivers) ? implode(', ', $drivers) : 'none'),
683695
'Install <strong>PDO drivers</strong> (mandatory for Doctrine).'
684696
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace SymfonyStandard;
13+
14+
use Composer\Script\CommandEvent;
15+
16+
class Composer
17+
{
18+
public static function hookRootPackageInstall(CommandEvent $event)
19+
{
20+
$event->getComposer()->getEventDispatcher()->addSubscriber(new RootPackageInstallSubscriber());
21+
}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace SymfonyStandard;
13+
14+
use Composer\EventDispatcher\EventSubscriberInterface;
15+
use Composer\Script\ScriptEvents;
16+
use Composer\Script\CommandEvent;
17+
use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler;
18+
19+
class RootPackageInstallSubscriber implements EventSubscriberInterface
20+
{
21+
public static function installAcmeDemoBundle(CommandEvent $event)
22+
{
23+
ScriptHandler::installAcmeDemoBundle($event);
24+
}
25+
26+
public static function setupNewDirectoryStructure(CommandEvent $event)
27+
{
28+
ScriptHandler::defineDirectoryStructure($event);
29+
}
30+
31+
public static function getSubscribedEvents()
32+
{
33+
return array(
34+
ScriptEvents::POST_INSTALL_CMD => array(
35+
array('setupNewDirectoryStructure', 512),
36+
array('installAcmeDemoBundle', 0)
37+
),
38+
);
39+
}
40+
}
File renamed without changes.
File renamed without changes.

app/check.php STARTERKIT/app/check.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require_once dirname(__FILE__) . '/SymfonyRequirements.php';
3+
require_once dirname(__FILE__).'/SymfonyRequirements.php';
44

55
$symfonyRequirements = new SymfonyRequirements();
66

app/config/config.yml STARTERKIT/app/config/config.yml

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ framework:
1919
trusted_hosts: ~
2020
trusted_proxies: ~
2121
session:
22-
storage_id: session.storage.php_bridge
2322
# handler_id set to null will use default session handler from php.ini
2423
handler_id: ~
2524
fragments: ~

app/config/config_dev.yml STARTERKIT/app/config/config_dev.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ framework:
77
strict_requirements: true
88
profiler: { only_exceptions: false }
99

10+
web_profiler:
11+
toolbar: %debug_toolbar%
12+
intercept_redirects: %debug_redirects%
13+
1014
monolog:
1115
handlers:
1216
main:
@@ -26,7 +30,7 @@ monolog:
2630
# level: info
2731

2832
assetic:
29-
use_controller: false
33+
use_controller: %use_assetic_controller%
3034

3135
#swiftmailer:
3236
# delivery_address: [email protected]
File renamed without changes.
File renamed without changes.

app/config/parameters.yml.dist STARTERKIT/app/config/parameters.yml.dist

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ parameters:
1313

1414
locale: en
1515
secret: ThisTokenIsNotSoSecretChangeIt
16+
17+
debug_toolbar: true
18+
debug_redirects: false
19+
use_assetic_controller: true

STARTERKIT/app/config/routing.yml

Whitespace-only changes.

STARTERKIT/app/config/routing_dev.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
_wdt:
2+
resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
3+
prefix: /_wdt
4+
5+
_profiler:
6+
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
7+
prefix: /_profiler
8+
9+
_configurator:
10+
resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml"
11+
prefix: /_configurator
12+
13+
_main:
14+
resource: routing.yml

STARTERKIT/app/config/security.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
security:
2+
providers:
3+
in_memory:
4+
memory: ~
5+
6+
firewalls:
7+
dev:
8+
pattern: ^/(_(profiler|wdt)|css|images|js)/
9+
security: false
10+
11+
default:
12+
anonymous: ~

app/console STARTERKIT/app/console

File renamed without changes.

STARTERKIT/app/logs/.gitkeep

Whitespace-only changes.
File renamed without changes.

STARTERKIT/composer.json

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"name": "symfony/framework-standard-edition",
3+
"license": "MIT",
4+
"type": "project",
5+
"description": "The \"Symfony Standard Edition\" distribution",
6+
"autoload": {
7+
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
8+
},
9+
"require": {
10+
"php": ">=5.3.3",
11+
"symfony/symfony": "2.5.*",
12+
"doctrine/orm": "~2.2,>=2.2.3",
13+
"doctrine/doctrine-bundle": "~1.2",
14+
"twig/extensions": "~1.0",
15+
"symfony/assetic-bundle": "~2.3",
16+
"symfony/swiftmailer-bundle": "~2.3",
17+
"symfony/monolog-bundle": "~2.4",
18+
"sensio/distribution-bundle": "~3.0",
19+
"sensio/framework-extra-bundle": "~3.0",
20+
"incenteev/composer-parameter-handler": "~2.0"
21+
},
22+
"require-dev": {
23+
"sensio/generator-bundle": "~2.3"
24+
},
25+
"scripts": {
26+
"post-root-package-install": [
27+
"SymfonyStandard\\Composer::hookRootPackageInstall"
28+
],
29+
"post-install-cmd": [
30+
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
31+
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
32+
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
33+
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
34+
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
35+
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
36+
],
37+
"post-update-cmd": [
38+
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
39+
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
40+
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
41+
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
42+
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
43+
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
44+
]
45+
},
46+
"config": {
47+
"bin-dir": "bin"
48+
},
49+
"extra": {
50+
"symfony-app-dir": "app",
51+
"symfony-web-dir": "web",
52+
"incenteev-parameters": {
53+
"file": "app/config/parameters.yml"
54+
},
55+
"branch-alias": {
56+
"dev-master": "2.5-dev"
57+
}
58+
}
59+
}
File renamed without changes.

app/Resources/views/base.html.twig

-13
This file was deleted.

app/config/routing_dev.yml

-10
This file was deleted.

0 commit comments

Comments
 (0)