Skip to content

Commit

Permalink
minor lyrixx#53 Migration to silex 1.1 (Trismegiste)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the master branch (closes lyrixx#53).

Discussion
----------

Migration to silex 1.1

Hello,

I've migrated many components used in this edition, including Silex to 1.1 release.

PHPUnit are ok.

Hope this helps.

Commits
-------

fffa4e6 Migration to silex 1.1
  • Loading branch information
lyrixx committed Dec 1, 2013
2 parents eacf4b8 + fffa4e6 commit 8439c31
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
],
"require": {
"doctrine/dbal" : "~2.3",
"kriswallsmith/assetic" : "~1.0.0",
"kriswallsmith/assetic" : "~1.1",
"leafo/lessphp" : "~0.4.0",
"mheap/silex-assetic" : "~1.0.0",
"monolog/monolog" : "~1.0",
"silex/silex" : "~1.0.0",
"mheap/silex-assetic" : "~1.0",
"monolog/monolog" : "~1.6",
"silex/silex" : "~1.1",
"symfony/config" : "~2.3",
"symfony/console" : "~2.3",
"symfony/form" : "~2.3",
Expand Down
5 changes: 3 additions & 2 deletions src/controllers.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@
->getForm()
;

if ($request->isMethod('POST')) {
if ($form->submit($request)->isValid()) {
$form->handleRequest($request);
if ($form->isSubmitted()) {
if ($form->isValid()) {
$app['session']->getFlashBag()->add('success', 'The form is valid');
} else {
$form->addError(new FormError('This is a global error'));
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function testPageCache()
public function testLoggingWithPsrInterface()
{
$msg = 'Check the logger';
$this->app['monolog']->error($msg);
$this->app['logger']->error($msg);
$this->assertStringEndsWith("app.ERROR: $msg [] []\n", file_get_contents(__DIR__.'/../../resources/log/app.log'));
}
}

0 comments on commit 8439c31

Please sign in to comment.