Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove all "before 1.0" exceptions and services.

  • Loading branch information...
commit 8e8b96ecf23f139931ffed969f8e296fca85d40e 1 parent ca7e2dc
@henrikbjorn henrikbjorn authored
View
4 src/Silex/Application.php
@@ -66,10 +66,6 @@ public function __construct(array $values = array())
$this['logger'] = null;
- $this['autoloader'] = function () {
- throw new \RuntimeException('You tried to access the autoloader service. The autoloader has been removed from Silex. It is recommended that you use Composer to manage your dependencies and handle your autoloading. See http://getcomposer.org for more information.');
- };
-
$this['routes'] = $this->share(function () {
return new RouteCollection();
});
View
9 src/Silex/Provider/DoctrineServiceProvider.php
@@ -122,14 +122,5 @@ public function register(Application $app)
public function boot(Application $app)
{
- // BC: to be removed before 1.0
- if (isset($app['db.dbal.class_path'])) {
- throw new \RuntimeException('You have provided the db.dbal.class_path parameter. The autoloader has been removed from Silex. It is recommended that you use Composer to manage your dependencies and handle your autoloading. If you are already using Composer, you can remove the parameter. See http://getcomposer.org for more information.');
- }
-
- // BC: to be removed before 1.0
- if (isset($app['db.common.class_path'])) {
- throw new \RuntimeException('You have provided the db.common.class_path parameter. The autoloader has been removed from Silex. It is recommended that you use Composer to manage your dependencies and handle your autoloading. If you are already using Composer, you can remove the parameter. See http://getcomposer.org for more information.');
- }
}
}
View
4 src/Silex/Provider/FormServiceProvider.php
@@ -82,9 +82,5 @@ public function register(Application $app)
public function boot(Application $app)
{
- // BC: to be removed before 1.0
- if (isset($app['form.class_path'])) {
- throw new \RuntimeException('You have provided the form.class_path parameter. The autoloader has been removed from Silex. It is recommended that you use Composer to manage your dependencies and handle your autoloading. If you are already using Composer, you can remove the parameter. See http://getcomposer.org for more information.');
- }
}
}
View
5 src/Silex/Provider/MonologServiceProvider.php
@@ -66,11 +66,6 @@ public function register(Application $app)
public function boot(Application $app)
{
- // BC: to be removed before 1.0
- if (isset($app['monolog.class_path'])) {
- throw new \RuntimeException('You have provided the monolog.class_path parameter. The autoloader has been removed from Silex. It is recommended that you use Composer to manage your dependencies and handle your autoloading. If you are already using Composer, you can remove the parameter. See http://getcomposer.org for more information.');
- }
-
$app->before(function (Request $request) use ($app) {
$app['monolog']->addInfo('> '.$request->getMethod().' '.$request->getRequestUri());
});
View
5 src/Silex/Provider/SwiftmailerServiceProvider.php
@@ -86,11 +86,6 @@ public function register(Application $app)
public function boot(Application $app)
{
- // BC: to be removed before 1.0
- if (isset($app['swiftmailer.class_path'])) {
- throw new \RuntimeException('You have provided the swiftmailer.class_path parameter. The autoloader has been removed from Silex. It is recommended that you use Composer to manage your dependencies and handle your autoloading. If you are already using Composer, you can remove the parameter. See http://getcomposer.org for more information.');
- }
-
$app->finish(function () use ($app) {
// To speed things up (by avoiding Swift Mailer initialization), flush
// messages only if our mailer has been created (potentially used)
View
37 src/Silex/Provider/SymfonyBridgesServiceProvider.php
@@ -1,37 +0,0 @@
-<?php
-
-/*
- * This file is part of the Silex framework.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Silex\Provider;
-
-use Silex\Application;
-use Silex\ServiceProviderInterface;
-
-/**
- * Symfony bridges Provider.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class SymfonyBridgesServiceProvider implements ServiceProviderInterface
-{
- // BC: this class needs to be removed before 1.0
- public function __construct()
- {
- throw new \RuntimeException('You tried to create a SymfonyBridgesServiceProvider. However, it has been removed from Silex. Make sure that the Symfony bridge you want to use is autoloadable, and it will get loaded automatically. You should remove the creation of the SymfonyBridgesServiceProvider, as it is no longer needed.');
- }
-
- public function register(Application $app)
- {
- }
-
- public function boot(Application $app)
- {
- }
-}
View
4 src/Silex/Provider/TranslationServiceProvider.php
@@ -56,9 +56,5 @@ public function register(Application $app)
public function boot(Application $app)
{
- // BC: to be removed before 1.0
- if (isset($app['translation.class_path'])) {
- throw new \RuntimeException('You have provided the translation.class_path parameter. The autoloader has been removed from Silex. It is recommended that you use Composer to manage your dependencies and handle your autoloading. If you are already using Composer, you can remove the parameter. See http://getcomposer.org for more information.');
- }
}
}
View
9 src/Silex/Provider/TwigServiceProvider.php
@@ -83,11 +83,6 @@ public function register(Application $app)
}
}
- // BC: to be removed before 1.0
- if (isset($app['twig.configure'])) {
- throw new \RuntimeException('The twig.configure service has been removed. Read the changelog to learn how you can upgrade your code.');
- }
-
return $twig;
});
@@ -109,9 +104,5 @@ public function register(Application $app)
public function boot(Application $app)
{
- // BC: to be removed before 1.0
- if (isset($app['twig.class_path'])) {
- throw new \RuntimeException('You have provided the twig.class_path parameter. The autoloader has been removed from Silex. It is recommended that you use Composer to manage your dependencies and handle your autoloading. If you are already using Composer, you can remove the parameter. See http://getcomposer.org for more information.');
- }
}
}
View
4 src/Silex/Provider/ValidatorServiceProvider.php
@@ -51,9 +51,5 @@ public function register(Application $app)
public function boot(Application $app)
{
- // BC: to be removed before 1.0
- if (isset($app['validator.class_path'])) {
- throw new \RuntimeException('You have provided the validator.class_path parameter. The autoloader has been removed from Silex. It is recommended that you use Composer to manage your dependencies and handle your autoloading. If you are already using Composer, you can remove the parameter. See http://getcomposer.org for more information.');
- }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.