These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Describes an available update to an installed Composer package |
||
4 | * |
||
5 | * Originally from https://github.com/XploreNet/silverstripe-composerupdates |
||
6 | * |
||
7 | * @author Matt Dwen |
||
8 | * @license MIT |
||
9 | */ |
||
10 | class ComposerUpdate extends DataObject |
||
0 ignored issues
–
show
|
|||
11 | { |
||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | private static $db = array( |
||
0 ignored issues
–
show
|
|||
16 | 'Name' => 'Varchar(255)', |
||
17 | 'Installed' => 'Varchar(255)', |
||
18 | 'Available' => 'Varchar(255)', |
||
19 | ); |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | private static $summary_fields = array( |
||
0 ignored issues
–
show
|
|||
25 | 'Name' => 'Package', |
||
26 | 'Installed', |
||
27 | 'Available', |
||
28 | ); |
||
29 | |||
30 | /** |
||
31 | * name of the related job |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | public $jobName = 'CheckComposerUpdatesJob'; |
||
36 | |||
37 | /** |
||
38 | * self update on dev/build |
||
39 | */ |
||
40 | public function requireDefaultRecords() |
||
41 | { |
||
42 | parent::requireDefaultRecords(); |
||
43 | |||
44 | // add a queuedjob on dev/build |
||
45 | singleton('QueuedJobService')->queueJob(new CheckComposerUpdatesJob()); |
||
46 | } |
||
47 | } |
||
48 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.