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: 670
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.
MY EXTENSIONS:
Verified Profiles | Awesome Payments: a phpBB shop

Available for paid extension work: PM me.
User avatar
GanstaZ
Registered User
Posts: 1223
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 Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
danieltj
Infrastructure Team Member
Infrastructure Team Member
Posts: 670
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 đź‘Ť
MY EXTENSIONS:
Verified Profiles | Awesome Payments: a phpBB shop

Available for paid extension work: PM me.

Return to “Extension Writers Discussion”