Closed cnkt closed 11 years ago
Same issue here. I think its the issue is located in the src/Silex/Application.php:
https://github.com/fabpot/Silex/blob/master/src/Silex/Application.php#L367 https://github.com/fabpot/Silex/blob/master/src/Silex/Application.php#L465
/cc @fabpot
Can you provide a sample application to show the error ?
Sample app:
<?php
mb_internal_encoding('UTF-8');
mb_detect_order(array('UTF-8', 'ASCII'));
mb_http_output('UTF-8');
date_default_timezone_set('UTC');
define('APP_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
define('APP_ROOT', __DIR__ . '/..');
require_once APP_ROOT . '/vendor/autoload.php';
$app = new Silex\Application();
$app['debug'] = true;
$app['charset'] = 'UTF-8';
$app->register(
new Silex\Provider\ServiceControllerServiceProvider()
);
$app['index.indexController'] = $app->share(function() {
return new \App\Module\Index\Controller\IndexController();
});
$app->get('/', 'index.indexController:indexAction')->bind('index');
$app->run();
Try using a stable version of symfony for now? Looks like this went in a couple of days ago.
i just have "silex/silex": "1.0.*@dev",
in my composer. How can i add stable version of symfony to it?
@cnkt what about the rest of your composer.json? What is minimum-stability set to?
I don't have minimum-stability section in my composer.json. Here is the full file:
{
"require": {
"silex/silex": "1.0.*@dev",
"dflydev/doctrine-orm-service-provider": "1.0.x-dev",
"breerly/zf1": "1.11.*",
"doctrine/orm": "2.3.1",
"michelf/php-markdown": "1.3.*@dev"
},
"autoload": {
"psr-0": {
"App": "src/"
}
}
}
{
"require": {
"php": ">=5.3.3",
"silex/silex": "1.0.*",
"symfony/monolog-bridge": "~2.2",
"symfony/security": "~2.2",
"symfony/validator": "~2.2",
"kriswallsmith/buzz": "dev-master"
},
"minimum-stability": "dev"
}
I added minimum-stability but composer says this:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating autoload files
I confirm the same problem. Deprecated: addCollection() should only be used with a single parameter. The params $prefix, $defaults, $requirements and $options are deprecated since version 2.2 and will be removed in 2.3. Use addPrefix() and addOptions() instead. in /vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php on line 197 After today composer update.
"require":{
"php": ">=5.3.3",
"silex/silex":"1.0.*",
This should be fixed now.
I can confirm this is fixed.
Thank you very much it works as expected
When i try to use Service Controllers instead of closure functions like
i get this notice: