Fatal error in the ext controller docs

Discussion forum for Extension Writers regarding Extension Development.
User avatar
danieltj
Jr. Extension Validator
Posts: 302
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.
Extensions Developer | GitHub Sponsorship
Available for premium extension development (PM me).
User avatar
GanstaZ
Registered User
Posts: 1188
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
Jr. Extension Validator
Posts: 302
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 👍
Extensions Developer | GitHub Sponsorship
Available for premium extension development (PM me).

Return to “Extension Writers Discussion”