Commit 8e8b96ec authored by Henrik Bjørnskov's avatar Henrik Bjørnskov

Remove all "before 1.0" exceptions and services.

parent ca7e2dc4
......@@ -66,10 +66,6 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
$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();
});
......
......@@ -122,14 +122,5 @@ class DoctrineServiceProvider implements ServiceProviderInterface
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.');
}
}
}
......@@ -82,9 +82,5 @@ class FormServiceProvider implements ServiceProviderInterface
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.');
}
}
}
......@@ -66,11 +66,6 @@ class MonologServiceProvider implements ServiceProviderInterface
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());
});
......
......@@ -86,11 +86,6 @@ class SwiftmailerServiceProvider implements ServiceProviderInterface
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)
......
<?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)
{
}
}
......@@ -56,9 +56,5 @@ class TranslationServiceProvider implements ServiceProviderInterface
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.');
}
}
}
......@@ -83,11 +83,6 @@ class TwigServiceProvider implements ServiceProviderInterface
}
}
// 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 @@ class TwigServiceProvider implements ServiceProviderInterface
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.');
}
}
}
......@@ -51,9 +51,5 @@ class ValidatorServiceProvider implements ServiceProviderInterface
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.');
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment