Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
solcik committed Jan 11, 2021
1 parent 2e8a9fe commit 0734986
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Expand Up @@ -11,6 +11,6 @@ indent_style = tab
indent_size = tab
tab_width = 4

[{*.json,*.yml,*.yaml,*.md}]
[{*.json,*.yml,*.yaml,*.md,*.js,*.ts}]
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -6,5 +6,5 @@
/composer.lock

# Tests
/temp
/coverage.xml
.phpunit.result.cache
31 changes: 16 additions & 15 deletions Makefile
@@ -1,27 +1,28 @@
.PHONY: qa lint cs csf phpstan tests coverage
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html

all:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs
install:
composer update

vendor: composer.json composer.lock
composer install
qa: phpstan cs

qa: lint phpstan cs

lint: vendor
vendor/bin/linter src tests

cs: vendor
cs:
ifdef GITHUB_ACTION
vendor/bin/codesniffer -q --report=checkstyle src tests | cs2pr
else
vendor/bin/codesniffer src tests
endif

csf: vendor
csf:
vendor/bin/codefixer src tests

phpstan: vendor
phpstan:
vendor/bin/phpstan analyse -l max -c phpstan.neon src

tests: vendor
tests:
vendor/bin/tester -s -p php --colors 1 -C tests/cases

coverage: vendor
coverage-clover:
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases

coverage-html:
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.html --coverage-src ./src tests/cases
52 changes: 22 additions & 30 deletions README.md
@@ -1,33 +1,26 @@
![Nettrine ODM](https://heatbadger.now.sh/github/readme/nettrine/odm/)

<p align=center>
<a href="https://github.com/nettrine/odm/actions">
<img src="https://badgen.net/github/checks/nettrine/odm/master?cache=300">
</a>
<a href="https://coveralls.io/r/nettrine/odm">
<img src="https://badgen.net/coveralls/c/github/nettrine/odm?cache=300">
</a>
<a href="https://packagist.org/packages/nettrine/odm">
<img src="https://badgen.net/packagist/dm/nettrine/odm">
</a>
<a href="https://packagist.org/packages/nettrine/odm">
<img src="https://badgen.net/packagist/v/nettrine/odm">
</a>
<a href="http://bit.ly/ctteg">
<img src="https://badgen.net/badge/chat/gitter/cyan">
</a>
<a href="https://contributte.org/partners.html">
<img src="https://badgen.net/badge/become/a%20patron/F96854">
</a>
<p>
<a href="https://github.com/nettrine/odm/actions"><img src="https://badgen.net/github/checks/nettrine/odm"></a>
<a href="https://coveralls.io/r/nettrine/odm"><img src="https://badgen.net/coveralls/c/github/nettrine/odm"></a>
<a href="https://packagist.org/packages/nettrine/odm"><img src="https://badgen.net/packagist/dm/nettrine/odm"></a>
<a href="https://packagist.org/packages/nettrine/odm"><img src="https://badgen.net/packagist/v/nettrine/odm"></a>
</p>
<p align=center>
<a href="https://packagist.org/packages/nettrine/odm"><img src="https://badgen.net/packagist/php/nettrine/odm"></a>
<a href="https://github.com/nettrine/odm"><img src="https://badgen.net/github/license/nettrine/odm"></a>
<a href="https://bit.ly/ctteg"><img src="https://badgen.net/badge/support/gitter/cyan"></a>
<a href="https://bit.ly/cttfo"><img src="https://badgen.net/badge/support/forum/yellow"></a>
<a href="https://contributte.org/partners.html"><img src="https://badgen.net/badge/sponsor/donations/F96854"></a>
</p>

<p align=center>
Website 🚀 <a href="https://contributte.org">contributte.org</a> | Contact 👨🏻‍💻 <a href="https://f3l1x.io">f3l1x.io</a> | Twitter 🐦 <a href="https://twitter.com/contributte">@contributte</a>
Website 🚀 <a href="https://contributte.org">contributte.org</a> | Contact 👨🏻‍💻 <a href="https://f3l1x.io">f3l1x.io</a> | Twitter 🐦 <a href="https://twitter.com/contributte">@contributte</a>
</p>

## Usage

To install the latest version of `nettrine/odm` use [Composer](https://getcomposer.com).
To install latest version of `nettrine/odm` use [Composer](https://getcomposer.com).

```
composer require nettrine/odm
Expand All @@ -39,22 +32,21 @@ For details on how to use this package, check out our [documentation](.docs).

## Versions

| State | Version | Branch | Nette | PHP |
|-------------|-------------|----------|--------|---------|
| dev | `^0.2` | `master` | `3.0+` | `>=7.4` |
| stable | `^0.1` | `master` | `3.0+` | `>=7.3` |
| State | Version | Branch | Nette | PHP |
|----------|----------|----------|--------|---------|
| dev | ^0.3.0 | master | 3.0+ | >=7.4 |
| stable | ^0.2.0 | master | 3.0+ | >=7.3 |
| stable | ^0.1.0 | master | 3.0+ | >=7.3 |

## Development

See [how to contribute](https://contributte.org/contributing.html) to this package.

This package is currently maintaining by these authors.
See [how to contribute](https://contributte.org) to this package. This package is currently maintained by these authors.

<a href="https://github.com/solcik">
<img width="80" height="80" src="https://avatars2.githubusercontent.com/u/1543737?v=3&s=80">
<img width="80" height="80" src="https://avatars.githubusercontent.com/u/1543737?v=3&s=80">
</a>

-----

Consider to [support](https://contributte.org/partners.html) **contributte** development team.
Consider to [support](https://contributte.com/partners) **contributte** development team.
Also thank you for using this package.
34 changes: 16 additions & 18 deletions composer.json
Expand Up @@ -14,26 +14,24 @@
"require": {
"php": ">=7.3",
"ext-mongodb": "*",
"contributte/di": "^0.4.2",
"doctrine/cache": "^1.10.0",
"doctrine/mongodb-odm": "^2.0.5",
"doctrine/persistence": "^1.3.6",
"mongodb/mongodb": "^1.5.2",
"nette/di": "^3.0.3",
"nette/schema": "^1.0.2",
"nettrine/annotations": "^0.6.0",
"nettrine/cache": "^0.1.0"
"contributte/di": "^0.5",
"doctrine/cache": "^1.10",
"doctrine/mongodb-odm": "^2.0",
"doctrine/persistence": "^2.1",
"mongodb/mongodb": "^1.5",
"nette/di": "^3.0",
"nette/schema": "^1.1",
"nettrine/annotations": "^0.7 || ^0.8",
"nettrine/cache": "^0.3 || ^0.4"
},
"require-dev": {
"mockery/mockery": "^1.3.1",
"ninjify/qa": "^0.9.0",
"ninjify/qa": "^0.12.1",
"ninjify/nunjuck": "^0.4.0",
"phpstan/extension-installer": "^1.0.3",
"phpstan/phpstan": "^0.12.0",
"phpstan/phpstan-deprecation-rules": "^0.12.2",
"phpstan/phpstan-nette": "^0.12.3",
"phpstan/phpstan-strict-rules": "^0.12.2",
"phpunit/phpunit": "^8.5.2",
"phpstan/extension-installer": "^1.1.0",
"phpstan/phpstan": "^0.12.65",
"phpstan/phpstan-deprecation-rules": "^0.12.6",
"phpstan/phpstan-nette": "^0.12.14",
"phpstan/phpstan-strict-rules": "^0.12.7",
"nettrine/mongodb": "^0.1.0",
"nette/tester": "^2.3.4"
},
Expand All @@ -58,7 +56,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "0.2.x-dev"
"dev-master": "0.3.x-dev"
}
}
}
5 changes: 0 additions & 5 deletions ruleset.xml
Expand Up @@ -20,11 +20,6 @@
</properties>
</rule>

<!-- Tests specific -->
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessDocComment">
<exclude-pattern>/tests/cases</exclude-pattern>
</rule>

<!--Exclude folders -->
<exclude-pattern>/tests/tmp</exclude-pattern>
</ruleset>
2 changes: 1 addition & 1 deletion src/DI/OdmAnnotationsExtension.php
Expand Up @@ -3,8 +3,8 @@
namespace Nettrine\ODM\DI;

use Doctrine\Common\Annotations\Reader;
use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver;
use Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver;
use Doctrine\Persistence\Mapping\Driver\MappingDriver;
use Nette\Schema\Expect;
use Nette\Schema\Schema;
use stdClass;
Expand Down
1 change: 0 additions & 1 deletion src/DI/OdmExtension.php
Expand Up @@ -134,7 +134,6 @@ public function loadDoctrineConfiguration(): void
public function loadEntityManagerConfiguration(): void
{
$builder = $this->getContainerBuilder();
$config = $this->config;

// Document Manager
$builder->addDefinition($this->prefix('documentManager'))
Expand Down
3 changes: 1 addition & 2 deletions tests/cases/Unit/DI/OdmAnnotationsExtensionTest.php
Expand Up @@ -75,8 +75,7 @@ static function (Compiler $compiler): void {
[getmypid(), 2]
);

/** @var Container $container */
$container = new $class();
new $class();
},
MissingServiceException::class,
"#Service of type 'Doctrine\\\Common\\\Annotations\\\Reader' not found\.#"
Expand Down

0 comments on commit 0734986

Please sign in to comment.