-
Notifications
You must be signed in to change notification settings - Fork 5
CF7 to ACF Supporters #162
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
Conversation
|
Hey this issue seems to be related to the code, its failing based on styling and type hints (or lack of) FILE: themes/osi/functions.php
----------------------------------------------------------------------
FOUND 22 ERRORS AND 2 WARNINGS AFFECTING 22 LINES
----------------------------------------------------------------------
439 | ERROR | [ ] Missing @return tag in function comment
| | (Squiz.Commenting.FunctionComment.MissingReturn)
440 | WARNING | [ ] The method parameter $contact_form is never
| | used
| | (Generic.CodeAnalysis.UnusedFunctionParameter.Found)
440 | ERROR | [ ] Type hint "WPCF7_ContactForm" missing for
| | $contact_form
| | (Squiz.Commenting.FunctionComment.TypeHintMissing)
441 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
443 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
444 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
446 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
447 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
448 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
449 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
450 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
451 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
452 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
454 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
455 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
456 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
457 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
458 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
459 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
460 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
460 | WARNING | [ ] error_log() found. Debug code should not
| | normally be used in production.
| | (WordPress.PHP.DevelopmentFunctions.error_log_error_log)
461 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
462 | ERROR | [x] Tabs must be used to indent lines; spaces are
| | not allowed
| | (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed)
463 | ERROR | [x] Expected 1 newline at end of file; 0 found
| | (PSR2.Files.EndFileNewline.NoneFound)
----------------------------------------------------------------------
PHPCBF CAN FIX THE [20](https://github.com/OpenSourceOrg/dotOrg/actions/runs/12720502890/job/35462242778?pr=162#step:9:21) MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------I can fix this tomorrow if needs be, but most of the fixes above can be fixed running Things like The function should also be prefixed with the |
|
Yes, please give it the right format when you can, I don't have composer installed on my machine. Also feel free to remove that error_log, I was just debugging, and agree it shouldn't be in production. |
|
Sorry ended up AFK yesterday and now trying to fight through a growing list of small tasks, this has been done. Ive updated the format so its compliant with phpcs. ive not deployed this YET, but will push it up on monday (ive only got 1hr left today and dont want to risk it). |
|
Sounds reasonable, happy ROF! :) |
Changes proposed in this Pull Request
This PR adds a function to create a new supporter based on a CF7 submission, gets all the fields from the form and adds a new post in Pending Review mode.
Testing instructions
Go to https://open-source-initiative-development.mystagingwebsite.com/ai/endorsements, fill in the form, a new Supporter should be created