From 1106ecca37510f6a34b7562e6b7890a7888772fa Mon Sep 17 00:00:00 2001 From: Johannes Wachter Date: Wed, 28 Jun 2017 13:15:46 +0200 Subject: [PATCH 1/2] updated sulu to 1.6 --- .travis.yml | 7 ++- LICENSE | 21 ++++++++ README.md | 96 +++++++++-------------------------- Resources/doc/README.md | 8 +++ Resources/doc/index.rst | 0 Resources/doc/installation.md | 80 +++++++++++++++++++++++++++++ Tasks/Manager/TaskManager.php | 6 ++- composer.json | 8 ++- 8 files changed, 145 insertions(+), 81 deletions(-) create mode 100644 LICENSE create mode 100644 Resources/doc/README.md delete mode 100644 Resources/doc/index.rst create mode 100644 Resources/doc/installation.md diff --git a/.travis.yml b/.travis.yml index 1e1785f..9705ddb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,17 +5,20 @@ language: php cache: directories: - $HOME/.composer/cache - - downloads matrix: include: - php: 5.5 + env: + - COMPOSER_FLAGS="--prefer-lowest --prefer-dist --no-interaction" - php: 7.0 + env: + - COMPOSER_FLAGS="--prefer-dist --no-interaction" before_script: - phpenv config-rm xdebug.ini - composer self-update - - composer install --prefer-dist --no-interaction + - composer update $COMPOSER_FLAGS - ./Tests/app/console doctrine:database:create - ./Tests/app/console doctrine:schema:create diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a15c520 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Sulu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index ce10c08..d01751c 100644 --- a/README.md +++ b/README.md @@ -1,88 +1,40 @@ # SuluAutomationBundle -[![Build Status](https://travis-ci.org/sulu/SuluAutomationBundle.svg?branch=master)](https://travis-ci.org/sulu/SuluAutomationBundle) +[![Build Status](https://travis-ci.org/sulu/SuluAutomationBundle.svg)](https://travis-ci.org/sulu/SuluAutomationBundle) +[![StyleCI](https://styleci.io/repos/61883398/shield)](https://styleci.io/repos/61883398) -This bundle integrates the -[php-task library](https://github.com/php-task/php-task) into Sulu. +The SuluAutomationBundle provides a way to manages future tasks which can be scheduled for entities in the Sulu-Admin. +For example schedule the publishing of a page to a specific datetime in the future. -## Installation - -### Step 1: Download the Bundle - -Open a command console, enter your project directory and execute the following -command to download the latest stable version of this bundle: - -```console -$ composer require sulu/automation-bundle -``` - -This command requires you to have Composer installed globally, as explained in -the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the -Composer documentation. - -### Step 2: Enabled the Bundle +To schedule tasks this bundle uses the [php-task library](https://github.com/php-task/php-task). -Then, enable the bundle by adding it to the list of registered bundles in the -`app/AbstractKernel.php` file of your Sulu project. +## Requirements -```php -eventDispatcher->dispatch(Events::TASK_UPDATE_EVENT, new TaskUpdateEvent($task)); + $event = new TaskUpdateEvent($task); + $this->eventDispatcher->dispatch(Events::TASK_UPDATE_EVENT, $event); $this->scheduler->reschedule($task); if ($event->isCanceled()) { @@ -106,7 +107,8 @@ public function remove($id) $task = $this->findById($id); $this->scheduler->remove($task); - $event = $this->eventDispatcher->dispatch(Events::TASK_REMOVE_EVENT, new TaskRemoveEvent($task)); + $event = new TaskRemoveEvent($task); + $this->eventDispatcher->dispatch(Events::TASK_REMOVE_EVENT, $event); if ($event->isCanceled()) { return; } diff --git a/composer.json b/composer.json index fed0741..233da8f 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,10 @@ } ], "require": { - "sulu/sulu": "1.5.* || dev-develop", - "php-task/task-bundle": "^1.0", + "sulu/sulu": "^1.5", + "php-task/task-bundle": "^1.1", "willdurand/hateoas-bundle": "^1.2", - "jms/serializer-bundle": "^1.1", - - "sulu/document-manager": "^0.9 || dev-develop" + "jms/serializer-bundle": "^1.1" }, "require-dev": { "phpunit/phpunit": "~4.8 || ~5.0", From 6057f9fb8ef27ac7fa187fda7396d0d51ec27a77 Mon Sep 17 00:00:00 2001 From: Johannes Wachter Date: Wed, 28 Jun 2017 14:36:25 +0200 Subject: [PATCH 2/2] fixed typos --- README.md | 4 ++-- Resources/doc/README.md | 2 +- composer.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d01751c..c5b2a6e 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,13 @@ For detailed requirements see [composer.json](https://github.com/sulu/SuluAutoma ## Documentation -The the Documentation is stored in the +The Documentation is stored in the [Resources/doc/](https://github.com/sulu/SuluAutomationBundle/blob/master/Resources/doc) folder. ## Installation All the installation instructions are located in the -[Documentation](http://docs.sulu.io/en/1.6/bundles/automation/index.html). +[documentation](https://github.com/sulu/SuluAutomationBundle/blob/master/Resources/doc/installation.md). ## License diff --git a/Resources/doc/README.md b/Resources/doc/README.md index 07dc4fc..9a5ce40 100644 --- a/Resources/doc/README.md +++ b/Resources/doc/README.md @@ -1,6 +1,6 @@ # Documentation of SuluAutomationBundle -This documentation covers basic-topics to install and use this bundle. For detailed information see ale the +This documentation covers basic-topics to install and use this bundle. For detailed information see also the bundle-documentation in [docs.sulu.io](http://docs.sulu.io/en/1.6/bundles/automation/index.html). ## List of contents diff --git a/composer.json b/composer.json index 233da8f..20fa94d 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ ], "require": { "sulu/sulu": "^1.5", - "php-task/task-bundle": "^1.1", + "php-task/task-bundle": "^1.0", "willdurand/hateoas-bundle": "^1.2", "jms/serializer-bundle": "^1.1" },