Improving the validation process

Discussion forum for Extension Writers regarding Extension Development.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5859
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: Improving the validation process

Post by MattF »

david63 wrote: Sun Jan 16, 2022 1:58 pm Well if nothing else it would appear that this topic has suddenly managed to reduce the validation queue to one :o
This topic did nothing of the sort.

In fact, it would seem the extension validation queue was cleared by the shockwave released from the Hunga Tonga volcano eruption.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Improving the validation process

Post by 3Di »

MattF wrote: Mon Jan 17, 2022 5:14 am SNIP
In fact, it would seem the extension validation queue was cleared by the shockwave released from the Hunga Tonga volcano eruption.
An interesting theory.
🆓 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. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Improving the validation process

Post by Ger »

Well, the first page of this topic wasn't too bad. It's a pity it's only that one...
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Improving the validation process

Post by 3Di »

Points of view.
🆓 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. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Improving the validation process

Post by david63 »

Almost three months down the line and I see that nothing has changed - the validation queue is building up again with, as of today, at least one extension having been in the queue for 56 days!
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
luo-ning
Registered User
Posts: 64
Joined: Sat Mar 05, 2022 10:50 pm

Re: Improving the validation process

Post by luo-ning »

The version of EPV used to validate the uploaded .zip file is currently throwing up really weird "fatal" syntax errors in code that a) runs with no issues, b) shows no syntax issues in VS Code with Intelephense, and c) shows no errors when running the command-line version of EPV.

Specifically, the following gives Syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting '-' or T_STRING or T_VARIABLE or T_NUM_STRING:

Code: Select all

$event['html'] = 'foo';
Whereas this "fixed" version doesn't:

Code: Select all

$the_literal_string_html = 'html';
$event[$the_literal_string_html] = 'foo';
However, the "fixed" version still gives unexpected EOF on line 115, where 115 is the last line of the file — that's supposed to be the EOF! Needless to say all code blocks, methods, etc. are closed correctly, and again, all of this code runs fine and throws up no errors in the CLI version of EPV.

So a big improvement would be if the latest available version of EPV in the repo https://github.com/phpbb/epv exactly matched the logic of the version that's used to validate uploaded .zip files.
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Improving the validation process

Post by Paul »

As said in the queue discussion the error you get is because you use php features that are from a newer php version epv supports. It is suggested to only use features from the minimum version for the phpBB version you support.
The cdb uses epv from that repository. However, depending on which php version you run the validation on you might sometimes get different results.
User avatar
luo-ning
Registered User
Posts: 64
Joined: Sat Mar 05, 2022 10:50 pm

Re: Improving the validation process

Post by luo-ning »

Paul wrote: Tue Mar 22, 2022 8:16 pm As said in the queue discussion the error you get is because you use php features that are from a newer php version epv supports. It is suggested to only use features from the minimum version for the phpBB version you support.
That was a separate issue, relating to trailing commas, and only affected the CLI version of EPV, per my latest 2 replies in the queue discussion. In any case, surely the syntax $var['prop'] would be supported in every version of PHP?

Edit: Turns out the other issue was a problem with heredoc syntax, which I guess is another compatibility issue; the wrong line numbers and weird errors were presumably due to PHP <7.3 thinking the heredoc hadn't been closed due to the closing tag being indented.
User avatar
luo-ning
Registered User
Posts: 64
Joined: Sat Mar 05, 2022 10:50 pm

Re: Improving the validation process

Post by luo-ning »

OK next request — please allow authors to delete validation requests (at least for contributions that don't yet have a validated release)! Due to the discrepency between the validation logic of the online and offline EPV versions, I wanted to run my code through the online validator to check it, but doing so created a validation request that there seems to be no way for me to delete.
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Improving the validation process

Post by Paul »

You can just resubmit it, it will mark the old one as handled. If you can't resubmit directly you can contact via the queue discussion topic to request to get it denied.
We don't delete revisions as we want to keep the history for a extension.
User avatar
luo-ning
Registered User
Posts: 64
Joined: Sat Mar 05, 2022 10:50 pm

Re: Improving the validation process

Post by luo-ning »

It's literally just a placeholder — the extension isn't ready for submission, and even the permalink is just mashed keyboard. I guess I'll just leave it hanging around and use it as a place to validate against the EPV.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Improving the validation process

Post by david63 »

Paul wrote: Tue Mar 22, 2022 8:16 pm It is suggested to only use features from the minimum version for the phpBB version you support.
I thought that you could use any version of PHP as long as it was specified in the extension's requirements - or has this changed?
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Improving the validation process

Post by Paul »

luo-ning wrote: Sat Mar 26, 2022 1:08 pm It's literally just a placeholder — the extension isn't ready for submission, and even the permalink is just mashed keyboard. I guess I'll just leave it hanging around and use it as a place to validate against the EPV.
You can use it here https://www.phpbb.com/extensions/epv/ for testing, or run it locally as said.
Also, at the moment you see the EPV results it is not submitted yet. You will need to confirm the results before it is actually submitted.
david63 wrote: Sat Mar 26, 2022 1:18 pm
Paul wrote: Tue Mar 22, 2022 8:16 pm It is suggested to only use features from the minimum version for the phpBB version you support.
I thought that you could use any version of PHP as long as it was specified in the extension's requirements - or has this changed?
You can, but it is not suggested.
User avatar
luo-ning
Registered User
Posts: 64
Joined: Sat Mar 05, 2022 10:50 pm

Re: Improving the validation process

Post by luo-ning »

Paul wrote: Sat Mar 26, 2022 1:43 pm You can use it here https://www.phpbb.com/extensions/epv/ for testing, or run it locally as said.
Yes. Once again though, I tried that when validating my HTML Entitites extension, and it didn't detect the issue with heredocs; only the online version detected that issue. As I said above:
luo-ning wrote: Tue Mar 22, 2022 6:43 pm a big improvement would be if the latest available version of EPV in the repo https://github.com/phpbb/epv exactly matched the logic of the version that's used to validate uploaded .zip files.
 
 
Paul wrote: Sat Mar 26, 2022 1:43 pm Also, at the moment you see the EPV results it is not submitted yet. You will need to confirm the results before it is actually submitted.
That was the case before, but this time the confirmation step was skipped for some reason. Bug I guess?
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Improving the validation process

Post by Paul »

luo-ning wrote: Sat Mar 26, 2022 9:18 pm
Paul wrote: Sat Mar 26, 2022 1:43 pm Also, at the moment you see the EPV results it is not submitted yet. You will need to confirm the results before it is actually submitted.
That was the case before, but this time the confirmation step was skipped for some reason. Bug I guess?
That's because you submitted it as convertor and not as extension.
Locked

Return to “Extension Writers Discussion”