-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update module for support with php8 and newer
- Loading branch information
Showing
16 changed files
with
158 additions
and
58 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# For more information about the properties used in this file, | ||
# please see the EditorConfig documentation: | ||
# http://editorconfig.org | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[{*.yml,package.json,*.js,*.scss,*.feature}] | ||
indent_size = 2 | ||
|
||
# The indent size used in the package.json file cannot be changed: | ||
# https://github.com/npm/npm/pull/3180#issuecomment-16336516 |
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,17 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
ci: | ||
name: CI | ||
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 | ||
with: | ||
dynamic_matrix: false | ||
extra_jobs: | | ||
- php: '8.1' | ||
db: mysql80 | ||
phpunit: true |
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,4 @@ | ||
/vendor | ||
/composer.lock | ||
/public | ||
.phpunit.result.cache |
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 |
---|---|---|
@@ -1,23 +1,36 @@ | ||
{ | ||
"name": "heyday/silverstripe-vend", | ||
"description": "Provides Vend API integration for SilverStripe", | ||
"type": "silverstripe-module", | ||
"homepage": "http://github.com/heyday/silverstripe-vend", | ||
"keywords": ["silverstripe", "Vend", "VendAPI"], | ||
"license": "BSD-3-Clause", | ||
"authors": [ | ||
{ | ||
"name": "Ben Dubuisson", | ||
"email": "[email protected]" | ||
"name": "heyday/silverstripe-vend", | ||
"description": "Provides Vend API integration for SilverStripe", | ||
"type": "silverstripe-vendormodule", | ||
"homepage": "http://github.com/heyday/silverstripe-vend", | ||
"keywords": [ | ||
"silverstripe", | ||
"Vend", | ||
"VendAPI" | ||
], | ||
"license": "BSD-3-Clause", | ||
"support": { | ||
"issues": "http://github.com/heyday/silverstripe-vend/issues" | ||
}, | ||
"require": { | ||
"silverstripe/framework": "^4 || ^5", | ||
"silverstripe/admin": "*", | ||
"silverstripe/siteconfig": "*", | ||
"anytech/vendapi": "dev-master" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Heyday\\Vend\\": "src/", | ||
"Heyday\\Vend\\Tests\\": "tests/" | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"composer/installers": true, | ||
"silverstripe/vendor-plugin": true | ||
} | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^9.6" | ||
} | ||
], | ||
"support": { | ||
"issues": "http://github.com/heyday/silverstripe-vend/issues" | ||
}, | ||
"require": { | ||
"vendapi/vendapi": "dev-ss4-upgrade" | ||
}, | ||
"autoload": { | ||
"psr-4": { "Heyday\\Vend\\": "src/" } | ||
} | ||
} |
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,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage includeUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src/.</directory> | ||
</include> | ||
<exclude> | ||
<directory suffix=".php">tests/</directory> | ||
</exclude> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Default"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
namespace Heyday\Vend\Exceptions; | ||
|
||
/** | ||
|
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
namespace Heyday\Vend\Exceptions; | ||
|
||
/** | ||
|
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
9 changes: 4 additions & 5 deletions
9
src/SilverStripe/SiteConfig.php → src/SilverStripe/SiteConfigExtension.php
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 |
---|---|---|
@@ -1,19 +1,18 @@ | ||
<?php | ||
|
||
namespace Heyday\Vend\SilverStripe; | ||
|
||
use SilverStripe\ORM\DataExtension; | ||
|
||
/** | ||
* Class VendConfig | ||
*/ | ||
class SiteConfig extends DataExtension | ||
class SiteConfigExtension extends DataExtension | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
private static $db = array( | ||
private static $db = [ | ||
'VendShopName' => 'Varchar(255)' | ||
); | ||
|
||
]; | ||
} | ||
|
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,20 @@ | ||
<?php | ||
|
||
namespace Heyday\Vend\Tests; | ||
|
||
use Heyday\Vend\SilverStripe\SetupForm; | ||
use SilverStripe\Control\Controller; | ||
use SilverStripe\Dev\SapphireTest; | ||
|
||
class SetupFormTest extends SapphireTest | ||
{ | ||
protected $usesDatabase = true; | ||
|
||
public function testRenderForm() | ||
{ | ||
$form = new SetupForm(new Controller(), 'VendSetupForm'); | ||
|
||
$this->assertNotNull($form); | ||
$this->assertNotNull($form->Fields()); | ||
} | ||
} |