Skip to content

Commit a600086

Browse files
authored
Merge pull request #556 from FriendsOfCake/cake-4.x
Cake 4.x
2 parents 919f7f6 + 15eabf8 commit a600086

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+801
-513
lines changed

.editorconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; This file is for unifying the coding style for different editors and IDEs.
22
; More information at http://editorconfig.org
33

4-
root = false
4+
root = true
55

66
[*]
77
indent_style = space
@@ -14,3 +14,6 @@ trim_trailing_whitespace = true
1414
[*.yml]
1515
indent_style = space
1616
indent_size = 2
17+
18+
[*.neon]
19+
indent_style = tab

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Remove files for archives generated using `git archive`
2+
CONTRIBUTING.md export-ignore
3+
.editorconfig export-ignore
4+
.gitattributes export-ignore
5+
.gitignore export-ignore
6+
phpunit.xml.dist export-ignore
7+
.scrutinizer.yml export-ignore
8+
.stickler.yml export-ignore
9+
tests export-ignore
10+
docs export-ignore
11+
.github export-ignore

.github/workflows/ci.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
testsuite:
7+
runs-on: ubuntu-18.04
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
php-version: ['7.2', '7.4']
12+
db-type: [sqlite, mysql, pgsql]
13+
prefer-lowest: ['']
14+
include:
15+
- php-version: '7.2'
16+
db-type: 'sqlite'
17+
prefer-lowest: 'prefer-lowest'
18+
19+
services:
20+
postgres:
21+
image: postgres
22+
ports:
23+
- 5432:5432
24+
env:
25+
POSTGRES_PASSWORD: postgres
26+
27+
steps:
28+
- uses: actions/checkout@v1
29+
with:
30+
fetch-depth: 1
31+
32+
- name: Setup Service
33+
if: matrix.db-type == 'mysql'
34+
run: |
35+
sudo service mysql start
36+
mysql -h 127.0.0.1 -u root -proot -e 'CREATE DATABASE cakephp;'
37+
38+
- name: Setup PHP
39+
uses: shivammathur/setup-php@v2
40+
with:
41+
php-version: ${{ matrix.php-version }}
42+
extensions: mbstring, intl, pdo_${{ matrix.db-type }}
43+
coverage: pcov
44+
45+
- name: Composer install
46+
run: |
47+
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then
48+
composer update --prefer-lowest --prefer-stable
49+
else
50+
composer install
51+
fi
52+
53+
- name: Run PHPUnit
54+
run: |
55+
if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export DB_URL='sqlite:///:memory:'; fi
56+
if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:[email protected]/cakephp'; fi
57+
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:[email protected]/postgres'; fi
58+
59+
if [[ ${{ matrix.php-version }} == '7.4' && ${{ matrix.db-type }} == 'sqlite' ]]; then
60+
vendor/bin/phpunit --coverage-clover=coverage.xml
61+
else
62+
vendor/bin/phpunit
63+
fi
64+
65+
- name: Code Coverage Report
66+
if: success() && matrix.php-version == '7.4' && matrix.db-type == 'sqlite'
67+
uses: codecov/codecov-action@v1
68+
69+
cs-stan:
70+
name: Coding Standard & Static Analysis
71+
runs-on: ubuntu-18.04
72+
73+
steps:
74+
- uses: actions/checkout@v1
75+
with:
76+
fetch-depth: 1
77+
78+
- name: Setup PHP
79+
uses: shivammathur/setup-php@v2
80+
with:
81+
php-version: '7.4'
82+
extension: mbstring, intl
83+
coverage: none
84+
tools: cs2pr, phpstan:^0.12
85+
86+
- name: Composer Install
87+
run: composer install
88+
89+
- name: Run phpcs
90+
run: vendor/bin/phpcs --report=checkstyle --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/ | cs2pr
91+
92+
- name: Run phpstan
93+
if: success() || failure()
94+
run: phpstan analyse

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
vendor/
22
composer.lock
3+
.phpunit.result.cache

.travis.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
[![Build Status](https://img.shields.io/travis/FriendsOfCake/cakephp-upload/master.svg?style=flat-square)](https://travis-ci.org/FriendsOfCake/cakephp-upload)
2-
[![Coverage Status](https://img.shields.io/coveralls/FriendsOfCake/cakephp-upload.svg?style=flat-square)](https://coveralls.io/r/FriendsOfCake/cakephp-upload?branch=master)
1+
[![Build Status](https://img.shields.io/github/workflow/status/FriendsOfCake/cakephp-upload/CI/master?style=flat-square)](https://github.com/FriendsOfCake/cakephp-upload/actions?query=workflow%3ACI+branch%3Amaster)
2+
[![Coverage Status](https://img.shields.io/codecov/c/github/FriendsOfCake/cakephp-upload.svg?style=flat-square)](https://codecov.io/github/FriendsOfCake/cakephp-upload)
33
[![Total Downloads](https://img.shields.io/packagist/dt/josegonzalez/cakephp-upload.svg?style=flat-square)](https://packagist.org/packages/josegonzalez/cakephp-upload)
44
[![Latest Stable Version](https://img.shields.io/packagist/v/josegonzalez/cakephp-upload.svg?style=flat-square)](https://packagist.org/packages/josegonzalez/cakephp-upload)
55
[![Documentation Status](https://readthedocs.org/projects/cakephp-upload/badge/?version=latest&style=flat-square)](https://readthedocs.org/projects/cakephp-upload/?badge=latest)
66

77
# Upload Plugin
88

9-
The Upload Plugin is an attempt to sanely upload files using techniques garnered from packages such as [MeioUpload](http://github.com/jrbasso/MeioUpload) , [UploadPack](http://github.com/szajbus/cakephp-uploadpack) and [PHP documentation](http://php.net/manual/en/features.file-upload.php).
9+
The Upload Plugin is an attempt to easily handle file uploads with CakePHP.
1010

11-
See [this branch](https://github.com/FriendsOfCake/cakephp-upload/tree/2.x) for CakePHP 2.x documentation.
11+
See [4.x branch](https://github.com/FriendsOfCake/cakephp-upload/tree/4.x) for CakePHP 3.x documentation.
12+
13+
See [2.x branch](https://github.com/FriendsOfCake/cakephp-upload/tree/2.x) for CakePHP 2.x documentation.
1214

1315
See [this blog post](http://josediazgonzalez.com/2015/12/05/uploading-files-and-images/) for a tutorial on using the 3.x version.
1416

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@
1212
}
1313
],
1414
"require": {
15-
"cakephp/orm": "^3.5",
16-
"league/flysystem": "*"
15+
"cakephp/orm": "^4.0.2",
16+
"league/flysystem": "^1.0"
1717
},
1818
"require-dev": {
19-
"cakephp/cakephp": "^3.5",
20-
"cakephp/chronos": "^1.1",
21-
"phpunit/phpunit": "^5.7.14|^6.0",
19+
"cakephp/cakephp": "^4.0.2",
20+
"phpunit/phpunit": "~8.5.0",
2221
"league/flysystem-vfs": "*",
23-
"cakephp/cakephp-codesniffer": "dev-master"
22+
"cakephp/cakephp-codesniffer": "^4.0"
2423
},
2524
"autoload": {
2625
"psr-4": {

0 commit comments

Comments
 (0)