-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question: validator-generated.php #181
Comments
i can confirm , on a previous pull request , i implement the amp-sidebar tag but i doesnt generate the test and the PR was accepted. If when merged to master they dont recreate the tests it would recreate every time somebody implements something and recreate the validator. I realize this in a new PR of the amp-accordion when i discover how to make it i do it and its regenerate the amp-sidebar and the amp-accordion , but that isnt merged yet so everybody will have this issue of testing files and regenerate something that they didnt do. And i also want to know the future of the amphtml library that generates the validator.php, its on plans to keep this update? If yes , i would like to contribute to make this happen :) |
I got the following after running composer update:
I got this on the require block of the composer.json file:
|
@sebastianbenz @sigginet @renzit |
The objective of the Lullabot validator is to provide a good fundamental base for HTML->AMP HTML conversion. If you know what validation errors are there, you can try to fix them or flag them to the user. Yes at this point the Lullabot validator has fallen behind. It would need changes to the codebase to catch up with all the changes to the AMP specification. The Lullabot validator is designed to read the AMP specification written in protobuf so it can deal with incremental changes e.g. a tag was added to a whitelist or a validation regex was changed. But over a period of time there are changes both to the specification structure itself and the AMP specification that (unavoidably) need the Lullabot validator codebase to be modified in step with the canonical Javascript validator. Unfortunately I don't have the time to bring this upto date with the canonical amphtml validator written in Javascript |
@sidkshatriya |
@obeyer I'm happy to answer you answer question on my PR, when I still remember. Just reach out to me somehow. Sadly the test failures in my PR are highly non trivial, at least they weren't at the time. I'm happy to provide help |
I suggest using the generated PHP file in the AMP WordPress plugin: https://github.com/Automattic/amp-wp/blob/develop/includes/sanitizers/class-amp-allowed-tags-generated.php We'd like to work on extracting this into a Composer package as well to make it easier to incorporate. |
@sebastianbenz @sigginet
I have a question about validator-generated.php
I followed instructions on how to regenerate it by cloning lullabot/amphtml repo and stuff.
I only had one small change (I added amp-video element and the script for it to Context.php). But when I regenerated the file, it was so much different from what it is right now. So it either was changed manually before, and now generated changes are overriding it, or some other changes that people made, required the file to be regenerated, and it wasn't. Also, does that repo https://github.com/Lullabot/amphtml need to be updated as well? looks like the repo it was forked from is so much ahead.
On the side note, I opened a bunch of pull requests, that we had in our version of amp-library, because we decided to keep it up to date with yours, and contribute, since you guys are merging code. Please, look when you have time. Thx!
The text was updated successfully, but these errors were encountered: