Skip to content
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.

Commit

Permalink
bug #1377 Remove dependency on deprecated symfony/locale (romainneutron)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.0.x-dev branch.

Discussion
----------

Remove dependency on deprecated symfony/locale

Commits
-------

618188e Remove dependency on deprecated symfony/locale
  • Loading branch information
fabpot committed May 26, 2016
2 parents b872d73 + 618188e commit ffcf8ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -27,13 +27,13 @@
"symfony/expression-language": "~2.8|3.0.*",
"symfony/security": "~2.8|3.0.*",
"symfony/config": "~2.8|3.0.*",
"symfony/locale": "~2.8|3.0.*",
"symfony/form": "~2.8|3.0.*",
"symfony/browser-kit": "~2.8|3.0.*",
"symfony/css-selector": "~2.8|3.0.*",
"symfony/debug": "~2.8|3.0.*",
"symfony/dom-crawler": "~2.8|3.0.*",
"symfony/finder": "~2.8|3.0.*",
"symfony/intl": "~2.8|3.0.*",
"symfony/monolog-bridge": "~2.8|3.0.*",
"symfony/doctrine-bridge": "~2.8|3.0.*",
"symfony/options-resolver": "~2.8|3.0.*",
Expand Down
13 changes: 1 addition & 12 deletions src/Silex/Provider/FormServiceProvider.php
Expand Up @@ -28,19 +28,8 @@ class FormServiceProvider implements ServiceProviderInterface
{
public function register(Container $app)
{
if (!class_exists('Locale') && !class_exists('Symfony\Component\Locale\Stub\StubLocale')) {
throw new \RuntimeException('You must either install the PHP intl extension or the Symfony Locale Component to use the Form extension.');
}

if (!class_exists('Locale')) {
$r = new \ReflectionClass('Symfony\Component\Locale\Stub\StubLocale');
$path = dirname(dirname($r->getFilename())).'/Resources/stubs';

require_once $path.'/functions.php';
require_once $path.'/Collator.php';
require_once $path.'/IntlDateFormatter.php';
require_once $path.'/Locale.php';
require_once $path.'/NumberFormatter.php';
throw new \RuntimeException('You must either install the PHP intl extension or the Symfony Intl Component to use the Form extension.');
}

$app['form.types'] = function ($app) {
Expand Down

0 comments on commit ffcf8ba

Please sign in to comment.