Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
4aa4d87
Add docs for MysqlAdapter::FIRST constant
MasterOdin Oct 14, 2021
79492ef
review comments
MasterOdin Oct 15, 2021
ca72505
Merge pull request #2031 from cakephp/docs_first
dereuromark Oct 15, 2021
9008ac1
Support using mysql int constants on same types
MasterOdin Oct 15, 2021
46d2937
review comment
MasterOdin Oct 15, 2021
206f220
remove todo, rename function
MasterOdin Oct 24, 2021
5050dbd
Merge pull request #2032 from cakephp/mpeveler/bugfix-mysql-limit
dereuromark Oct 24, 2021
b791ba7
Change getPhinxType to use limits for integers if detected
Oct 27, 2021
c0d3b9a
Revert "Change getPhinxType to use limits for integers if detected"
Oct 27, 2021
a01ccf0
Capture case where getColumns returns physical limit for integer colu…
Oct 27, 2021
231b802
Remove attempt at capturing oversize INT width
Oct 27, 2021
757e2a5
Fixing style errors.
stickler-ci Oct 27, 2021
451aeb3
Remove surplus whitespace
Oct 27, 2021
77c86e2
Merge branch 'CorrectLimitsForSmallIntMySQL' of github.com:oprose/phi…
Oct 27, 2021
a683e38
Remove more surplus whitespace
Oct 27, 2021
dbb5a99
Reorganise tests into subgroups
Oct 28, 2021
2d79967
Comment out limit rewriting (pending removal)
Oct 28, 2021
88f356c
Commented sections removed
Nov 1, 2021
ac0a2fb
Add docs deploy via github actions.
markstory Nov 11, 2021
e71f2de
Only deploy docs on tags.
markstory Nov 11, 2021
9973b35
Merge pull request #2038 from oprose/CorrectLimitsForSmallIntMySQL
dereuromark Nov 12, 2021
630079e
Fix adding column to sqlite table created outside phinx
MasterOdin Nov 13, 2021
d2cc4be
Merge pull request #2039 from cakephp/bugfix_sqlite_create
dereuromark Nov 13, 2021
1ea6b02
Remove CMD from docs container.
markstory Nov 15, 2021
10ca315
Change incorrect reference to $this
LeeJenkinsFRU Nov 17, 2021
656e129
Merge pull request #2041 from LeeJenkinsFRU/patch-1
dereuromark Nov 17, 2021
d8a5db5
Clean up insert data doc example
MasterOdin Nov 18, 2021
4b18819
Merge pull request #2042 from cakephp/MasterOdin-patch-1
dereuromark Nov 18, 2021
72b3bca
check Symfony 6
saeideng Dec 4, 2021
5f30260
Merge pull request #2045 from cakephp/saeideng-patch-1
dereuromark Dec 4, 2021
9380acc
Add lowest dep check to CI (#2046)
dereuromark Dec 4, 2021
0ea695e
Do not print information output with option --no-info
Dec 13, 2021
b1f6d22
Fix docs spell error
DJAxel Dec 22, 2021
468c635
Merge pull request #2050 from DJAxel/patch-1
dereuromark Dec 22, 2021
aed7687
support cache query parameter
swiffer Dec 31, 2021
e0ac9f6
add support for mode
swiffer Jan 2, 2022
e49c9b0
improve tests for create command
LordSimal Jan 4, 2022
6ec64fc
Fix up allow-plugins config
dereuromark Jan 14, 2022
5c84466
Merge pull request #2062 from cakephp/bugfix/composer-v2.2
saeideng Jan 16, 2022
b5213f4
Merge pull request #2047 from aldump/add-option-to-hide-all-info-output
dereuromark Jan 21, 2022
b8df491
Merge pull request #2057 from cakephp/improve-create-tests
dereuromark Jan 21, 2022
f3ee4ae
Revert "improve tests for create command"
saeideng Jan 21, 2022
ad056cf
Merge pull request #2064 from cakephp/revert-2057-improve-create-tests
dereuromark Jan 21, 2022
d73fc67
do not force into using uri scheme if no params are set
swiffer Jan 22, 2022
b80ee4d
empty if not set
swiffer Jan 24, 2022
b882f78
feat(Postgres): Add full text search index types
Jan 27, 2022
bff508c
Fixing style errors.
stickler-ci Jan 27, 2022
498adcd
fix(Postgres): Update test. removes gist support
Jan 27, 2022
9132c63
Merge branch 'master' of https://github.com/antoniovj1/phinx
Jan 27, 2022
35ee97d
Fixing style errors.
stickler-ci Jan 27, 2022
12179a8
fix(Postgres): Add visibility to constant
Jan 27, 2022
31d79dc
doc(postgres): Add GIN index documentation
Jan 27, 2022
acdd859
Merge pull request #2066 from antoniovj1/master
dereuromark Jan 31, 2022
1e8bfd7
Merge pull request #2053 from swiffer/sqlite-params
dereuromark Jan 31, 2022
c81dfd7
Add workflow dispatch so I can rebuild docs & docs indexes.
markstory Feb 5, 2022
a153a2d
Bump phpstan
saeideng Mar 8, 2022
1202f16
Remove out-of-date translated docs
MasterOdin Mar 9, 2022
ce4a803
Merge pull request #2074 from cakephp/remove_translated_docs
dereuromark Mar 9, 2022
15be5d2
TEXT WRAPPER: Refactor shorthand ternary & add tests
sjokkateer Mar 13, 2022
6d8283e
Merge pull request #2075 from sjokkateer/refactor-elvis-into-disjunction
dereuromark Mar 14, 2022
137c802
fix phpstan errors
saeideng Mar 16, 2022
059d285
Merge pull request #2073 from cakephp/saeideng-patch-1
dereuromark Mar 16, 2022
2027a52
Fix some syntax errors.
ndm2 Mar 19, 2022
7573f85
Remove base TOC tree limits.
ndm2 Mar 19, 2022
9ddc16e
Merge pull request #2078 from ndm2/master-search-upgrage-preparation
markstory Mar 21, 2022
b21d590
Remove faker example from seeding docs (#2077)
saeideng Mar 21, 2022
2683c41
Update source files path.
ndm2 Mar 23, 2022
cde9715
Merge pull request #2079 from cakephp/ndm2-patch-1
ndm2 Mar 24, 2022
ebfbf97
update to PHPStan 1.5
LordSimal Mar 26, 2022
b686741
Merge pull request #2081 from cakephp/update-phpstan
dereuromark Mar 26, 2022
dd5fc8c
Add missing save call to renameColumn doc examples (#2080)
haraldernst Mar 26, 2022
b2452d3
Update SQLiteAdapter.php
swiffer Mar 29, 2022
6d469fc
Update phpstan-baseline.neon
swiffer Mar 29, 2022
b5d884e
Merge pull request #2083 from swiffer/patch-1
dereuromark Mar 29, 2022
69f3ca4
Update dependabot config
othercorey Apr 21, 2022
ee97f9f
Bump actions/checkout from 2 to 3
dependabot[bot] Apr 21, 2022
93272dc
Bump actions/cache from 1 to 3
dependabot[bot] Apr 21, 2022
3839127
Bump codecov/codecov-action from 1 to 3
dependabot[bot] Apr 21, 2022
146930e
Merge pull request #2086 from cakephp/dependabot/github_actions/actio…
othercorey Apr 21, 2022
4bd8852
Merge pull request #2087 from cakephp/dependabot/github_actions/actio…
othercorey Apr 21, 2022
48d8e1f
Merge pull request #2088 from cakephp/dependabot/github_actions/codec…
othercorey Apr 21, 2022
2046c44
Add setting DSN options for SqlServerAdapter (#2094)
ingLomeland Jul 3, 2022
8ad008e
Add php 8.2 to github actions and update versions
othercorey Jul 4, 2022
8ceeeaf
Merge pull request #2096 from cakephp/php-82
othercorey Jul 4, 2022
11ec6ee
Fix setting persistent option for PDO connection (#2092)
paulermo Jul 4, 2022
e9804ca
Update ci.yml
dereuromark Jul 4, 2022
bc2d695
Merge branch '0.x'
othercorey Jul 4, 2022
97721d7
Merge branch '0.x' into 0.next-merge
MasterOdin Jul 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@ updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
51 changes: 32 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
name: CI

on: ['push', 'pull_request']
on:
push:
branches:
- '0.x'
- '0.next'
- '1.x'
pull_request:

jobs:
testsuite:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php-version: ['7.2', '8.0', '8.1']
php-version: ['7.2', '7.4', '8.0', '8.1']
db-type: [sqlite, mysql, pgsql]
prefer-lowest: ['']
include:
- php-version: '8.2'
db-type: mysql
- php-version: '7.2'
db-type: 'mysql'
prefer-lowest: 'prefer-lowest'
db-type: mysql
prefer-lowest: prefer-lowest

steps:
- name: Setup MySQL latest
Expand All @@ -33,7 +41,7 @@ jobs:
if: matrix.db-type == 'pgsql' && matrix.php-version == '7.2'
run: docker run --rm --name=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=cakephp -p 5432:5432 -d postgres:9.4

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -50,14 +58,14 @@ jobs:
run: echo "::set-output name=date::$(date +'%Y-%m')"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}-${{ matrix.prefer-lowest }}

- name: Composer install
run: |
if [[ ${{ matrix.php-version }} == '8.1' ]]; then
if [[ ${{ matrix.php-version }} == '8.2' ]]; then
composer install --ignore-platform-req=php
elif ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then
composer update --prefer-lowest --prefer-stable
Expand Down Expand Up @@ -89,26 +97,30 @@ jobs:
if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export MYSQL_DSN='mysql://root:root@127.0.0.1/phinx'; fi
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export PGSQL_DSN='pgsql://postgres:postgres@127.0.0.1/phinx'; fi

if [[ ${{ matrix.php-version }} == '8.0' ]]; then
if [[ ${{ matrix.php-version }} == '8.1' ]]; then
export CODECOVERAGE=1 && vendor/bin/phpunit --verbose --coverage-clover=coverage.xml
else
vendor/bin/phpunit
fi

- name: Prefer lowest check
if: matrix.prefer-lowest == 'prefer-lowest'
run: composer require --dev dereuromark/composer-prefer-lowest && vendor/bin/validate-prefer-lowest -m

- name: Submit code coverage
if: matrix.php-version == '8.0'
uses: codecov/codecov-action@v1
if: matrix.php-version == '8.1'
uses: codecov/codecov-action@v3

testsuite-windows:
runs-on: windows-2019
name: Windows - PHP 7.4 & SQL Server
name: Windows - PHP 8.1 & SQL Server

env:
EXTENSIONS: pdo_sqlsrv
PHP_VERSION: '7.4'
PHP_VERSION: '8.1'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get date part for cache key
id: key-date
Expand All @@ -123,7 +135,7 @@ jobs:
key: ${{ steps.key-date.outputs.date }}

- name: Cache PHP extensions
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.php-ext-cache.outputs.dir }}
key: ${{ runner.os }}-php-ext-${{ steps.php-ext-cache.outputs.key }}
Expand All @@ -149,7 +161,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}-${{ matrix.prefer-lowest }}
Expand All @@ -165,19 +177,19 @@ jobs:
vendor/bin/phpunit --verbose --coverage-clover=coverage.xml

- name: Submit code coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3

cs-stan:
name: Coding Standard & Static Analysis
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
php-version: '7.4'
coverage: none

- name: Get composer cache directory
Expand All @@ -189,7 +201,7 @@ jobs:
run: echo "::set-output name=date::$(date +'%Y-%m')"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}
Expand All @@ -201,4 +213,5 @@ jobs:
run: vendor/bin/phpcs --report=checkstyle -np app/ src/ tests/

- name: Run phpstan
if: always()
run: vendor/bin/phpstan.phar analyse --error-format=github
28 changes: 28 additions & 0 deletions .github/workflows/deploy_docs_0x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: 'deploy_docs_0x'

on:
push:
tags:
- v0.*
workflow_dispatch:
inputs:
branch:
description: Branch to run on
default: master
required: true

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Cloning repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: 'ssh://dokku@apps.cakephp.org:22/phinx-docs'
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
4 changes: 2 additions & 2 deletions .github/workflows/phar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -22,7 +22,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
66 changes: 42 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,45 @@
"name": "robmorgan/phinx",
"type": "library",
"description": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app.",
"keywords": ["phinx", "migrations", "database", "db", "database migrations"],
"keywords": [
"phinx",
"migrations",
"database",
"db",
"database migrations"
],
"homepage": "https://phinx.org",
"license": "MIT",
"authors": [{
"name": "Rob Morgan",
"email": "robbym@gmail.com",
"homepage": "https://robmorgan.id.au",
"role": "Lead Developer"
}, {
"name": "Woody Gilk",
"email": "woody.gilk@gmail.com",
"homepage": "https://shadowhand.me",
"role": "Developer"
}, {
"name": "Richard Quadling",
"email": "rquadling@gmail.com",
"role": "Developer"
}, {
"name": "CakePHP Community",
"role": "Developer",
"homepage": "https://github.com/cakephp/phinx/graphs/contributors"
}],
"authors": [
{
"name": "Rob Morgan",
"email": "robbym@gmail.com",
"homepage": "https://robmorgan.id.au",
"role": "Lead Developer"
},
{
"name": "Woody Gilk",
"email": "woody.gilk@gmail.com",
"homepage": "https://shadowhand.me",
"role": "Developer"
},
{
"name": "Richard Quadling",
"email": "rquadling@gmail.com",
"role": "Developer"
},
{
"name": "CakePHP Community",
"role": "Developer",
"homepage": "https://github.com/cakephp/phinx/graphs/contributors"
}
],
"require": {
"php": ">=7.2",
"cakephp/database": "^4.0",
"psr/container": "^1.0 || ^2.0",
"symfony/console": "^3.4|^4.0|^5.0",
"symfony/config": "^3.4|^4.0|^5.0"
"symfony/console": "^3.4|^4.0|^5.0|^6.0",
"symfony/config": "^3.4|^4.0|^5.0|^6.0"
},
"require-dev": {
"ext-json": "*",
Expand Down Expand Up @@ -62,8 +73,15 @@
"cs-check": "phpcs -np app/ src/ tests/",
"cs-fix": "phpcbf -np app/ src/ tests/",
"stan": "phpstan analyse src/",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 && mv composer.backup composer.json",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:~1.5.0 && mv composer.backup composer.json",
"test": "phpunit --colors=always"
},
"bin": ["bin/phinx"]
"bin": [
"bin/phinx"
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
10 changes: 8 additions & 2 deletions docs.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ COPY docs /data/docs

# Build docs with sphinx
RUN cd /data/docs-builder && \
make website LANGS="en es fr ja" SOURCE=/data/docs DEST=/data/website
make website LANGS="en" SOURCE=/data/docs DEST=/data/website


# Build a small nginx container with just the static site in it.
FROM nginx:1.15-alpine
FROM markstory/cakephp-docs-builder:runtime as runtime

# Configure search index script
ENV LANGS="en"
ENV SEARCH_SOURCE="/usr/share/nginx/html"
ENV SEARCH_URL_PREFIX="/phinx/0"

COPY --from=builder /data/docs /data/docs
COPY --from=builder /data/website /data/website
COPY --from=builder /data/docs-builder/nginx.conf /etc/nginx/conf.d/default.conf

Expand Down
2 changes: 1 addition & 1 deletion docs/config/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
]

# Languages available.
languages = ['en', 'es', 'fr', 'ja']
languages = ['en']

# The GitHub branch name for this version of the docs
# for edit links to point at.
Expand Down
16 changes: 14 additions & 2 deletions docs/en/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,9 @@ specified directly as connection options.
default_migration_table: phinxlog
default_environment: development
development:
dsn: %%DATABASE_URL%%
dsn: '%%DATABASE_URL%%'
production:
dsn: %%DATABASE_URL%%
dsn: '%%DATABASE_URL%%'
name: production_database

If the supplied DSN is invalid, then it is completely ignored.
Expand Down Expand Up @@ -391,6 +391,18 @@ Declaring an SQLite database uses a simplified structure:
adapter: sqlite
memory: true # Setting memory to *any* value overrides name

Starting with PHP 8.1 the SQlite adapter supports ``cache`` and ``mode``
query parameters by using the `URI scheme <https://www.sqlite.org/uri.html>`_ as long as ``open_basedir`` is unset.

.. code-block:: yaml

environments:
testing:
adapter: sqlite
name: my_app
mode: memory # Determines if the new database is opened read-only, read-write, read-write and created if it does not exist, or that the database is a pure in-memory database that never interacts with disk, respectively.
cache: shared # Determines if the new database is opened using shared cache mode or with a private cache.

SQL Server
`````````````````

Expand Down
1 change: 0 additions & 1 deletion docs/en/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Contents
########

.. toctree::
:maxdepth: 2
:caption: Phinx

intro
Expand Down
2 changes: 2 additions & 0 deletions docs/en/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

Phinx Documentation
===================

Expand Down
Loading