Compare commits
25 Commits
Author | SHA1 | Date |
---|---|---|
Maxime Rainville | a60fc4cf24 | |
Steve Boyd | d2fbce5319 | |
Steve Boyd | beb0f84f2d | |
Guy Sartorelli | 6d5c35116a | |
Steve Boyd | 41fd4718a2 | |
Steve Boyd | 448828c20a | |
Guy Sartorelli | faf9d033ff | |
Steve Boyd | d7b4ccb202 | |
Guy Sartorelli | c9bce8fe57 | |
Sabina Talipova | 4bbabf2421 | |
Steve Boyd | 22e3951244 | |
Steve Boyd | 321d0d853b | |
Guy Sartorelli | 84e13ffde3 | |
Steve Boyd | 17e9f5388c | |
Steve Boyd | 222f20529c | |
Steve Boyd | c46272e751 | |
Steve Boyd | afec73997a | |
Steve Boyd | d3c8e2915e | |
Steve Boyd | a709a741b0 | |
Maxime Rainville | dd4df9800b | |
Steve Boyd | 082742ad23 | |
Robbie Averill | a7c3450d43 | |
Robbie Averill | 0be39423a3 | |
Maxime Rainville | 3e38f845e3 | |
Ingo Schommer | 66376db094 |
|
@ -0,0 +1,25 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: CI
|
||||
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
|
||||
with:
|
||||
# set phpunit to false to prevent automatic generation of mysql phpunit jobs
|
||||
phpunit: false
|
||||
extra_jobs: |
|
||||
- php: 7.4
|
||||
db: pgsql
|
||||
phpunit: true
|
||||
composer_args: --prefer-lowest
|
||||
- php: 8.0
|
||||
db: pgsql
|
||||
phpunit: true
|
||||
- php: 8.1
|
||||
db: pgsql
|
||||
phpunit: true
|
|
@ -0,0 +1,16 @@
|
|||
name: Dispatch CI
|
||||
|
||||
on:
|
||||
# At 12:20 PM UTC, only on Thursday and Friday
|
||||
schedule:
|
||||
- cron: '20 12 * * 4,5'
|
||||
|
||||
jobs:
|
||||
dispatch-ci:
|
||||
name: Dispatch CI
|
||||
# Only run cron on the silverstripe account
|
||||
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dispatch CI
|
||||
uses: silverstripe/gha-dispatch-ci@v1
|
|
@ -0,0 +1,17 @@
|
|||
name: Keepalive
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# The 4th of every month at 10:50am UTC
|
||||
schedule:
|
||||
- cron: '50 10 4 * *'
|
||||
|
||||
jobs:
|
||||
keepalive:
|
||||
name: Keepalive
|
||||
# Only run cron on the silverstripe account
|
||||
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Keepalive
|
||||
uses: silverstripe/gha-keepalive@v1
|
|
@ -1,15 +0,0 @@
|
|||
inherit: true
|
||||
|
||||
build:
|
||||
nodes:
|
||||
analysis:
|
||||
tests:
|
||||
override: [php-scrutinizer-run]
|
||||
|
||||
checks:
|
||||
php:
|
||||
code_rating: true
|
||||
duplication: true
|
||||
|
||||
filter:
|
||||
paths: [code/*, tests/*]
|
53
.travis.yml
53
.travis.yml
|
@ -1,53 +0,0 @@
|
|||
language: php
|
||||
|
||||
dist: xenial
|
||||
|
||||
services:
|
||||
- postgresql
|
||||
-
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache/files
|
||||
|
||||
php:
|
||||
- 7.1
|
||||
|
||||
env:
|
||||
global:
|
||||
- DB="PGSQL"
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 7.1
|
||||
env:
|
||||
- PHPUNIT_TEST=framework
|
||||
- php: 7.2
|
||||
env:
|
||||
- PHPUNIT_TEST=framework
|
||||
- php: 7.3
|
||||
env:
|
||||
- PHPUNIT_TEST=framework
|
||||
- php: 7.1
|
||||
env:
|
||||
- PHPUNIT_TEST=postgresql
|
||||
- PHPCS_TEST=1
|
||||
|
||||
before_script:
|
||||
# Init PHP
|
||||
- phpenv rehash
|
||||
- phpenv config-rm xdebug.ini
|
||||
- export PATH=~/.composer/vendor/bin:$PATH
|
||||
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
|
||||
# Install composer dependencies
|
||||
- composer validate
|
||||
- composer require --no-update silverstripe/recipe-cms:4.3.x-dev
|
||||
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
||||
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
|
||||
|
||||
script:
|
||||
- if [[ $PHPUNIT_TEST == postgresql ]]; then vendor/bin/phpunit ./tests; fi
|
||||
- if [[ $PHPUNIT_TEST == framework ]]; then vendor/bin/phpunit ./vendor/silverstripe/framework/tests/php; fi
|
||||
- if [[ $PHPCS_TEST ]]; then composer run-script lint; fi
|
16
README.md
16
README.md
|
@ -1,15 +1,11 @@
|
|||
# PostgreSQL Module Module
|
||||
|
||||
[![Build Status](https://travis-ci.org/silverstripe/silverstripe-postgresql.png?branch=master)](https://travis-ci.org/silverstripe/silverstripe-postgresql)
|
||||
[![SilverStripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)
|
||||
|
||||
## Maintainer Contact
|
||||
|
||||
* Sam Minnee (Nickname: sminnee) <sam@silverstripe.com>
|
||||
[![CI](https://github.com/silverstripe/silverstripe-postgresql/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-postgresql/actions/workflows/ci.yml)
|
||||
[![Silverstripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)
|
||||
|
||||
## Requirements
|
||||
|
||||
* SilverStripe 4.0
|
||||
* Silverstripe 4.0
|
||||
* PostgreSQL >=9.2
|
||||
* Note: PostgreSQL 10 has not been tested
|
||||
|
||||
|
@ -47,6 +43,12 @@ See [docs/en](docs/en/README.md) for more information about configuring the modu
|
|||
All column and table names must be double-quoted. PostgreSQL automatically
|
||||
lower-cases columns, and your queries will fail if you don't.
|
||||
|
||||
Collations have known issues when installed on Alpine, MacOS X and BSD derivatives
|
||||
(see [PostgreSQL FAQ](https://wiki.postgresql.org/wiki/FAQ#Why_do_my_strings_sort_incorrectly.3F)).
|
||||
We do not support such installations, although they still may work correctly for you.
|
||||
As a workaround for PostgreSQL 10+ you could manually switch to ICU collations (e.g. und-x-icu).
|
||||
There are no known workarounds for PostgreSQL <10.
|
||||
|
||||
Ts_vector columns are not automatically detected by the built-in search
|
||||
filters. That means if you're doing a search through the CMS on a ModelAdmin
|
||||
object, it will use LIKE queries which are very slow. If you're writing your
|
||||
|
|
|
@ -858,7 +858,9 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||
$argList = array();
|
||||
$nextArg = "";
|
||||
foreach ($bytes as $byte) {
|
||||
if ($byte == "00") {
|
||||
if ($byte == '\x') {
|
||||
continue;
|
||||
} elseif ($byte == "00") {
|
||||
$argList[] = $nextArg;
|
||||
$nextArg = "";
|
||||
} else {
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
"silverstripe/vendor-plugin": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7"
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"squizlabs/php_codesniffer": "^3"
|
||||
},
|
||||
"extra": { },
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SilverStripe\\PostgreSQL\\": "code/",
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<ruleset name="SilverStripe">
|
||||
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description>
|
||||
|
||||
<file>code</file>
|
||||
<file>tests</file>
|
||||
|
||||
<!-- base rules are PSR-2 -->
|
||||
<rule ref="PSR2" >
|
||||
<!-- Current exclusions -->
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
|
||||
|
||||
<testsuite name="Default">
|
||||
|
|
Loading…
Reference in New Issue