Fatal error in the ext controller docs

Discussion forum for Extension Writers regarding Extension Development.
User avatar
danieltj
Infrastructure Team Member
Infrastructure Team Member
Posts: 631
Joined: Thu May 03, 2018 9:32 pm
Location: United Kingdom
Name: Daniel James

Fatal error in the ext controller docs

Post by danieltj »

The extension controller documentation has a code block with the following (link):

Code: Select all

<?php

use \Symfony\Component\HttpFoundation\Response;

namespace acme\demo\controller;

class main
If you use that code as-is, you'll get the following fatal error:

Code: Select all

Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script
The namespace must go before the dependancy usage.
User avatar
GanstaZ
Registered User
Posts: 1221
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: Fatal error in the ext controller docs

Post by GanstaZ »

I guess the right place to submit an issue about documentation is here.
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
danieltj
Infrastructure Team Member
Infrastructure Team Member
Posts: 631
Joined: Thu May 03, 2018 9:32 pm
Location: United Kingdom
Name: Daniel James

Re: Fatal error in the ext controller docs

Post by danieltj »

I've submitted a ticket and sent a PR đź‘Ť

Return to “Extension Writers Discussion”