diff -u b/session_example/session_example.info.yml b/session_example/session_example.info.yml --- b/session_example/session_example.info.yml +++ b/session_example/session_example.info.yml @@ -8 +7,0 @@ - diff -u b/session_example/session_example.links.menu.yml b/session_example/session_example.links.menu.yml --- b/session_example/session_example.links.menu.yml +++ b/session_example/session_example.links.menu.yml @@ -7 +7 @@ - weight: 10 \ No newline at end of file + weight: 10 diff -u b/session_example/session_example.links.task.yml b/session_example/session_example.links.task.yml --- b/session_example/session_example.links.task.yml +++ b/session_example/session_example.links.task.yml @@ -5,5 +5,4 @@ - session_example.view: route_name: session_example.view base_route: session_example.form - title: View \ No newline at end of file + title: View diff -u b/session_example/session_example.routing.yml b/session_example/session_example.routing.yml --- b/session_example/session_example.routing.yml +++ b/session_example/session_example.routing.yml @@ -2,16 +2,16 @@ - title: 'Session Example' path: '/examples/session_example' - options: - _admin_route: TRUE defaults: _form: '\Drupal\session_example\Form\SessionExampleForm' + _title: 'Session Example' requirements: _access: 'TRUE' -session_example.view: - path: '/examples/session_example/view' options: _admin_route: TRUE +session_example.view: + path: '/examples/session_example/view' defaults: _controller: '\Drupal\session_example\Controller\SessionExampleController::showSession' requirements: _access: 'TRUE' + options: + _admin_route: TRUE diff -u b/session_example/src/Controller/SessionExampleController.php b/session_example/src/Controller/SessionExampleController.php --- b/session_example/src/Controller/SessionExampleController.php +++ b/session_example/src/Controller/SessionExampleController.php @@ -16,6 +16,8 @@ * A session controller example. * * @param \Symfony\Component\HttpFoundation\Request $request + * The request object. + * * @return string * A rendered array containing name and mail from session. */ diff -u b/session_example/src/Form/SessionExampleForm.php b/session_example/src/Form/SessionExampleForm.php --- b/session_example/src/Form/SessionExampleForm.php +++ b/session_example/src/Form/SessionExampleForm.php @@ -7,8 +7,6 @@ namespace Drupal\session_example\Form; - - use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Utility\LinkGeneratorInterface; diff -u b/session_example/src/Tests/SessionExampleTest.php b/session_example/src/Tests/SessionExampleTest.php --- b/session_example/src/Tests/SessionExampleTest.php +++ b/session_example/src/Tests/SessionExampleTest.php @@ -51,7 +51,7 @@ $this->clickLink(t('Form')); $this->drupalPostForm(NULL, array(), t('Clear Session')); $this->assertText('Session is cleared.'); - + $this->clickLink(t('View')); $this->assertText('No Name'); $this->assertText('No EMail'); only in patch2: unchanged: --- a/src/Tests/ExamplesTest.php +++ b/src/Tests/ExamplesTest.php @@ -42,7 +42,7 @@ class ExamplesTest extends WebTestBase { // Assert that the tray registered by example is present. $this->assertRaw('id="toolbar-item-examples-tray"'); - $this->assertRaw('