phpBB 3.2.0-b2 released

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
CHItA
Development Team
Development Team
Posts: 162
Joined: Thu Mar 12, 2015 1:43 pm
Location: Budapest, Hungary

Re: phpBB 3.2.0-b2 released

Post by CHItA »

I wasn't aware that the development config files aren't distributed with the download packages. In this case you can download the file from github.

User avatar
3Di
Registered User
Posts: 773
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: phpBB 3.2.0-b2 released

Post by 3Di »

CHItA wrote:
Wed Apr 13, 2016 9:22 am
I wasn't aware that the development config files aren't distributed with the download packages. In this case you can download the file from github.
That's what I already did, the issue here is:
is it normal to do that for every user or do you think this is an issue that needs to be fixed and thus a bug report needs to be filed?

I feel it should be fixed. IMO.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
david63 Online
Registered User
Posts: 291
Joined: Mon Feb 07, 2005 7:23 am
Location: Lancashire, UK

Re: phpBB 3.2.0-b2 released

Post by david63 »

The majority of users do not need the development config so I would have to disagree that it should be included, but I would concede that the development config files should be more readily available.
David
Remember: You only know what you know -
and you do not know what you do not know!

User avatar
3Di
Registered User
Posts: 773
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: phpBB 3.2.0-b2 released

Post by 3Di »

david63 wrote:
Wed Apr 13, 2016 10:25 am
The majority of users do not need the development config so I would have to disagree that it should be included, but I would concede that the development config files should be more readily available.
I disagree, I feel the config.php file should look like this after a fresh installation
maybe with some comments in place..

Code: Select all

@define('PHPBB_INSTALLED', true);
// @define('PHPBB_DISPLAY_LOAD_TIME', true);
@define('PHPBB_ENVIRONMENT', 'production');
// @define('PHPBB_ENVIRONMENT', 'development');
// @define('DEBUG_CONTAINER', true);
Remember we do not have the SQL explain in place if that file(s) aren't shipped with and also breaks the normal behaviour that's been well known in every version of phpBB till now.
Imagine one day a "Joe Doe" user wants to try and become a coder for phpBB..
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
david63 Online
Registered User
Posts: 291
Joined: Mon Feb 07, 2005 7:23 am
Location: Lancashire, UK

Re: phpBB 3.2.0-b2 released

Post by david63 »

The problem with that approach is that there will be some who will remove the comment for the development environment, get the error and waste time for support.
3Di wrote:
Wed Apr 13, 2016 10:48 am
Imagine one day a "Joe Doe" user wants to try and become a coder for phpBB..
Then creating a development environment will be their first challenge - once that is done it will be plain sailing from then on ;) ;)

It might be an idea if there was something in the Wiki to explain this
David
Remember: You only know what you know -
and you do not know what you do not know!

User avatar
3Di
Registered User
Posts: 773
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: phpBB 3.2.0-b2 released

Post by 3Di »

david63 wrote:
Wed Apr 13, 2016 10:56 am
The problem with that approach is that there will be some who will remove the comment for the development environment, get the error and waste time for support.
3Di wrote:
Wed Apr 13, 2016 10:48 am
Imagine one day a "Joe Doe" user wants to try and become a coder for phpBB..
Then creating a development environment will be their first challenge - once that is done it will be plain sailing from then on ;) ;)

It might be an idea if there was something in the Wiki to explain this
Then the line
@define('PHPBB_ENVIRONMENT', 'production');
once commented out should automatically set the 'development' configuration to on.
Sort of "usual" behaviour we all are used to.

Also, as I above stated, a line of comment on this into the config.php should be written, no need to have wiki page. IMO.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
david63 Online
Registered User
Posts: 291
Joined: Mon Feb 07, 2005 7:23 am
Location: Lancashire, UK

Re: phpBB 3.2.0-b2 released

Post by david63 »

3Di wrote:
Wed Apr 13, 2016 11:02 am
Then the line
@define('PHPBB_ENVIRONMENT', 'production');
once commented out should automatically set the 'development' configuration to on.
If I recall correctly the way that part of the program works is that if no environment is specified then it will create a production environment
3Di wrote:
Wed Apr 13, 2016 11:02 am
Also, as I above stated, a line of comment on this into the config.php should be written, no need to have wiki page.
I was more meaning that details of the different environments and how to set them up/use them could maybe be in the Wiki
David
Remember: You only know what you know -
and you do not know what you do not know!

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: phpBB 3.2.0-b2 released

Post by Nicofuma »

Well...

What is an environment?
An environment is a configuration of the code with different caching strategies, services and debug tools and a dedicated cache directory. As for now (3.2.0-b3-dev) there is 4 environments:
  • installer Used by the installer it defines all the services needed to install phpBB. That's a very specific environment that is unable to run a board.
  • production Used by default, that's the most efficient configuration. As many things as possible are precomputed and cached (templates event inclusion, container, routing etc...). The drawback being that you need to purge the cache everytime you enable/disable an extension (done automatically) or updates something in the configuration files. (Just to say, my local board, using php 5.6, display a topic page in less than 30ms)
  • development Only available on Github, this environment is meant for core contributors and extension developers. It
    • provides a clever caching strategy which looks to your files to guess if the container (or the router) needs to be rebuild which is more powerful (and replaces) than the old DEBUG_CONTAINER constant
    • search the template events at each page instead of caching the list
    • ensures that the dev dependencies of phpBB are installed
    • reloads the templates when they are modified
    • enables a powerful exception and error handler which displays errors and exceptions with many details
    • is much slower than the production one and it should be worse with the time. The goal isn't performance but developer experience.
  • test Only available on Github it is used during the tests.
In the future, many more features can be expected in the the development environment, and at the end it should completely (or almost) replace the DEBUG constant.

What should the packages embed?
The answer is simple: only what is needed by the end user so installer and production. The development and test environment can be dangerous if they used on a live board and they aren't meant for the end user at all.
We also assume that an extension developer is able to get the development configuration from Github if he needs it.

Why it is production by default?
Because that's what 99% of the users need and are expecting. Also, we need a default value because when you update your board the config.php file doesn't change and it must remain compatible with the new version of phpBB.

What constant can I define in my config.php file?

Code: Select all

@define('PHPBB_INSTALLED', true);
@define('PHPBB_DISPLAY_LOAD_TIME', true);
@define('PHPBB_ENVIRONMENT', 'production');
@define('DEBUG', true);
  • PHPBB_INSTALLED Indicates that the board have been fully installed
  • PHPBB_DISPLAY_LOAD_TIME Display the load time of the page, the number of query and the memory peak (doesn't have any performance impact)
  • PHPBB_ENVIRONMENT Defines the environment to use. It can have a huge performance and security impact
  • DEBUG Enables a few debug settings like the explain. It may disappear in the future, replaced by environments
Member of the phpBB Development-Team
No Support via PM

User avatar
3Di
Registered User
Posts: 773
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: phpBB 3.2.0-b2 released

Post by 3Di »

Thanks, but.. there is not a
Nicofuma wrote:
Wed Apr 13, 2016 12:45 pm

Code: Select all

@define('DEBUG', true);
line there.
That's mine live config.php

Code: Select all

@define('PHPBB_INSTALLED', true);
@define('PHPBB_DISPLAY_LOAD_TIME', true);
@define('PHPBB_ENVIRONMENT', 'production');
@define('DEBUG_CONTAINER', true);
So there isn't any explain stuff too.
Last edited by 3Di on Wed Apr 13, 2016 6:25 pm, edited 1 time in total.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
3Di
Registered User
Posts: 773
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: phpBB 3.2.0-b2 released

Post by 3Di »

I manually added that line to my config.php and now it works.
Should be an installer bug then.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

Post Reply