Skip to content

[WIP] Removed deprecated stuff #7227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Mar 23, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,6 @@ public function guessMaxLength($class, $property)
}
}

/**
* {@inheritDoc}
*/
public function guessMinLength($class, $property)
{
trigger_error('guessMinLength() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
}

/**
* {@inheritDoc}
*/
Expand Down
8 changes: 0 additions & 8 deletions src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,6 @@ public function guessMaxLength($class, $property)
}
}

/**
* {@inheritDoc}
*/
public function guessMinLength($class, $property)
{
trigger_error('guessMinLength() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
}

/**
* {@inheritDoc}
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ public function getFunctions()
*/
public function renderFragment($uri, $options = array())
{
$options = $this->handler->fixOptions($options);

$strategy = isset($options['strategy']) ? $options['strategy'] : 'inline';
unset($options['strategy']);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ class Configuration implements ConfigurationInterface
* Generates the configuration tree builder.
*
* @return TreeBuilder The tree builder
*
* @throws \RuntimeException When using the deprecated 'charset' setting
*/
public function getConfigTreeBuilder()
{
Expand All @@ -36,27 +34,11 @@ public function getConfigTreeBuilder()

$rootNode
->children()
->scalarNode('charset')
->defaultNull()
->beforeNormalization()
->ifTrue(function($v) { return null !== $v; })
->then(function($v) {
$message = 'The charset setting is deprecated. Just remove it from your configuration file.';

if ('UTF-8' !== $v) {
$message .= sprintf('You need to define a getCharset() method in your Application Kernel class that returns "%s".', $v);
}

throw new \RuntimeException($message);
})
->end()
->end()
->scalarNode('secret')->end()
->scalarNode('http_method_override')
->info("Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests.")
->defaultTrue()
->end()
->scalarNode('trust_proxy_headers')->defaultFalse()->end() // @deprecated, to be removed in 2.3
->arrayNode('trusted_proxies')
->beforeNormalization()
->ifTrue(function($v) { return !is_array($v) && !is_null($v); })
Expand Down Expand Up @@ -201,16 +183,6 @@ private function addSessionSection(ArrayNodeDefinition $rootNode)
->info('session configuration')
->canBeUnset()
->children()
->booleanNode('auto_start')
->info('DEPRECATED! Session starts on demand')
->defaultFalse()
->beforeNormalization()
->ifTrue(function($v) { return null !== $v; })
->then(function($v) {
throw new \RuntimeException('The auto_start setting is deprecated. Just remove it from your configuration file.');
})
->end()
->end()
->scalarNode('storage_id')->defaultValue('session.storage.native')->end()
->scalarNode('handler_id')->defaultValue('session.handler.native_file')->end()
->scalarNode('name')->end()
Expand All @@ -223,11 +195,6 @@ private function addSessionSection(ArrayNodeDefinition $rootNode)
->scalarNode('gc_probability')->end()
->scalarNode('gc_maxlifetime')->end()
->scalarNode('save_path')->defaultValue('%kernel.cache_dir%/sessions')->end()
->scalarNode('lifetime')->info('DEPRECATED! Please use: cookie_lifetime')->end()
->scalarNode('path')->info('DEPRECATED! Please use: cookie_path')->end()
->scalarNode('domain')->info('DEPRECATED! Please use: cookie_domain')->end()
->booleanNode('secure')->info('DEPRECATED! Please use: cookie_secure')->end()
->booleanNode('httponly')->info('DEPRECATED! Please use: cookie_httponly')->end()
->end()
->end()
->end()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ public function load(array $configs, ContainerBuilder $container)
$container->setParameter('kernel.http_method_override', $config['http_method_override']);

$container->setParameter('kernel.trusted_proxies', $config['trusted_proxies']);

// @deprecated, to be removed in 2.3
$container->setParameter('kernel.trust_proxy_headers', $config['trust_proxy_headers']);

$container->setParameter('kernel.default_locale', $config['default_locale']);

if (!empty($config['test'])) {
Expand Down Expand Up @@ -312,13 +308,6 @@ private function registerSessionConfiguration(array $config, ContainerBuilder $c
}
}

//we deprecated session options without cookie_ prefix, but we are still supporting them,
//Let's merge the ones that were supplied without prefix
foreach (array('lifetime', 'path', 'domain', 'secure', 'httponly') as $key) {
if (!isset($options['cookie_'.$key]) && isset($config[$key])) {
$options['cookie_'.$key] = $config[$key];
}
}
$container->setParameter('session.storage.options', $options);

// session handler (the internal callback registered with PHP session management)
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ public function boot()
{
if ($trustedProxies = $this->container->getParameter('kernel.trusted_proxies')) {
Request::setTrustedProxies($trustedProxies);
} elseif ($this->container->getParameter('kernel.trust_proxy_headers')) {
Request::trustProxyData(); // @deprecated, to be removed in 2.3
}

if ($this->container->getParameter('kernel.http_method_override')) {
Expand Down
83 changes: 0 additions & 83 deletions src/Symfony/Bundle/FrameworkBundle/HttpKernel.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
<xsd:element name="annotations" type="annotations" minOccurs="0" maxOccurs="1" />
</xsd:all>

<!-- charset is deprecated and will be removed in 2.2 -->
<xsd:attribute name="charset" type="xsd:string" />
<xsd:attribute name="http-method-override" type="xsd:boolean" />
<xsd:attribute name="trust-proxy-headers" type="xsd:string" />
<xsd:attribute name="trusted-proxies" type="xsd:string" />
<xsd:attribute name="ide" type="xsd:string" />
<xsd:attribute name="secret" type="xsd:string" />
Expand Down Expand Up @@ -88,14 +85,6 @@
<xsd:attribute name="cookie-domain" type="xsd:string" />
<xsd:attribute name="cookie-secure" type="xsd:boolean" />
<xsd:attribute name="cookie-httponly" type="xsd:boolean" />
<!-- deprecated attributes -->
<xsd:attribute name="lifetime" type="xsd:string" />
<xsd:attribute name="path" type="xsd:string" />
<xsd:attribute name="domain" type="xsd:string" />
<xsd:attribute name="secure" type="xsd:boolean" />
<xsd:attribute name="httponly" type="xsd:boolean" />
<xsd:attribute name="auto-start" type="xsd:boolean" />
<!-- end of deprecated attributes -->
<xsd:attribute name="cache-limiter" type="xsd:string" />
<xsd:attribute name="gc-maxlifetime" type="xsd:string" />
<xsd:attribute name="gc-divisor" type="xsd:string" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<parameters>
<parameter key="event_dispatcher.class">Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher</parameter>
<parameter key="http_kernel.class">Symfony\Bundle\FrameworkBundle\HttpKernel</parameter>
<parameter key="http_kernel.class">Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel</parameter>
<parameter key="filesystem.class">Symfony\Component\Filesystem\Filesystem</parameter>
<parameter key="cache_warmer.class">Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate</parameter>
<parameter key="cache_clearer.class">Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer</parameter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ public function __construct(FragmentHandler $handler)
*/
public function render($uri, array $options = array())
{
$options = $this->handler->fixOptions($options);

$strategy = isset($options['strategy']) ? $options['strategy'] : 'inline';
unset($options['strategy']);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ public function testInvalidValueTrustedProxies()
protected static function getBundleDefaultConfig()
{
return array(
'charset' => null,
'http_method_override' => true,
'trust_proxy_headers' => false,
'trusted_proxies' => array(),
'ide' => null,
'default_locale' => 'en',
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
'default_locale' => 'fr',
'form' => null,
'http_method_override' => false,
'trust_proxy_headers' => true,
'trusted_proxies' => array('127.0.0.1', '10.0.0.1'),
'csrf_protection' => array(
'enabled' => true,
Expand All @@ -23,18 +22,18 @@
'type' => 'xml',
),
'session' => array(
'storage_id' => 'session.storage.native',
'handler_id' => 'session.handler.native_file',
'name' => '_SYMFONY',
'lifetime' => 86400,
'path' => '/',
'domain' => 'example.com',
'secure' => true,
'httponly' => true,
'gc_maxlifetime' => 90000,
'gc_divisor' => 108,
'gc_probability' => 1,
'save_path' => '/path/to/sessions',
'storage_id' => 'session.storage.native',
'handler_id' => 'session.handler.native_file',
'name' => '_SYMFONY',
'cookie_lifetime' => 86400,
'cookie_path' => '/',
'cookie_domain' => 'example.com',
'cookie_secure' => true,
'cookie_httponly' => true,
'gc_maxlifetime' => 90000,
'gc_divisor' => 108,
'gc_probability' => 1,
'save_path' => '/path/to/sessions',
),
'templating' => array(
'assets_version' => 'SomeVersionScheme',
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

<framework:config secret="s3cr3t" ide="file%%link%%format" default-locale="fr" trust-proxy-headers="true" trusted-proxies="127.0.0.1, 10.0.0.1" http-method-override="false">
<framework:config secret="s3cr3t" ide="file%%link%%format" default-locale="fr" trusted-proxies="127.0.0.1, 10.0.0.1" http-method-override="false">
<framework:csrf-protection enabled="true" field-name="_csrf" />
<framework:form />
<framework:esi enabled="true" />
Expand Down
Loading