Skip to content

Commit

Permalink
New version of MongoDB ODM Driver
Browse files Browse the repository at this point in the history
  • Loading branch information
tacxou committed Jul 26, 2020
1 parent 54a9583 commit b077d1c
Show file tree
Hide file tree
Showing 108 changed files with 11,278 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "65...90"

status:
project:
default:
# Allow the coverage to drop by threshold %, and posting a success status.
threshold: 0.5
patch:
default:
# trial operation
target: 0%
changes: no

comment:
layout: "header, diff"
behavior: default
require_changes: no

ignore:
- ".git"
- "*.yml"
- "*.json"
- "*.md"
- "*.dist"
# ignore folders and all its contents
- ".github/.*"
- "ide/.*"
- "tests/.*"
- "vendor/.*"
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
tab_width = 4

[*.md]
trim_trailing_whitespace = false
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
composer.phar
/vendor/

# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM toroia/phalcon-cli

RUN apk update \
&& apk add --no-cache \
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
php7-pecl-mongodb
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
build:
docker build -t incubator-mongodb .

exec:
docker run --rm -it \
-v $(CURDIR):/app \
--network dev \
incubator-mongodb bash

db:
docker run --rm -d \
--network dev \
--name mongodb \
-p 27017:27017 \
mongo

test:
docker run --rm -it \
-v $(CURDIR):/app \
--network dev \
incubator-mongodb php -d display_errors=On -d error_reporting=E_ALL vendor/bin/codecept run
32 changes: 32 additions & 0 deletions codeception.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
actor_suffix: Tester

paths:
# where the modules stored
tests: tests
log: tests/_output
# directory for fixture data
data: tests/_data
# directory for custom modules (helpers)
support: tests/_support
envs: tests/_envs

settings:
colors: true
# Tests (especially functional) can take a lot of memory
# We set a high limit for them by default.
memory_limit: 1024M
lint: true

coverage:
# Disable Code Coverage by default to speed up Travis tests
enabled: false

extensions:
enabled:
- Codeception\Extension\RunFailed

bootstrap: _bootstrap.php

params:
# get params from environment vars
- env
75 changes: 75 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"name": "phalcon/incubator-mongodb",
"description": "Phalcon Incubator MongoDB",
"keywords": [
"framework",
"phalcon",
"incubator",
"mongodb"
],
"homepage": "https://phalcon.io",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Phalcon Team",
"email": "[email protected]",
"homepage": "https://phalcon.io/en/team"
},
{
"name": "Contributors",
"homepage": "https://github.com/phalcon/incubator-mongodb/graphs/contributors"
}
],
"support": {
"issues": "https://github.com/phalcon/incubator/issues",
"source": "https://github.com/phalcon/incubator-mongodb",
"forum": "https://forum.phalcon.io"
},
"require": {
"php": ">=7.2",
"ext-phalcon": "^4.0",
"ext-mongodb": "*",
"ext-json": "*"
},
"require-dev": {
"phalcon/ide-stubs": "^4.0",
"vimeo/psalm": "3.6.2",
"squizlabs/php_codesniffer": "3.5.1",
"codeception/codeception": "^4.1",
"codeception/module-asserts": "^1.0.0",
"mongodb/mongodb": "^1.6",
"phpstan/phpstan": "^0.12.18",
"vlucas/phpdotenv": "^2.5"
},
"autoload": {
"psr-4": {
"Phalcon\\Incubator\\": "src/"
},
"files": [
"src/functions.php"
]
},
"autoload-dev": {
"psr-4": {
"Phalcon\\Incubator\\Mvc\\Test\\Integration\\": "tests/integration/",
"Phalcon\\Incubator\\Mvc\\Test\\Unit\\": "tests/unit/",
"Phalcon\\Incubator\\Test\\Fixtures\\": "tests/_data/fixtures/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"archive": {
"exclude": [
"/.github",
"/tests",
".codacy.yml",
".codecov.yml",
"CHANGELOG.md",
"codeception.yml",
"phpcs.xml.dist",
"phpstan.neon.dist",
"phpunit.xml.dist",
"psalm.xml.dist"
]
}
}
Loading

0 comments on commit b077d1c

Please sign in to comment.