diff --git a/.scrutinizer.yml b/.scrutinizer.yml index d1ebd80..f77754e 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,69 +1,31 @@ inherit: true -checks: +#Copied from https://www.adayinthelifeof.nl/2013/11/20/external-code-coverage-with-travis-scrutinizer/ +tools: + external_code_coverage: + timeout: 600 + php_code_sniffer: + config: + standard: PSR2 + php_cs_fixer: + extensions: + # Default: + - php + fixers: [] + enabled: false + filter: + paths: [tests/*,code/*] + excluded_paths: [] +coding_style: php: - verify_property_names: true - verify_argument_usable_as_reference: true - verify_access_scope_valid: true - useless_calls: true - use_statement_alias_conflict: true - variable_existence: true - unused_variables: true - unused_properties: true - unused_parameters: true - unused_methods: true - unreachable_code: true - too_many_arguments: true - sql_injection_vulnerabilities: true - simplify_boolean_return: true - side_effects_or_types: true - security_vulnerabilities: true - return_doc_comments: true - return_doc_comment_if_not_inferrable: true - require_scope_for_properties: true - require_scope_for_methods: true - require_php_tag_first: true - psr2_switch_declaration: true - psr2_class_declaration: true - property_assignments: true - prefer_while_loop_over_for_loop: true - precedence_mistakes: true - precedence_in_conditions: true - phpunit_assertions: true - php5_style_constructor: true - parse_doc_comments: true - parameter_non_unique: true - parameter_doc_comments: true - param_doc_comment_if_not_inferrable: true - optional_parameters_at_the_end: true - one_class_per_file: true - no_unnecessary_if: true - no_trailing_whitespace: true - no_property_on_interface: true - no_non_implemented_abstract_methods: true - no_error_suppression: true - no_duplicate_arguments: true - no_commented_out_code: true - newline_at_end_of_file: true - missing_arguments: true - method_calls_on_non_object: true - instanceof_class_exists: true - foreach_traversable: true - fix_line_ending: true - fix_doc_comments: true - duplication: true - deprecated_code_usage: true - deadlock_detection_in_loops: true - code_rating: true - closure_use_not_conflicting: true - catch_class_exists: true - blank_line_after_namespace_declaration: false - avoid_multiple_statements_on_same_line: true - avoid_duplicate_types: true - avoid_conflicting_incrementers: true - avoid_closing_tag: true - assignment_of_null_return: true - argument_type_checks: true + indentation: + general: + use_tabs: false + +checks: + php: + code_rating: true + duplication: true filter: - paths: [code/*, tests/*] + paths: [tests/*,code/*] \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 2eecbb2..4e2cf48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ + language: php sudo: false @@ -7,9 +8,6 @@ addons: packages: - tidy -php: - - 7.0 - before_install: - pip install --user codecov @@ -21,16 +19,17 @@ env: matrix: include: - - php: 5.6 - env: DB=MYSQL COVERAGE=1 - - php: 5.6 - env: DB=PGSQL - - php: 5.6 - env: DB=SQLITE - - php: hhvm - env: DB=MYSQL + - php: 5.6 + env: DB=SQLITE + - php: 5.6 + env: DB=PGSQL + - php: 5.6 + env: COVERAGE=1 + - php: 7.0 + env: CORE_RELEASE=master allow_failures: - - php: 7.0 + - php: 7.0 + env: CORE_RELEASE=master before_script: @@ -52,4 +51,3 @@ after_script: - cd ~/build/$TRAVIS_REPO_SLUG - wget https://scrutinizer-ci.com/ocular.phar - "if [ \"$COVERAGE\" = \"1\" ]; then travis_retry codecov && travis_retry php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi" - diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..694e274 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,197 @@ +# Change Log + +## [2.0.0-beta1](https://github.com/dynamic/silverstripe-locator/tree/2.0.0-beta1) (2017-03-17) +[Full Changelog](https://github.com/dynamic/silverstripe-locator/compare/2.0.0-alpha2...2.0.0-beta1) + +**Implemented enhancements:** + +- Location - add versioning [\#140](https://github.com/dynamic/silverstripe-locator/issues/140) +- Map - option not to show locations on page load [\#129](https://github.com/dynamic/silverstripe-locator/issues/129) +- LocationSearchForm - Radius Dropdown [\#128](https://github.com/dynamic/silverstripe-locator/issues/128) + +**Closed issues:** + +- BUG html template config referencing Locator not Locator\_Controller [\#136](https://github.com/dynamic/silverstripe-locator/issues/136) +- LocationCategory - permission control [\#133](https://github.com/dynamic/silverstripe-locator/issues/133) +- Updated third party JS [\#120](https://github.com/dynamic/silverstripe-locator/issues/120) +- REFACTOR onBeforeWrite\(\) to add defaults if needed [\#71](https://github.com/dynamic/silverstripe-locator/issues/71) +- ENHANCEMENT: Map - remove advanced map options [\#66](https://github.com/dynamic/silverstripe-locator/issues/66) + +**Merged pull requests:** + +- ENHANCEMENT LocatorForm required fields [\#147](https://github.com/dynamic/silverstripe-locator/pull/147) ([muskie9](https://github.com/muskie9)) +- Composer - update Author [\#146](https://github.com/dynamic/silverstripe-locator/pull/146) ([jsirish](https://github.com/jsirish)) +- Locator - filter by radius [\#145](https://github.com/dynamic/silverstripe-locator/pull/145) ([jsirish](https://github.com/jsirish)) +- Update store locator JS [\#142](https://github.com/dynamic/silverstripe-locator/pull/142) ([jsirish](https://github.com/jsirish)) +- Location - versioning [\#141](https://github.com/dynamic/silverstripe-locator/pull/141) ([jsirish](https://github.com/jsirish)) +- LocationCategory - permissions [\#139](https://github.com/dynamic/silverstripe-locator/pull/139) ([jsirish](https://github.com/jsirish)) +- BUGFIX html template config incorrect reference [\#137](https://github.com/dynamic/silverstripe-locator/pull/137) ([muskie9](https://github.com/muskie9)) + +## [2.0.0-alpha2](https://github.com/dynamic/silverstripe-locator/tree/2.0.0-alpha2) (2016-12-16) +[Full Changelog](https://github.com/dynamic/silverstripe-locator/compare/2.0.0-alpha1...2.0.0-alpha2) + +**Closed issues:** + +- Postcode form field [\#127](https://github.com/dynamic/silverstripe-locator/issues/127) + +**Merged pull requests:** + +- SS4 namespacing update [\#134](https://github.com/dynamic/silverstripe-locator/pull/134) ([jsirish](https://github.com/jsirish)) +- BUGFIX template path config not respecting updates [\#132](https://github.com/dynamic/silverstripe-locator/pull/132) ([muskie9](https://github.com/muskie9)) +- ENHANCEMENT allow for setting location query class at runtime [\#125](https://github.com/dynamic/silverstripe-locator/pull/125) ([muskie9](https://github.com/muskie9)) +- BUGFIX: storeLocator.js - pareseFloat distance [\#124](https://github.com/dynamic/silverstripe-locator/pull/124) ([jsirish](https://github.com/jsirish)) + +## [2.0.0-alpha1](https://github.com/dynamic/silverstripe-locator/tree/2.0.0-alpha1) (2016-10-10) +[Full Changelog](https://github.com/dynamic/silverstripe-locator/compare/1.2.1...2.0.0-alpha1) + +**Implemented enhancements:** + +- ENHANCEMENT radius query via ORM [\#106](https://github.com/dynamic/silverstripe-locator/issues/106) +- ENHANCEMENT use SilverStripe form to serve up the filter form [\#72](https://github.com/dynamic/silverstripe-locator/issues/72) + +**Closed issues:** + +- REFACTOR use php to calculate result radius [\#107](https://github.com/dynamic/silverstripe-locator/issues/107) + +**Merged pull requests:** + +- Locator - filter initial data set by PageCategories [\#123](https://github.com/dynamic/silverstripe-locator/pull/123) ([jsirish](https://github.com/jsirish)) +- Import - Import\_ID duplicate check [\#122](https://github.com/dynamic/silverstripe-locator/pull/122) ([jsirish](https://github.com/jsirish)) +- ENHANCEMENT branch alias for dev-master [\#119](https://github.com/dynamic/silverstripe-locator/pull/119) ([muskie9](https://github.com/muskie9)) +- REFACTOR extends methods [\#114](https://github.com/dynamic/silverstripe-locator/pull/114) ([muskie9](https://github.com/muskie9)) +- REFACTOR extend calls and setters to use ArrayData [\#112](https://github.com/dynamic/silverstripe-locator/pull/112) ([muskie9](https://github.com/muskie9)) +- BUGFIX incorrect chrome detection [\#111](https://github.com/dynamic/silverstripe-locator/pull/111) ([muskie9](https://github.com/muskie9)) +- DistanceDataExtension - calculate distance [\#108](https://github.com/dynamic/silverstripe-locator/pull/108) ([jsirish](https://github.com/jsirish)) +- REFACTOR docblocks [\#104](https://github.com/dynamic/silverstripe-locator/pull/104) ([muskie9](https://github.com/muskie9)) +- REFACTOR permission checks and tests [\#103](https://github.com/dynamic/silverstripe-locator/pull/103) ([muskie9](https://github.com/muskie9)) +- PHP Location filtering [\#88](https://github.com/dynamic/silverstripe-locator/pull/88) ([jsirish](https://github.com/jsirish)) + +## [1.2.1](https://github.com/dynamic/silverstripe-locator/tree/1.2.1) (2016-07-26) +[Full Changelog](https://github.com/dynamic/silverstripe-locator/compare/1.2.0...1.2.1) + +**Closed issues:** + +- REFACTOR LocationTest to extend SapphireTest [\#101](https://github.com/dynamic/silverstripe-locator/issues/101) +- The "Postal Code" field only accepts Zip codes. [\#98](https://github.com/dynamic/silverstripe-locator/issues/98) + +**Merged pull requests:** + +- REFACTOR permission checks and tests [\#102](https://github.com/dynamic/silverstripe-locator/pull/102) ([muskie9](https://github.com/muskie9)) +- REFACTOR docblocks [\#100](https://github.com/dynamic/silverstripe-locator/pull/100) ([muskie9](https://github.com/muskie9)) +- REFACTOR various class names and method call names [\#99](https://github.com/dynamic/silverstripe-locator/pull/99) ([muskie9](https://github.com/muskie9)) + +## [1.2.0](https://github.com/dynamic/silverstripe-locator/tree/1.2.0) (2016-04-11) +[Full Changelog](https://github.com/dynamic/silverstripe-locator/compare/1.1.1...1.2.0) + +**Implemented enhancements:** + +- Locator: CMS Design [\#96](https://github.com/dynamic/silverstripe-locator/issues/96) +- ENHANCEMENT - CONTRIBUTING.md file [\#91](https://github.com/dynamic/silverstripe-locator/issues/91) +- ENHANCEMENT - LICENSE.md [\#89](https://github.com/dynamic/silverstripe-locator/issues/89) +- ENHANCEMENT: Google Maps API Key [\#85](https://github.com/dynamic/silverstripe-locator/issues/85) +- Continuous Integration [\#82](https://github.com/dynamic/silverstripe-locator/issues/82) +- ENHANCEMENT: Lock down map options [\#73](https://github.com/dynamic/silverstripe-locator/issues/73) +- ENHANCEMENT - Search - do all filtering server side [\#65](https://github.com/dynamic/silverstripe-locator/issues/65) +- Locator page - allow multiple Locators on site, show different locations [\#57](https://github.com/dynamic/silverstripe-locator/issues/57) +- Location - CMS Fields layout [\#55](https://github.com/dynamic/silverstripe-locator/issues/55) +- Locator - allow filter by LocationCategory [\#67](https://github.com/dynamic/silverstripe-locator/pull/67) ([jsirish](https://github.com/jsirish)) +- Location - CMS field layout [\#64](https://github.com/dynamic/silverstripe-locator/pull/64) ([jsirish](https://github.com/jsirish)) + +**Closed issues:** + +- ENHANCEMENT - Documentation [\#93](https://github.com/dynamic/silverstripe-locator/issues/93) +- 3.2 compatibility [\#68](https://github.com/dynamic/silverstripe-locator/issues/68) +- remove extra closing div in layout [\#62](https://github.com/dynamic/silverstripe-locator/issues/62) +- Import/Export doesn't match [\#59](https://github.com/dynamic/silverstripe-locator/issues/59) + +**Merged pull requests:** + +- Locator - CMS Design [\#97](https://github.com/dynamic/silverstripe-locator/pull/97) ([jsirish](https://github.com/jsirish)) +- Documentation [\#94](https://github.com/dynamic/silverstripe-locator/pull/94) ([jsirish](https://github.com/jsirish)) +- CONTRIBUTING.md [\#92](https://github.com/dynamic/silverstripe-locator/pull/92) ([jsirish](https://github.com/jsirish)) +- LICENSE.md [\#90](https://github.com/dynamic/silverstripe-locator/pull/90) ([jsirish](https://github.com/jsirish)) +- Google API Key [\#87](https://github.com/dynamic/silverstripe-locator/pull/87) ([jsirish](https://github.com/jsirish)) +- PSR2-2 formatting [\#86](https://github.com/dynamic/silverstripe-locator/pull/86) ([jsirish](https://github.com/jsirish)) +- BUGFIX: ReadMe - Travis badge fix [\#84](https://github.com/dynamic/silverstripe-locator/pull/84) ([jsirish](https://github.com/jsirish)) +- Continuous Improvement setup [\#83](https://github.com/dynamic/silverstripe-locator/pull/83) ([jsirish](https://github.com/jsirish)) +- Added standard Scrutinizer config [\#79](https://github.com/dynamic/silverstripe-locator/pull/79) ([helpfulrobot](https://github.com/helpfulrobot)) +- ENHANCEMENT: Composer - allow for SilverStripe 3.2 [\#77](https://github.com/dynamic/silverstripe-locator/pull/77) ([jsirish](https://github.com/jsirish)) +- Added standard .gitattributes file [\#76](https://github.com/dynamic/silverstripe-locator/pull/76) ([helpfulrobot](https://github.com/helpfulrobot)) +- BUGFIX: Locator.ss - extra `\` tag [\#75](https://github.com/dynamic/silverstripe-locator/pull/75) ([jsirish](https://github.com/jsirish)) +- ENHANCEMENT: composer update - added additional keywords [\#74](https://github.com/dynamic/silverstripe-locator/pull/74) ([jsirish](https://github.com/jsirish)) +- Added standard .editorconfig file [\#69](https://github.com/dynamic/silverstripe-locator/pull/69) ([helpfulrobot](https://github.com/helpfulrobot)) +- Import/Export Sync [\#63](https://github.com/dynamic/silverstripe-locator/pull/63) ([jsirish](https://github.com/jsirish)) + +## [1.1.1](https://github.com/dynamic/silverstripe-locator/tree/1.1.1) (2015-07-21) +[Full Changelog](https://github.com/dynamic/silverstripe-locator/compare/1.1.0...1.1.1) + +**Implemented enhancements:** + +- ENHANCEMENT add travis-ci integration [\#45](https://github.com/dynamic/silverstripe-locator/issues/45) +- Add category support [\#44](https://github.com/dynamic/silverstripe-locator/issues/44) + +**Closed issues:** + +- location can't be linked to multiple locaters [\#42](https://github.com/dynamic/silverstripe-locator/issues/42) +- adding existing location to a locatorpage adds a new instance of the location in modeladmin [\#41](https://github.com/dynamic/silverstripe-locator/issues/41) +- multiple locator pages on single site [\#37](https://github.com/dynamic/silverstripe-locator/issues/37) + +**Merged pull requests:** + +- Locator - file path fix [\#61](https://github.com/dynamic/silverstripe-locator/pull/61) ([jsirish](https://github.com/jsirish)) +- Update statics from public to private [\#60](https://github.com/dynamic/silverstripe-locator/pull/60) ([muskie9](https://github.com/muskie9)) +- Revert locator to non-relation \(single locator page\) [\#53](https://github.com/dynamic/silverstripe-locator/pull/53) ([muskie9](https://github.com/muskie9)) +- Re-add travis badge [\#52](https://github.com/dynamic/silverstripe-locator/pull/52) ([muskie9](https://github.com/muskie9)) +- Update badges [\#51](https://github.com/dynamic/silverstripe-locator/pull/51) ([muskie9](https://github.com/muskie9)) +- Update Locator to include getAllCategories method [\#50](https://github.com/dynamic/silverstripe-locator/pull/50) ([muskie9](https://github.com/muskie9)) +- Update .travis.yml to include SQLITE [\#49](https://github.com/dynamic/silverstripe-locator/pull/49) ([muskie9](https://github.com/muskie9)) +- Update README to include Travis and CodeClimage badges [\#48](https://github.com/dynamic/silverstripe-locator/pull/48) ([muskie9](https://github.com/muskie9)) +- Add LocationTest and travis support [\#47](https://github.com/dynamic/silverstripe-locator/pull/47) ([muskie9](https://github.com/muskie9)) + +## [1.1.0](https://github.com/dynamic/silverstripe-locator/tree/1.1.0) (2014-10-24) +[Full Changelog](https://github.com/dynamic/silverstripe-locator/compare/1.0.0...1.1.0) + +**Closed issues:** + +- Test ticket from Code Climate [\#38](https://github.com/dynamic/silverstripe-locator/issues/38) +- Full Map Search [\#33](https://github.com/dynamic/silverstripe-locator/issues/33) +- map zoom icons not entirely visible [\#32](https://github.com/dynamic/silverstripe-locator/issues/32) +- Address search in Full Map Mode [\#28](https://github.com/dynamic/silverstripe-locator/issues/28) +- Permission Provider in Location [\#27](https://github.com/dynamic/silverstripe-locator/issues/27) +- Location: Searchable Fields [\#26](https://github.com/dynamic/silverstripe-locator/issues/26) +- Update store locator jQuery plugin to v1.4.9 [\#22](https://github.com/dynamic/silverstripe-locator/issues/22) +- Category filter [\#19](https://github.com/dynamic/silverstripe-locator/issues/19) +- Add permission provider options [\#17](https://github.com/dynamic/silverstripe-locator/issues/17) +- Can't update listTemplatePath or infowindowTemplatePath [\#16](https://github.com/dynamic/silverstripe-locator/issues/16) +- Limited FieldList options due to lack of extend\('updateCMSFields', $fields\) [\#13](https://github.com/dynamic/silverstripe-locator/issues/13) +- Bug in search/max distance [\#12](https://github.com/dynamic/silverstripe-locator/issues/12) +- Option to show mi or km for distance [\#11](https://github.com/dynamic/silverstripe-locator/issues/11) +- No Locations Indication in template [\#8](https://github.com/dynamic/silverstripe-locator/issues/8) +- No Locations Indication in template [\#7](https://github.com/dynamic/silverstripe-locator/issues/7) +- Default Templates [\#3](https://github.com/dynamic/silverstripe-locator/issues/3) + +**Merged pull requests:** + +- Update allowing multiple locator pages [\#40](https://github.com/dynamic/silverstripe-locator/pull/40) ([muskie9](https://github.com/muskie9)) +- Update Locator to allow for km units [\#36](https://github.com/dynamic/silverstripe-locator/pull/36) ([muskie9](https://github.com/muskie9)) +- Update locator js to limit search results on form submission [\#35](https://github.com/dynamic/silverstripe-locator/pull/35) ([muskie9](https://github.com/muskie9)) +- Update Locator to handle null locations [\#31](https://github.com/dynamic/silverstripe-locator/pull/31) ([muskie9](https://github.com/muskie9)) +- Update Location to implement PermissionProvider [\#30](https://github.com/dynamic/silverstripe-locator/pull/30) ([muskie9](https://github.com/muskie9)) +- Location - added searchable\_fields, modified summary\_fields [\#29](https://github.com/dynamic/silverstripe-locator/pull/29) ([jsirish](https://github.com/jsirish)) +- Update store locator plugin to latest version [\#25](https://github.com/dynamic/silverstripe-locator/pull/25) ([muskie9](https://github.com/muskie9)) +- Update Locator to support greater template customization [\#20](https://github.com/dynamic/silverstripe-locator/pull/20) ([muskie9](https://github.com/muskie9)) +- Update getCMSFields to leverage extend\('updateCMSFields'\) [\#15](https://github.com/dynamic/silverstripe-locator/pull/15) ([muskie9](https://github.com/muskie9)) +- Removed absolute paths from init js [\#9](https://github.com/dynamic/silverstripe-locator/pull/9) ([tardinha](https://github.com/tardinha)) + +## [1.0.0](https://github.com/dynamic/silverstripe-locator/tree/1.0.0) (2013-05-07) +**Closed issues:** + +- Add filter by Category [\#6](https://github.com/dynamic/silverstripe-locator/issues/6) +- Locations via API [\#5](https://github.com/dynamic/silverstripe-locator/issues/5) +- Locator Page options [\#4](https://github.com/dynamic/silverstripe-locator/issues/4) +- jQuery Store Locator Plugin [\#2](https://github.com/dynamic/silverstripe-locator/issues/2) +- CMS Fields [\#1](https://github.com/dynamic/silverstripe-locator/issues/1) + + + +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file