Skip to content

Commit

Permalink
Merge pull request #1 from prooph/master
Browse files Browse the repository at this point in the history
Merge changes
  • Loading branch information
Mike Zukowsky committed Jul 12, 2016
2 parents 8a775c6 + 6884117 commit f3d1111
Show file tree
Hide file tree
Showing 117 changed files with 3,703 additions and 782 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml
@@ -1,4 +1,3 @@
# for php-coveralls
service_name: travis-ci
src_dir: src
coverage_clover: build/logs/clover.xml
2 changes: 1 addition & 1 deletion .php_cs
Expand Up @@ -2,7 +2,7 @@
$finder = Symfony\CS\Finder\DefaultFinder::create()
->in('src')
->in('config')
->in('view')
->in('templates')
->in('tests')
->in('scripts')
->in('migrations');
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -13,7 +13,7 @@ script:
- php ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml
- ./vendor/bin/php-cs-fixer fix -v --diff --dry-run

after_script:
after_success:
- php vendor/bin/coveralls -v

notifications:
Expand Down
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -41,12 +41,13 @@ A successfully merged pull request will add you to the HALL OF FAME!

- [x] Project set up, register user, post todo - done by [people at prooph](https://github.com/orgs/prooph/people)
- [x] [Mark a todo as done](https://github.com/prooph/proophessor-do/issues/1) - done by [Danny van der Sluijs](https://github.com/DannyvdSluijs)
- [ ] [Reopen a todo](https://github.com/prooph/proophessor-do/issues/2) - done by [your name here]
- [x] [Reopen a todo](https://github.com/prooph/proophessor-do/issues/2) - done by [Bas Kamer](https://github.com/basz)
- [x] [Add deadline to todo](https://github.com/prooph/proophessor-do/issues/35) - done by [Wojtek Gancarczyk](https://github.com/theDisco)
- [ ] Add reminder for assignee - done by [your name here]
- [ ] Mark a todo as expired - done by [your name here]
- [x] [Add reminder for assignee](https://github.com/prooph/proophessor-do/issues/60) - done by [Roman Sachse](https://github.com/rommsen)
- [x] [Mark a todo as expired](https://github.com/prooph/proophessor-do/issues/75) - done by [Dranzd Viper](https://github.com/dranzd)
- [ ] Notify assignee when todo deadline is expired - done by [your name here]
- [ ] Notify assignee when reminder time is reached - done by [your name here]
- [ ] Implement a dedicated event bus to replay events as reminders and deadline notifications should not be sent to users again - done by [your name here]
- more features will follow ...

## Tutorials
Expand Down
5 changes: 3 additions & 2 deletions Vagrantfile
Expand Up @@ -36,7 +36,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end

config.vm.provision :docker
config.vm.provision :docker_compose, compose_version: "1.5.1", yml: "/vagrant/docker-compose.yml", rebuild: false, run: "always"
config.vm.provision "shell", inline: "cd /vagrant && docker-compose run --rm php sh bin/setup_composer.sh"
config.vm.provision :docker_compose, yml: "/vagrant/docker-compose.yml", rebuild: false, run: "always"
config.vm.provision "shell", inline: "cd /vagrant && docker run --rm -it --volume $(pwd):/app prooph/composer:5.6 install -o --prefer-dist"
config.vm.provision "shell", inline: "cd /vagrant && docker run --rm -it --volume $(pwd):/app prooph/composer:5.6 require prooph/event-store-doctrine-adapter -o --prefer-dist"
config.vm.provision "shell", inline: "cd /vagrant && docker-compose run --rm php sh bin/setup_mysql.sh"
end
4 changes: 2 additions & 2 deletions bin/migrations.php
Expand Up @@ -5,7 +5,7 @@
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*
* Date: 9/5/15 - 10:10 PM
*/
/**
Expand All @@ -17,7 +17,7 @@
// Setup autoloading
require 'vendor/autoload.php';

$container = require 'config/services.php';
$container = require 'config/container.php';

$cli = new \Symfony\Component\Console\Application('Doctrine Command Line Interface', \Doctrine\DBAL\Migrations\MigrationsVersion::VERSION());

Expand Down
11 changes: 0 additions & 11 deletions bin/setup_composer.sh

This file was deleted.

12 changes: 4 additions & 8 deletions bin/setup_mongodb.sh
Expand Up @@ -4,21 +4,19 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR

echo "using adapter mongodb"
touch ./config/mongo_client.local.php
touch ./config/autoload/mongo_client.local.php

php composer.phar require prooph/event-store-mongodb-adapter --update-no-dev -o --prefer-dist

cat > config/mongo_client.local.php << EOL
cat > config/autoload/mongo_client.local.php << EOL
<?php
return [
'mongo_client' => function () {
//Change set up of the mongo client, if you need to configure connection settings
return new \MongoClient();
return new \MongoClient('mongodb://mongodb:27017');
},
];
EOL

cat > config/event_store.local.php << EOL
cat > config/autoload/event_store.local.php << EOL
<?php
return [
'prooph' => [
Expand All @@ -34,5 +32,3 @@ return [
],
];
EOL

php bin/migrations.php --no-interaction migrations:migrate
8 changes: 3 additions & 5 deletions bin/setup_mysql.sh
Expand Up @@ -4,11 +4,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR

echo "using adapter: mysql"
touch ./config/dbal_connection.local.php
touch ./config/autoload/dbal_connection.local.php

php composer.phar require prooph/event-store-doctrine-adapter --update-no-dev -o --prefer-dist

cat > config/dbal_connection.local.php <<EOL
cat > config/autoload/dbal_connection.local.php <<EOL
<?php
return [
'doctrine' => [
Expand All @@ -30,7 +28,7 @@ return [
];
EOL

cat > config/event_store.local.php <<EOL
cat > config/autoload/event_store.local.php <<EOL
<?php
return [
'prooph' => [
Expand Down
2 changes: 1 addition & 1 deletion bin/snapshot_server.php
Expand Up @@ -8,7 +8,7 @@

require_once 'vendor/autoload.php';

$container = require 'config/services.php';
$container = require 'config/container.php';

$context = new ZMQContext;
$socket = new ZMQSocket($context, ZMQ::SOCKET_PULL);
Expand Down
56 changes: 38 additions & 18 deletions composer.json
Expand Up @@ -4,14 +4,25 @@
"license": "BSD-3-Clause",
"keywords": [
"example",
"prooph",
"proophessor",
"zf2"
"zend-expressive",
"cqrs",
"service bus",
"event sourcing",
"snapshots",
"integration"
],
"authors": [
{
"name": "Alexander Miertsch",
"email": "contact@prooph.de",
"homepage": "http://www.prooph.de"
"homepage": "http://prooph-software.com/"
},
{
"name": "Sandro Keil",
"email": "contact@prooph.de",
"homepage": "http://prooph-software.com/"
},
{
"name": "Sascha-Oliver Prolic",
Expand All @@ -20,26 +31,35 @@
],
"homepage": "http://getprooph.org/",
"require": {
"php": "~5.5|~7.0",
"prooph/event-store" : "^6.0",
"php": "^5.5 || ^7.0",
"aura/router" : "^2.3",
"doctrine/dbal": "^2.5.4",
"doctrine/migrations": "^1.4.1",
"nicolopignatelli/valueobjects": "^3.0",
"prooph/event-sourcing" : "^4.0",
"prooph/service-bus" : "^5.0",
"prooph/event-store" : "^6.3",
"prooph/event-store-bus-bridge" : "^2.0",
"zendframework/zend-expressive" : "^0.3",
"zendframework/zend-servicemanager" : "~2.6",
"zendframework/zend-config": "^2.5",
"zendframework/zend-view": "^2.5",
"zendframework/zend-filter": "^2.5",
"aura/router" : "^2.3",
"doctrine/dbal": "^2.5",
"doctrine/migrations": "^1.0",
"nicolopignatelli/valueobjects": "~3.0",
"sandrokeil/interop-config": "^0.3.1"
"prooph/psr7-middleware": "^0.3",
"prooph/service-bus" : "^5.1",
"roave/security-advisories": "dev-master",
"sandrokeil/interop-config": "^1.0",
"zendframework/zend-config": "^2.6",
"zendframework/zend-expressive" : "^1.0",
"zendframework/zend-expressive-aurarouter": "^1.0",
"zendframework/zend-expressive-helpers": "^2.0",
"zendframework/zend-expressive-zendviewrenderer": "^1.1.0",
"zendframework/zend-filter": "^2.7.1",
"zendframework/zend-servicemanager" : "^3.0.3",
"zendframework/zend-stdlib": "^3.0.1",
"zendframework/zend-mail": "^2.7.1"
},
"require-dev" : {
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/phpunit": "^4.7",
"symfony/stopwatch": "^2.7"
"fabpot/php-cs-fixer": "^1.11.4",
"filp/whoops": "^1.1",
"phpunit/phpunit": "^4.8 || ^5.2",
"proophsoftware/prooph-cli": "^0.2.0",
"symfony/stopwatch": "^2.7",
"satooshi/php-coveralls": "^1.0"
},
"suggest" : {
"prooph/event-store-doctrine-adapter" : "^3.0 Use doctrine dbal event store adapter",
Expand Down
2 changes: 2 additions & 0 deletions config/autoload/.gitignore
@@ -0,0 +1,2 @@
local.php
*.local.php
7 changes: 7 additions & 0 deletions config/autoload/config.global.php
@@ -0,0 +1,7 @@
<?php

return [
'debug' => true,

'config_cache_enabled' => false,
];
File renamed without changes.
51 changes: 51 additions & 0 deletions config/autoload/dependencies.global.php
@@ -0,0 +1,51 @@
<?php
use Zend\Expressive\Application;
use Zend\Expressive\Container\ApplicationFactory;
use Zend\Expressive\Helper;

return [
// Provides application-wide services.
// We recommend using fully-qualified class names whenever possible as
// service names.
'dependencies' => [
// Use 'invokables' for constructor-less services, or services that do
// not require arguments to the constructor. Map a service name to the
// class name.
'invokables' => [
// Fully\Qualified\InterfaceName::class => Fully\Qualified\ClassName::class,
Helper\ServerUrlHelper::class => Helper\ServerUrlHelper::class,
],
// Use 'factories' for services provided by callbacks/factory classes.
'factories' => [
Application::class => ApplicationFactory::class,
Helper\UrlHelper::class => Helper\UrlHelperFactory::class,
'doctrine.connection.default' => \Prooph\ProophessorDo\Container\Infrastructure\DoctrineDbalConnectionFactory::class,
// Action middleware
\Prooph\ProophessorDo\App\Action\Home::class => \Prooph\ProophessorDo\Container\App\Action\HomeFactory::class,
\Prooph\ProophessorDo\App\Action\UserList::class => \Prooph\ProophessorDo\Container\App\Action\UserListFactory::class,
\Prooph\ProophessorDo\App\Action\UserRegistration::class => \Prooph\ProophessorDo\Container\App\Action\UserRegistrationFactory::class,
\Prooph\ProophessorDo\App\Action\UserTodoList::class => \Prooph\ProophessorDo\Container\App\Action\UserTodoListFactory::class,
\Prooph\ProophessorDo\App\Action\UserTodoForm::class => \Prooph\ProophessorDo\Container\App\Action\UserTodoFormFactory::class,
// Model
\Prooph\ProophessorDo\Model\User\Handler\RegisterUserHandler::class => \Prooph\ProophessorDo\Container\Model\User\RegisterUserHandlerFactory::class,
\Prooph\ProophessorDo\Model\User\UserCollection::class => \Prooph\ProophessorDo\Container\Infrastructure\Repository\EventStoreUserCollectionFactory::class,
\Prooph\ProophessorDo\Model\Todo\Handler\PostTodoHandler::class => \Prooph\ProophessorDo\Container\Model\Todo\PostTodoHandlerFactory::class,
\Prooph\ProophessorDo\Model\Todo\Handler\MarkTodoAsDoneHandler::class => \Prooph\ProophessorDo\Container\Model\Todo\MarkTodoAsDoneHandlerFactory::class,
\Prooph\ProophessorDo\Model\Todo\Handler\ReopenTodoHandler::class => \Prooph\ProophessorDo\Container\Model\Todo\ReopenTodoHandlerFactory::class,
\Prooph\ProophessorDo\Model\Todo\Handler\AddDeadlineToTodoHandler::class => \Prooph\ProophessorDo\Container\Model\Todo\AddDeadlineToTodoHandlerFactory::class,
\Prooph\ProophessorDo\Model\Todo\Handler\AddReminderToTodoHandler::class => \Prooph\ProophessorDo\Container\Model\Todo\AddReminderToTodoHandlerFactory::class,
\Prooph\ProophessorDo\Model\Todo\Handler\MarkTodoAsExpiredHandler::class => \Prooph\ProophessorDo\Container\Model\Todo\MarkTodoAsExpiredHandlerFactory::class,
\Prooph\ProophessorDo\Model\Todo\Handler\RemindTodoAssigneeHandler::class => \Prooph\ProophessorDo\Container\Model\Todo\RemindTodoAssigneeHandlerFactory::class,
\Prooph\ProophessorDo\Model\Todo\TodoList::class => \Prooph\ProophessorDo\Container\Infrastructure\Repository\EventStoreTodoListFactory::class,
// Projections
\Prooph\ProophessorDo\Projection\User\UserProjector::class => \Prooph\ProophessorDo\Container\Projection\User\UserProjectorFactory::class,
\Prooph\ProophessorDo\Projection\User\UserFinder::class => \Prooph\ProophessorDo\Container\Projection\User\UserFinderFactory::class,
\Prooph\ProophessorDo\Projection\Todo\TodoProjector::class => \Prooph\ProophessorDo\Container\Projection\Todo\TodoProjectorFactory::class,
\Prooph\ProophessorDo\Projection\Todo\TodoFinder::class => \Prooph\ProophessorDo\Container\Projection\Todo\TodoFinderFactory::class,
\Prooph\ProophessorDo\Projection\Todo\TodoReminderFinder::class => \Prooph\ProophessorDo\Container\Projection\Todo\TodoReminderFinderFactory::class,
\Prooph\ProophessorDo\Projection\Todo\TodoReminderProjector::class => \Prooph\ProophessorDo\Container\Projection\Todo\TodoReminderProjectorFactory::class,
// Subscriber
\Prooph\ProophessorDo\App\Mail\SendTodoReminderMailSubscriber::class => \Prooph\ProophessorDo\Container\App\Mail\SendTodoReminderMailSubscriberFactory::class,
],
],
];
21 changes: 21 additions & 0 deletions config/autoload/errorhandler.global.php
@@ -0,0 +1,21 @@
<?php

return [
'dependencies' => [
'invokables' => [
'Zend\Expressive\Whoops' => Whoops\Run::class,
'Zend\Expressive\WhoopsPageHandler' => Whoops\Handler\PrettyPageHandler::class,
],
'factories' => [
'Zend\Expressive\FinalHandler' => Zend\Expressive\Container\WhoopsErrorHandlerFactory::class,
],
],

'whoops' => [
'json_exceptions' => [
'display' => true,
'show_trace' => true,
'ajax_only' => true,
],
],
];
File renamed without changes.
20 changes: 20 additions & 0 deletions config/autoload/mail_connection.local.php.dist
@@ -0,0 +1,20 @@
<?php
return [
'proophessor-do' => [
'mail' => [
'transport' => 'in_memory', // smtp or in_memory (default)
// uncomment if you want to use smtp. Preset for gmail
// 'smtp' => [
// 'name' => 'gmail.com',
// 'host' => 'smtp.gmail.com',
// 'port' => 587,
// 'connection_class' => 'plain',
// 'connection_config' => [
// 'username' => 'YOUR_USERNAME_HERE',
// 'password' => 'YOUR_PASSWORD_HERE',
// 'ssl' => 'tls',
// ],
// ],
]
]
];

0 comments on commit f3d1111

Please sign in to comment.