DocBlocks
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.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.
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.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.
Re: DocBlocks
Agree on all points except #2.
- 3Di
- Registered User
- Posts: 951
- Joined: Tue Nov 01, 2005 9:50 pm
- Location: Milano 🇮🇹 Frankfurt 🇩🇪
- Contact:
Re: DocBlocks
Ah, good to know thx.Marc wrote: Wed Oct 23, 2019 7:22 pm I'm also for the gap to separate different types.
@3Di: The@access
specifier is still a legacy from the old days when this couldn't be properly defined and is no longer needed (and therefore should also no longer be used).
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
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
🚀 Looking for a specific feature or alternative option? We will rock you!
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
Re: DocBlocks
As PHP 7.1 is the lowest supported version for phpBB 3.3.x I'm for setting all the parameter and return types directly in the code and then for removing all DocBlocks that don't add extra value or information (or even could be misleading when they go out of sync with the code).
https://localheinz.com/blog/2018/05/06/ ... docblocks/
Also, you can make phpBB strictly typed by adding
https://dev.to/robdwaller/how-php-type- ... -work-1mm5
https://localheinz.com/blog/2018/05/06/ ... docblocks/
Also, you can make phpBB strictly typed by adding
declare(strict_types=1);
at the top of all PHP files. That will huge a benefit in making the code solid and clear. Errors are then thrown on type violations. https://dev.to/robdwaller/how-php-type- ... -work-1mm5
- DavidIQ
- Customisations Team Leader
- Posts: 1904
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: DocBlocks
That first one is pretty much an opinion piece. Dev team can decide on how docblocks are used moving forward though. Probably wouldn't do that second one until at least 5.0 way in the future. It would be very disruptive to current development and doesn't really buy us much.
Re: DocBlocks
You can use strict_types on new files while preserving compatibility with the less type-aware parts of the codebase.