-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from sulu/enhancement/sulu-update
Updated sulu to 1.6
- Loading branch information
Showing
8 changed files
with
144 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
<?php | ||
// app/AbstractKernel.php | ||
* Composer | ||
* PHP `^5.5 || ^7.0` | ||
* Sulu `^1.5` | ||
* PHP-Task `^1.1` | ||
|
||
// ... | ||
abstract class AbstractKernel extends SuluKernel | ||
{ | ||
public function registerBundles() | ||
{ | ||
$bundles = [ | ||
// ... | ||
new Task\TaskBundle\TaskBundle(), | ||
new Sulu\Bundle\AutomationBundle\SuluAutomationBundle(), | ||
]; | ||
} | ||
} | ||
``` | ||
For detailed requirements see [composer.json](https://github.com/sulu/SuluAutomationBundle/blob/master/composer.json). | ||
|
||
### Step 3: Configure the routes | ||
## Documentation | ||
|
||
Then, add the required routes to the `app/config/admin/routing.yml` configuration file. | ||
The Documentation is stored in the | ||
[Resources/doc/](https://github.com/sulu/SuluAutomationBundle/blob/master/Resources/doc) folder. | ||
|
||
```yaml | ||
# ... | ||
sulu_automation_api: | ||
type: rest | ||
resource: "@SuluAutomationBundle/Resources/config/routing_api.xml" | ||
prefix: /admin/api | ||
|
||
sulu_automation: | ||
type: rest | ||
resource: "@SuluAutomationBundle/Resources/config/routing.xml" | ||
prefix: /admin/automation | ||
``` | ||
### Step 4: Update the database schema | ||
The bundle needs a few database tables, therefore you should update your schema | ||
using doctrine migrations or the following command: | ||
```console | ||
bin/console doctrine:schema:update --force | ||
``` | ||
|
||
### Step 5: Export the translations | ||
## Installation | ||
|
||
This bundle also includes a few translations, which must be exported: | ||
All the installation instructions are located in the | ||
[documentation](https://github.com/sulu/SuluAutomationBundle/blob/master/Resources/doc/installation.md). | ||
|
||
```console | ||
bin/console sulu:translate:export | ||
``` | ||
## License | ||
|
||
### Step 6: Configure a cronjob | ||
This bundle is under the MIT license. See the complete license [in the bundle](LICENSE) | ||
|
||
The php-task library requires a cronjob to run the scheduled tasks. The cronjob | ||
should run the `task:run` command. | ||
## Reporting an issue or a feature request | ||
|
||
```console | ||
bin/adminconsole task:run | ||
``` | ||
Issues and feature requests are tracked in the [Github issue tracker](https://github.com/Sulu/SuluAutomationBundle/issues). | ||
|
||
When reporting a bug, it may be a good idea to reproduce it in a basic project built using the | ||
[Sulu Minimal Edition](https://github.com/sulu/sulu-minimal) to allow developers of the bundle to reproduce the issue | ||
by simply cloning it and following some steps. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Documentation of SuluAutomationBundle | ||
|
||
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 | ||
|
||
* [Installation](installation.md) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# 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 | ||
|
||
Then, enable the bundle by adding it to the list of registered bundles in the | ||
`app/AbstractKernel.php` file of your Sulu project. | ||
|
||
```php | ||
<?php | ||
// app/AbstractKernel.php | ||
|
||
// ... | ||
abstract class AbstractKernel extends SuluKernel | ||
{ | ||
public function registerBundles() | ||
{ | ||
$bundles = [ | ||
// ... | ||
new Task\TaskBundle\TaskBundle(), | ||
new Sulu\Bundle\AutomationBundle\SuluAutomationBundle(), | ||
]; | ||
} | ||
} | ||
``` | ||
|
||
## Step 3: Configure the routes | ||
|
||
Then, add the required routes to the `app/config/admin/routing.yml` configuration file. | ||
|
||
```yaml | ||
# ... | ||
sulu_automation_api: | ||
type: rest | ||
resource: "@SuluAutomationBundle/Resources/config/routing_api.xml" | ||
prefix: /admin/api | ||
|
||
sulu_automation: | ||
type: rest | ||
resource: "@SuluAutomationBundle/Resources/config/routing.xml" | ||
prefix: /admin/automation | ||
``` | ||
## Step 4: Update the database schema | ||
The bundle needs a few database tables, therefore you should update your schema | ||
using doctrine migrations or the following command: | ||
```console | ||
bin/console doctrine:schema:update --force | ||
``` | ||
|
||
## Step 5: Export the translations | ||
|
||
This bundle also includes a few translations, which must be exported: | ||
|
||
```console | ||
bin/console sulu:translate:export | ||
``` | ||
|
||
## Step 6: Configure a cronjob | ||
|
||
The php-task library requires a cronjob to run the scheduled tasks. The cronjob | ||
should run the `task:run` command. | ||
|
||
```console | ||
bin/adminconsole task:run | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters