Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy-j committed Sep 14, 2019
2 parents 0b7ca6b + ea27984 commit a420d1c
Show file tree
Hide file tree
Showing 488 changed files with 1,972 additions and 1,973 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ install:

script:
- vendor/bin/phpunit --coverage-clover=coverage.xml
- vendor/bin/phpcs --standard=PSR2 --colors src tests

after_success:
- bash <(curl -s https://codecov.io/bash) -f coverage.xml
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Codecov](https://codecov.io/gh/cycle/orm/graph/badge.svg)](https://codecov.io/gh/cycle/orm)
<a href="https://discord.gg/TFeEmCs"><img src="https://img.shields.io/badge/discord-chat-magenta.svg"></a>

Cycle is PHP DataMapper ORM and Data Modelling engine designed to safely work in classic and daemonized PHP applications (like [RoadRunner](https://github.com/spiral/roadrunner)). The ORM provides flexible configuration options to model datasets and support dynamic mapping schema at runtime. Engine can work with plain PHP objects, support annotation declarations and proxies via extensions.
Cycle is PHP DataMapper ORM and Data Modelling engine designed to safely work in classic and daemonized PHP applications (like [RoadRunner](https://github.com/spiral/roadrunner)). The ORM provides flexible configuration options to model datasets and supports dynamic mapping schema at runtime. The engine can work with plain PHP objects, support annotation declarations, and proxies via extensions.

<p align="center">
<a href="https://github.com/cycle/docs"><b>Documentation</b></a> | <a href="https://github.com/cycle/docs/issues/3">Comparison with Eloquent and Doctrine</a>
Expand All @@ -14,20 +14,20 @@ Cycle is PHP DataMapper ORM and Data Modelling engine designed to safely work in
Features:
---------
- ORM with has-one, has-many, many-thought-many and polymorphic relations
- Plain Old PHP Objects or [same entity type for multiple repositories](tests/ORM/Classless)
- Plain Old PHP objects, [AR](https://github.com/cycle/docs/blob/master/advanced/active-record.md), Custom objects or [same entity type for multiple repositories](tests/ORM/Classless)
- eager and lazy loading, query builder with multiple fetch strategies
- embedded entities, lazy/eager loaded embedded partials
- runtime configuration with/without code-generation
- column-to-field mapping, single table inheritance, value objects support
- custom persist strategies, dirty state, safe entity map
- works with directed graphs and cyclic graphs using command chains
- designed to work in long-running applications, immutable service core, reconnects
- designed to work in long-running applications, immutable service core
- supports MySQL, MariaDB, PostgresSQL, SQLServer, SQLite
- schema scaffolding and migrations
- schema scaffolding, introspection, and migrations
- supports global query constrains, UUIDs as PK, soft deletes, auto timestamps
- disposable UoW, custom column types, FKs to non primary columns
- use with or without annotations, proxy classes and auto-migrations
- compatible with Doctrine Collections, Doctrine Annotations and Zend Hydrator
- disposable UoW, custom column types, FKs to non-primary columns
- use with or without annotations, proxy classes, and auto-migrations
- compatible with Doctrine Collections, Doctrine Annotations, and Zend Hydrator

Extensions:
---------
Expand All @@ -41,4 +41,3 @@ cycle/migrations | [![Latest Stable Version](https://poser.pugx.org/cycle/migrat
License:
--------
The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com).

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"phpunit/phpunit": "~7.0",
"mockery/mockery": "^1.1",
"spiral/debug": "^1.3",
"ramsey/uuid": "^3.8"
"ramsey/uuid": "^3.8",
"squizlabs/php_codesniffer": "^3.4"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Branch/Condition.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ public function rollBack()
{
// nothing to do
}
}
}
2 changes: 1 addition & 1 deletion src/Command/Branch/ContextSequence.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ public function rollBack()
{
// nothing
}
}
}
3 changes: 1 addition & 2 deletions src/Command/Branch/Nil.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ final class Nil implements ContextCarrierInterface
*/
public function waitContext(string $key, bool $required = true)
{

}

/**
Expand Down Expand Up @@ -80,4 +79,4 @@ public function rollBack()
{
// nothing to do
}
}
}
2 changes: 1 addition & 1 deletion src/Command/Branch/Sequence.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ public function rollBack()
{
// nothing
}
}
}
5 changes: 3 additions & 2 deletions src/Command/Branch/Split.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
use Cycle\ORM\Command\ContextCarrierInterface;

/**
* Splits input context command into 2 destinations: original create command (usually insert) and delayed update command.
* Splits input context command into 2 destinations:
* original create command (usually insert) and delayed update command.
* Used to properly unfold cyclic graphs by keeping the reference data in update and solves the issue of multiple
* parent by sending the data to the first command.
*
Expand Down Expand Up @@ -139,4 +140,4 @@ protected function getTarget(): ContextCarrierInterface

return $this->tail;
}
}
}
2 changes: 1 addition & 1 deletion src/Command/CommandInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ public function complete();
* Rollback command or declare that command been rolled back.
*/
public function rollBack();
}
}
2 changes: 1 addition & 1 deletion src/Command/ContextCarrierInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ public function waitContext(string $key, bool $required = true);
* @return array
*/
public function getContext(): array;
}
}
2 changes: 1 addition & 1 deletion src/Command/Database/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ public function register(

$this->setScope($key, $value);
}
}
}
2 changes: 1 addition & 1 deletion src/Command/Database/Insert.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ public function execute()

parent::execute();
}
}
}
2 changes: 1 addition & 1 deletion src/Command/Database/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ public function registerAppendix(string $key, $value)
{
$this->appendix[$key] = $value;
}
}
}
2 changes: 1 addition & 1 deletion src/Command/DatabaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ public function rollBack()
{
// nothing to do
}
}
}
3 changes: 1 addition & 2 deletions src/Command/InitCarrierInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@
*/
interface InitCarrierInterface extends ContextCarrierInterface
{

}
}
2 changes: 1 addition & 1 deletion src/Command/ScopeCarrierInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ public function waitScope(string $key);
* @return array
*/
public function getScope(): array;
}
}
2 changes: 1 addition & 1 deletion src/Command/Traits/ContextTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ protected function freeContext(string $key)
{
unset($this->waitContext[$key]);
}
}
}
2 changes: 1 addition & 1 deletion src/Command/Traits/ErrorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ public function __toError()

return sprintf("%s(%s)", get_class($this), join(", ", $missing));
}
}
}
2 changes: 1 addition & 1 deletion src/Command/Traits/ScopeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ protected function freeScope(string $key)
{
unset($this->waitScope[$key]);
}
}
}
2 changes: 1 addition & 1 deletion src/Config/RelationConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ public static function getDefault()
]
]);
}
}
}
2 changes: 1 addition & 1 deletion src/Context/ConsumerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ public function register(
bool $fresh = false,
int $stream = self::DATA
);
}
}
2 changes: 1 addition & 1 deletion src/Context/ProducerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ public function forward(
bool $trigger = false,
int $stream = ConsumerInterface::DATA
);
}
}
4 changes: 1 addition & 3 deletions src/Exception/Annotation/AnnotationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Cycle\ORM\Exception\Annotation;


class AnnotationException extends \RuntimeException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/BuilderException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class BuilderException extends ORMException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/CommandException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class CommandException extends ORMException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/ConfigException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class ConfigException extends ORMException
{

}
}
2 changes: 1 addition & 1 deletion src/Exception/FactoryException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@

class FactoryException extends ORMException
{
}
}
3 changes: 1 addition & 2 deletions src/Exception/HeapException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class HeapException extends \Exception
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/LoaderException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class LoaderException extends ORMException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/MapperException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class MapperException extends ORMException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/ORMException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class ORMException extends \RuntimeException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/ParserException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class ParserException extends ORMException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/PromiseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class PromiseException extends ORMException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/Relation/NullException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@

class NullException extends RelationException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/RelationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class RelationException extends ORMException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/SchemaException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class SchemaException extends ORMException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/SelectorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class SelectorException extends ORMException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/TransactionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class TransactionException extends ORMException
{

}
}
3 changes: 1 addition & 2 deletions src/Exception/TypecastException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@

class TypecastException extends ORMException
{

}
}
2 changes: 1 addition & 1 deletion src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ public function database(string $database = null): DatabaseInterface
{
return $this->dbal->database($database);
}
}
}
2 changes: 1 addition & 1 deletion src/FactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ public function relation(
string $role,
string $relation
): RelationInterface;
}
}
2 changes: 1 addition & 1 deletion src/Heap/Heap.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ public function __destruct()
{
$this->clean();
}
}
}
2 changes: 1 addition & 1 deletion src/Heap/HeapInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ public function detach($entity);
* Detach all objects from the heap.
*/
public function clean();
}
}
2 changes: 1 addition & 1 deletion src/Heap/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,4 @@ private static function compare($a, $b): int

return ($a > $b) ? 1 : -1;
}
}
}
2 changes: 1 addition & 1 deletion src/Heap/State.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ public function register(
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/Heap/Traits/ClaimTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ public function hasClaims(): bool
{
return $this->numClaims > 0;
}
}
}
Loading

0 comments on commit a420d1c

Please sign in to comment.