-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
240 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,5 +66,5 @@ checks: | |
argument_type_checks: true | ||
|
||
filter: | ||
paths: [code/*, tests/*] | ||
paths: [src/*, tests/*] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
Name: updatecheckerextensions | ||
--- | ||
ComposerPackageVersion: | ||
extensions: | ||
- BringYourOwnIdeas\UpdateChecker\Extensions\ComposerUpdateExtension |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="SilverStripe"> | ||
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description> | ||
|
||
<!-- base rules are PSR-2 --> | ||
<rule ref="PSR2" > | ||
<!-- Current exclusions --> | ||
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" /> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
namespace BringYourOwnIdeas\UpdateChecker\Extensions; | ||
|
||
use CheckComposerUpdatesJob; | ||
use DataExtension; | ||
use Injector; | ||
use QueuedJobService; | ||
|
||
/** | ||
* Describes any available updates to an installed Composer package | ||
* | ||
* Originally from https://github.com/XploreNet/silverstripe-composerupdates | ||
*/ | ||
class ComposerUpdateExtension extends DataExtension | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $jobName = 'CheckComposerUpdatesJob'; | ||
|
||
private static $db = [ | ||
'LatestVersion' => 'Varchar', | ||
]; | ||
|
||
private static $summary_fields = [ | ||
'LatestVersion', | ||
]; | ||
|
||
/** | ||
* Automatically schedule a self update job on dev/build | ||
*/ | ||
public function requireDefaultRecords() | ||
{ | ||
Injector::inst() | ||
->get(QueuedJobService::class) | ||
->queueJob(new CheckComposerUpdatesJob()); | ||
} | ||
|
||
/** | ||
* Return the name of the related job | ||
* | ||
* @return string | ||
*/ | ||
public function getJobName() | ||
{ | ||
return $this->jobName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.