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

Create background events for URL validation #5515

Merged
merged 99 commits into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
a1b61ff
Create single scheduled background task with save_post single event
johnwatkins0 Oct 14, 2020
345b324
Additional work on SavePostValidationEvent and its parent class
johnwatkins0 Oct 16, 2020
bc4e116
Include cli utils in autoload-dev
johnwatkins0 Oct 19, 2020
4aa2a3d
Merge branch 'feature/refactor-url-validation' into feature/1756-vali…
johnwatkins0 Oct 21, 2020
ef5534e
Remove cli utils from autoload-dev
johnwatkins0 Oct 21, 2020
4f9b4b9
Increase unit test coverage for new classes
johnwatkins0 Oct 21, 2020
2c2dce5
Undo changes to bootstrap file
johnwatkins0 Oct 22, 2020
348b641
Add newline to end of file
johnwatkins0 Oct 22, 2020
f0aa4b8
Fix tests for MonitorCssTransientCaching
johnwatkins0 Oct 22, 2020
05a13f1
Fix tests for ValidatedUrlStylesheetDataGarbageCollection
johnwatkins0 Oct 22, 2020
57fe9fd
Clean up SingleScheduledBackgroundTask
johnwatkins0 Oct 22, 2020
133197a
SavePostValidationEvent cleanup
johnwatkins0 Oct 22, 2020
3097d88
Clean up and simplify tests
johnwatkins0 Oct 22, 2020
c53b089
Remove unused class property
johnwatkins0 Oct 22, 2020
54e21ff
PHPCS and other cleanup
johnwatkins0 Oct 22, 2020
8efbe1c
Increase test coverage
johnwatkins0 Oct 22, 2020
317589e
Merge branch 'feature/refactor-url-validation' into feature/1756-vali…
johnwatkins0 Nov 11, 2020
8084ca7
PHPStan fixes
johnwatkins0 Nov 11, 2020
241789f
Pass force validation flags in cron callbacks
johnwatkins0 Nov 11, 2020
8ef28ce
Fix a since version
johnwatkins0 Nov 11, 2020
1f2ed34
Merge remote-tracking branch 'origin/develop' into feature/1756-valid…
johnwatkins0 Nov 23, 2020
cda3ee2
Remove use of obsolete class constant
johnwatkins0 Nov 23, 2020
33a680c
Integrate updated ValidationRequestMocking (converted to trait)
johnwatkins0 Nov 23, 2020
cd4dd77
Comment updates and minor refactors
johnwatkins0 Nov 23, 2020
2d2a0a6
Remove URL validation locking
johnwatkins0 Nov 25, 2020
3f2d79f
Simplify plugin basename retrieval
johnwatkins0 Nov 25, 2020
7f6f775
Remove unused variable
johnwatkins0 Nov 25, 2020
9345651
Merge branch 'feature/1756-validation-cron' of https://github.com/amp…
johnwatkins0 Nov 25, 2020
28581d7
Add namespace to ValidatedUrlStylesheetDataGarbageCollectionTest.php
johnwatkins0 Nov 25, 2020
0a655f6
Typo fix
johnwatkins0 Nov 25, 2020
1562990
Add leading slash to coversDefaultClass comment
johnwatkins0 Nov 25, 2020
3d07f78
Add namespacing to MonitorCssTransientCachingTest.php
johnwatkins0 Nov 25, 2020
a9e5eac
Merge branch 'feature/1756-validation-cron' of https://github.com/amp…
johnwatkins0 Nov 25, 2020
b2bc91e
Increase test coverage
johnwatkins0 Nov 25, 2020
25ce26c
Harden post_id check
johnwatkins0 Dec 10, 2020
b08f164
Add comment to potentially misleading number arg in get_sites
johnwatkins0 Dec 10, 2020
5334bdf
Move background task deactivate add_event call to register methods
johnwatkins0 Dec 10, 2020
8fefced
Add additional should_schedule_event checks
johnwatkins0 Dec 10, 2020
16e3ee5
Use dependency injector to create instances
johnwatkins0 Dec 10, 2020
265abd6
Add missing doc comment for parameter
johnwatkins0 Dec 10, 2020
6e10b5b
Fix failing get_validated_urls test
johnwatkins0 Dec 10, 2020
e2fe6cd
Add injector delegation
johnwatkins0 Dec 10, 2020
69eddd7
Improve number validation
johnwatkins0 Dec 10, 2020
be7ca6e
PHPStan param fix
johnwatkins0 Dec 10, 2020
418fe96
Merge remote-tracking branch 'origin/develop' into feature/1756-valid…
johnwatkins0 Dec 10, 2020
a42e721
Make SavePostValidationEvent inherit from CronBasedBackgroundTask
johnwatkins0 Dec 10, 2020
94c9959
Create RecurringBackgroundTask
johnwatkins0 Dec 10, 2020
a2f95e1
Use get_timestamp instead of get_interval in SingleScheduledBackgroun…
johnwatkins0 Dec 10, 2020
43e4ffb
Add tests for schedule_event
johnwatkins0 Dec 10, 2020
38b05d6
Increase coverage for single scheduled event
johnwatkins0 Dec 10, 2020
2c7e338
Fix failing schedule_event test
johnwatkins0 Dec 10, 2020
0817cbe
Re-enable tests
johnwatkins0 Dec 10, 2020
313a13f
Update test to use a different filter; other was since 5.2
johnwatkins0 Dec 10, 2020
c31474c
Make anonymous functions static
johnwatkins0 Dec 10, 2020
1e14a97
Add more SavePostValidationEvent tests
johnwatkins0 Dec 11, 2020
5c01177
Increase test coverage
johnwatkins0 Dec 11, 2020
6d8a5c0
Fix mistaken assertTrue instead of assertFalse
johnwatkins0 Dec 11, 2020
6558fe6
Add additional tests for get_url_validation_number_per_type
johnwatkins0 Dec 11, 2020
f4754e1
Merge remote-tracking branch 'origin/develop' into feature/1756-valid…
johnwatkins0 Dec 18, 2020
e2588ec
Merge remote-tracking branch 'origin/develop' into feature/1756-valid…
johnwatkins0 Dec 22, 2020
f38297f
Move BackgroundTaskDeactivator to shared instances
johnwatkins0 Dec 22, 2020
6747c04
Add URLScanningContext class
johnwatkins0 Dec 22, 2020
7cdde96
Fix failing URLValidationCronTest tests
johnwatkins0 Dec 22, 2020
53f5c58
Fix typo in type comment
johnwatkins0 Dec 23, 2020
1419ef4
Pass args to wp_schedule_event
johnwatkins0 Dec 23, 2020
a598fce
Merge branch 'feature/1756-validation-cron' of https://github.com/amp…
johnwatkins0 Dec 23, 2020
809e0cc
Minor updates to comments and unnecessary use statements
johnwatkins0 Dec 23, 2020
1a40431
Rename MonitorCssTransientCachingTest
johnwatkins0 Dec 23, 2020
b200e53
Merge branch 'feature/1756-validation-cron' of https://github.com/amp…
johnwatkins0 Dec 23, 2020
9a0c634
Merge remote-tracking branch 'origin/develop' into feature/1756-valid…
johnwatkins0 Dec 23, 2020
599796f
Remove unneeded use statement
johnwatkins0 Dec 29, 2020
eeb2df5
Improve how potentially empty variables are set
johnwatkins0 Dec 29, 2020
daf1c17
Schedule event if user is logged in
johnwatkins0 Dec 29, 2020
7fc9711
Remove unneeded manage_options check
johnwatkins0 Dec 29, 2020
f362d40
Fix reversed logic of dev_tools_user_access check
johnwatkins0 Dec 29, 2020
c6eb855
Remove blank line between assignments
johnwatkins0 Dec 29, 2020
4f316a1
Mark class as internal
johnwatkins0 Dec 29, 2020
641a7a4
Fix type comments
johnwatkins0 Dec 29, 2020
0195b17
Make amp_url_validation_sleep_time have a minimum of 0
johnwatkins0 Dec 29, 2020
54276a1
Merge remote-tracking branch 'origin/develop' into feature/1756-valid…
johnwatkins0 Dec 29, 2020
0528d1a
Fix failing PHPUnit
johnwatkins0 Dec 29, 2020
b7c8c79
Reorder patches in composer.json
johnwatkins0 Dec 29, 2020
4982692
Regenerate composer.lock
johnwatkins0 Dec 29, 2020
fa5bba9
Reorder composer.json fields
johnwatkins0 Dec 29, 2020
895451e
Update param type for phpstan
johnwatkins0 Dec 29, 2020
07cb9f7
Use PHPStan ignore for 'cannot cast array to int'
johnwatkins0 Dec 29, 2020
7f5f4fe
Merge remote-tracking branch 'origin/develop' into feature/1756-valid…
westonruter Dec 29, 2020
8422d62
Add missing $args to wp_next_scheduled() call after 1419ef4
westonruter Dec 29, 2020
50a6bd9
Update service name for SavePostValidationEvent and add to PHPSTORM_META
westonruter Dec 29, 2020
a53afa5
Make CronBasedBackgroundTask non-Conditional
johnwatkins0 Dec 29, 2020
64f88ad
Merge branch 'feature/1756-validation-cron' of https://github.com/amp…
johnwatkins0 Dec 29, 2020
37d5041
Remove obsolete test assertion
johnwatkins0 Dec 29, 2020
6b4a537
Reduce URLValidationCron frequency to daily
westonruter Dec 30, 2020
f424735
Fix ability for BackgroundTaskDeactivator to unschedule hooks
westonruter Dec 30, 2020
2b49211
Make RecurringBackgroundTask::schedule_event() final
westonruter Dec 30, 2020
ef173e2
Guard against empty post ID causing global post to be returned by get…
westonruter Dec 30, 2020
ab4e02c
Mark URLValidationProvider and ScannableURLProvider as internal
westonruter Dec 30, 2020
035e99c
Ensure amp_url_validation_limit_per_type filter returns int
westonruter Dec 30, 2020
f64e4ab
Simplify logic to ensure -1 <= limit_per_type <= PHP_INT_MAX
westonruter Dec 30, 2020
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
3 changes: 3 additions & 0 deletions .phpstorm.meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
'server_timing' => \AmpProject\AmpWP\Instrumentation\ServerTiming::class,
'site_health_integration' => \AmpProject\AmpWP\Admin\SiteHealth::class,
'validated_url_stylesheet_gc' => \AmpProject\AmpWP\BackgroundTask\ValidatedUrlStylesheetDataGarbageCollection::class,
'url_validation_cron' => \AmpProject\AmpWP\Validation\URLValidationCron::class,
'save_post_validation_event' => \AmpProject\AmpWP\Validation\SavePostValidationEvent::class,
'background_task_deactivator' => \AmpProject\AmpWP\BackgroundTask\BackgroundTaskDeactivator::class,
] )
);

Expand Down
2 changes: 0 additions & 2 deletions docs/class/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

310 changes: 0 additions & 310 deletions docs/class/Validation/ScannableURLProvider.md

This file was deleted.

Loading