Skip to content
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

Integrate publication validation #736

Merged
merged 40 commits into from
Dec 7, 2022
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9620ff1
Create ValidatePublicationTypeCommand.php
caendesilva Dec 6, 2022
beef027
Create ValidatePublicationTypeCommandTest.php
caendesilva Dec 6, 2022
619a23b
Register the command
caendesilva Dec 6, 2022
ec115c1
Update command PHPDoc
caendesilva Dec 6, 2022
e05a50d
Throw if there are no commands to validate
caendesilva Dec 6, 2022
9142e50
Swap out handle for safeHandle
caendesilva Dec 6, 2022
67fb560
Test command with no publication types
caendesilva Dec 6, 2022
194ab25
Test command with invalid publication type
caendesilva Dec 6, 2022
6e867d3
Set up method for test with publication types
caendesilva Dec 6, 2022
85b3e5c
Add getFieldRules method
caendesilva Dec 6, 2022
b95ebe7
Add getValidationRules and validate methods
caendesilva Dec 6, 2022
82f515e
Use fieldRules as collection
caendesilva Dec 6, 2022
d2d655d
Add forget method to front matter class
caendesilva Dec 6, 2022
ade0925
Mark experimental method as internal
caendesilva Dec 6, 2022
cd2e5d7
Update command output
caendesilva Dec 6, 2022
f0cafcb
Refactor output to show checkmark next to publication if passed
caendesilva Dec 6, 2022
101b92c
Add more output assertions
caendesilva Dec 6, 2022
f2fe835
Use singular test name
caendesilva Dec 6, 2022
4e8ab43
Apply fixes from StyleCI
StyleCIBot Dec 6, 2022
40f86a9
Test with verbose output
caendesilva Dec 6, 2022
adaf2a4
Remove false positive and negative
caendesilva Dec 6, 2022
2e927c7
Use the actual command signature instead of class constant in test
caendesilva Dec 6, 2022
20c1615
Test command with invalid publication
caendesilva Dec 6, 2022
5132ef9
Remove rouge fieldname and add newline
caendesilva Dec 6, 2022
f75fa77
Remove debug code
caendesilva Dec 6, 2022
ba4aaab
Add code review comment
caendesilva Dec 6, 2022
2d2b1a1
Update output
caendesilva Dec 6, 2022
e5a33b2
Apply fixes from StyleCI
StyleCIBot Dec 6, 2022
5c2b112
Add type annotation
caendesilva Dec 6, 2022
377918a
Merge branch 'integrate-publication-validation' of github.com:hydephp…
caendesilva Dec 6, 2022
3b26a47
Collapse 'if' statement
caendesilva Dec 6, 2022
b9fd75d
Remove redundant qualifiers from test names
caendesilva Dec 6, 2022
b95a799
Add tests for multiple publication types
caendesilva Dec 6, 2022
028a790
Add todo
caendesilva Dec 6, 2022
f20eed8
Rebrand command to validate publications in general, not just the type
caendesilva Dec 6, 2022
6ae6ac1
Apply fixes from StyleCI
StyleCIBot Dec 6, 2022
bd71b5a
Rebrand command to validate publications in general not just the type
caendesilva Dec 6, 2022
d6aeb10
Merge branch 'integrate-publication-validation' of github.com:hydephp…
caendesilva Dec 6, 2022
c2e11a1
Remove todo
caendesilva Dec 7, 2022
f8107da
Rename local variable
caendesilva Dec 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Collapse 'if' statement
caendesilva committed Dec 6, 2022
commit 3b26a4725374f4761ff80813c647014bd1d316e9
Original file line number Diff line number Diff line change
@@ -84,11 +84,7 @@ public function safeHandle(): int
$this->output->writeln(" <fg=green>$checkmark</>");
} catch (Exception $e) { // ATTN What if there's more than one error? Should we buffer errors and display them all at the end?
$countErrors++;
if ($verbose) {
$this->output->writeln(" <fg=red>$xmark\n $xmark: {$e->getMessage()}</>");
} else {
$this->output->writeln(" <fg=red>$xmark\n {$e->getMessage()}</>");
}
$this->output->writeln(" <fg=red>$xmark\n {$e->getMessage()}</>");
}
$publication->matter->forget($fieldName);
}