Skip to content

Commit

Permalink
feat: silverstripe 5
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Sep 8, 2023
1 parent 1f0286e commit aca2c32
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 40 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
ci:
name: CI
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.DS_Store
.DS_Store
/vendor/
/public/
/composer.lock
/.phpunit.result.cache
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# AddressFinder for Silverstripe

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/fullscreeninteractive/silverstripe-addressfinder/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/fullscreeninteractive/silverstripe-addressfinder/?branch=master)
[![Build Status](https://travis-ci.org/fullscreeninteractive/silverstripe-addressfinder.svg?branch=master)](https://travis-ci.org/fullscreeninteractive/silverstripe-addressfinder)
[![Latest Stable Version](https://poser.pugx.org/fullscreeninteractive/silverstripe-addressfinder/v/stable)](https://packagist.org/packages/fullscreeninteractive/silverstripe-addressfinder)

## Maintainer Contact
* Will Rossiter
<will (at) fullscreen (dot) io>

## Requirements
* SilverStripe 4.0 or higher

## Overview

This module provides a custom Silverstripe `AddressFinderField` which implements the
Expand All @@ -19,7 +15,7 @@ javascript AddressFinder widget ([1](http://addressfinder.co.nz/docs/widget_docs
## Getting Started

```
composer require fullscreeninteractive/silverstripe-addressfinder ^1
composer require fullscreeninteractive/silverstripe-addressfinder
```

* Sign up for an NZ account at [addressfinder.nz/plans/](https://www.addressfinder.nz/plans/), or an Australia plan at [addressfinder.com.au/plans/](https://www.addressfinder.com.au/plans/)
Expand Down Expand Up @@ -95,7 +91,7 @@ class AddressObject extends DataObject
}
```

To prefix these fields, call `setFieldPrefix($prefix)` on your `AddressFinderField`
To prefix these fields, call `setFieldPrefix($prefix)` on your `AddressFinderField`
instance.

```php
Expand Down
12 changes: 9 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"homepage": "https://www.fullscreen.io"
}],
"require": {
"silverstripe/framework": "^4"
"silverstripe/framework": "^5"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
"phpunit/phpunit": "^9.6"
},
"autoload": {
"psr-4": {
Expand All @@ -31,5 +31,11 @@
"lint-clean": "phpcbf src/ tests/"
},
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"config": {
"allow-plugins": {
"composer/installers": true,
"silverstripe/vendor-plugin": true
}
}
}
2 changes: 1 addition & 1 deletion tests/AddressFinderFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testSetRequireLatLngManual()

$fieldHolder = $field->FieldHolder();

$this->assertContains('input type="text" name="name[Longitude]"', $fieldHolder);
$this->assertStringContainsString('input type="text" name="name[Longitude]"', $fieldHolder);
}

public function testValidator()
Expand Down

0 comments on commit aca2c32

Please sign in to comment.