Skip to content

Commit

Permalink
Merge branch '6.0' into feature/analytics-v4
Browse files Browse the repository at this point in the history
  • Loading branch information
sandergo90 committed May 15, 2018
2 parents 14d7f1e + 83be5dc commit b87725a
Show file tree
Hide file tree
Showing 1,243 changed files with 71,528 additions and 3,739 deletions.
8 changes: 4 additions & 4 deletions .sensiolabs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ php_version: 5.6
# If at least one of these conditions is verified, the commit status is displayed as failed.
commit_failure_conditions:
# By severities count (default configuration, any change will override it)
- "project.severity.critical > 0"
- "project.severity.major > 0"
# - "project.severity.critical > 0"
# - "project.severity.major > 0"

# # By other severities count
# - "project.severity.minor > 0"
Expand All @@ -27,8 +27,8 @@ commit_failure_conditions:
# - "project.violations > 150"

# By severities count, limited to the violations concerning files edited by the current PR
# - "pr.severity.critical > 0"
# - "pr.severity.major > 0"
- "pr.severity.critical > 0"
- "pr.severity.major > 0"
# - "pr.severity.minor > 0"
# - "pr.severity.info >= 15"

Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ before_script:
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ] && [ $(php -r "echo PHP_MAJOR_VERSION;") -le 5 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ $(php -r "echo PHP_MAJOR_VERSION;") -le 5 ]; then echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ $(php -r "echo PHP_MAJOR_VERSION;") -le 5 ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
- phpenv config-add xdebug.ini || true

script: ./vendor/bin/phpunit --coverage-clover=coverage.clover

after_script:
- phpenv config-rm xdebug.ini || true
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- npm run build -- --continueAfterTestError=true
- npm run buildGroundControlSkeleton
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG-5.X.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 5.0.6 / 2018-04-13

* [GeneratorBundle] Fix article generator for no-interaction [#1912](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1912) ([@Devolicious](https://github.com/Devolicious))
* [NodeBundle]: node data collector should go to node id [#1891](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1891) ([@sandergo90](https://github.com/sandergo90))
* [AdminListBundle] Start and end form using tab pane form view, if it exists [#1890](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1890) ([@mtnorthrop](https://github.com/mtnorthrop))
* [MultiDomainBundle]: host override should be set before getting default locale [#1889](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1889) ([@sandergo90](https://github.com/sandergo90))
* [FormBundle]: add batchsize to export list [#1887](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1887) ([@sandergo90](https://github.com/sandergo90))
* [AdminBundle] Fix Bootstrap modals on smaller screens [#1885](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1885) ([@dbeerten](https://github.com/dbeerten))
* [Docs - 5.0]: move to readthedocs documentation [#1880](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1880) ([@sandergo90](https://github.com/sandergo90))
* [GeneratorBundle] Change logic of page title [#1874](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1874) ([@treeleaf](https://github.com/treeleaf))
* [GeneratorBundle] Fixed limit in generated article repository [#1871](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1871) ([@jordanmoon](https://github.com/jordanmoon))
* [KunstmaanAdminBundle]: fix permissions [#1869](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1869) ([@sandergo90](https://github.com/sandergo90))
* [KunstmaanAdminBundle]: access level for google should add groups [#1868](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1868) ([@sandergo90](https://github.com/sandergo90))
* [LeadGenerationBundle]: times should not be blank [#1865](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1865) ([@sandergo90](https://github.com/sandergo90))
* [GeneratorBundle] Fixed bundle namespace in article generator pagepart config [#1864](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1864) ([@jordanmoon](https://github.com/jordanmoon))
* [AdminBundle]: redirect to previous page when logging in with Google [#1862](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1862) ([@sandergo90](https://github.com/sandergo90))
* [GeneratorBundle]: fixes for article generator [#1860](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1860) ([@sandergo90](https://github.com/sandergo90))
* [AdminBundle] Make it possible to search in all PagePartChoosers [#1854](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1854) ([@NindroidX](https://github.com/NindroidX))
* [SeoBundle]: fields are not required [#1851](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1851) ([@sandergo90](https://github.com/sandergo90))
* [NodeBundle] Check for mapping exception when multiple entity manager… [#1819](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1819) ([@delboy1978uk](https://github.com/delboy1978uk))


## 5.0.5 / 2018-03-05

* [AdminBundle] Fix escaping of img src attributes in WYSIWYG fields [#1858](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1858) ([@mtnorthrop](https://github.com/mtnorthrop))


## 5.0.4 / 2018-02-20

* [AdminListBundle]: ->loadTemplate() is only for internal use.. [#1846](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1846) ([@sandergo90](https://github.com/sandergo90))
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ We love contributions! We've provide you with a [Contribution Guide](docs/99-00-
If you're submitting a pull request, please follow the guidelines in the [Submitting pull requests](docs/99-02-pull-requests.md)
documentation and be sure to read our [Coding Standards](docs/99-03-coding-standards.md) as well.

### Community
Want to talk to fellow contributors? There's always people eager to chat in our slack channel!

[![Join our slack channel](https://bundles.kunstmaan.be/uploads/media/5ae3807f4f548/slacklogo-small.png?production-87162ce) Join our Slack Channel!](https://join.slack.com/t/kunstmaancms/shared_invite/enQtMzU0Mjg4MjUzODczLTg5NTExMzIxZmI2OTgyNzI4YjdmNjdiZWM1NDI3ZDM3NmRiMjVkMmQ0MjhkYWU3YTMwNTU0ZjM3YmIyNTc5MjI)


### Browser support

We support at least the 2 last versions of Chrome / Firefox / Safari and IE9 or up. We also support the most current mobile browsers.
We support at least the 2 last versions of Chrome / Firefox / Safari / Edge and IE11. We also support the most current mobile browsers.

Enjoy!

Expand Down
14 changes: 2 additions & 12 deletions UPGRADE-5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,7 @@ liip_imagine:
- "%kernel.root_dir%/../link/to/your/symlinked/path/web"
- "%kernel.root_dir%/../web"
```
## Deprecated Form Types
All existing form types have been deprecated in order to satisfy Sensio Insight requirements that form type classes go in a `Form/Type` folder instead of justr `Form`. Existing projects will not break, the old classes are still there, but the logic has been moved into the new classes in the correct folder, and the old classes now extend the new one, and have a `@deprecated` tag.
#### Refactoring your form types
It is very simple, just add `Type` into your use statement.
```php
use Kunstmaan\NodeBundle\Form\ControllerActionAdminType;
```
becomes
```php
use Kunstmaan\NodeBundle\Form\Type\ControllerActionAdminType;
```

## Forms must be referenced via FQCN [brakes BC]

All forms were upgraded to be used by **fully qualified class name** instead of creating new form instance.
Expand Down Expand Up @@ -156,7 +146,7 @@ The nodetranslationlistener has been cleaned for a better flush event. The postF
## FormBundle

The Discriminator map has been removed from the abstract entity `Kunstmaan\FormBundle\Entity\FormSubmissionField`. This makes it a whole lot easier to
extend the FormSubmission with your own FormSubmission fields. So what happens. If you are using the standard formsubmission, basically nothing. Everything just keeps working.
extend the FormSubmission with your own FormSubmission fields. So what happens. If you are using the standard formsubmission, basically nothing. Everything just keeps working.

Now if you have customized the standard formsubmission you probably will have to do some changes. Most vital part is that the `discriminator` value will change from for instance "string" to "stringformsubmissionfield".
As you can see it now uses the entity class name to dynamically map the inheritance. This is where stuff will start to break during querying the database and no result will be found. So for this you will have to manually generate the following migration.
Expand Down
9 changes: 9 additions & 0 deletions UPGRADE-5.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,27 @@ ArticleBundle
-------------

* Passing the `request_stack` service as the third argument in `Kunstmaan\ArticleBundle\Twig\ArticleTwigExtension` is deprecated and will be removed in 6.0.
* The `getAdminListConfigurator` and `createAdminListConfigurator` method in the `AbstractArticleEntityAdminListController` class will change from `public` to `protected` visibility in 6.0.

ConfigBundle
------------

* Passing the `container` as the sixth argument in `Kunstmaan\ConfigBundle\Controller\ConfigController` is deprecated in and will be removed in 6.0.

MediaBundle
-----------

* The unused `MediaController::moveMedia` action is deprecated and will be removed in 6.0.

NodeBundle
----------

* `CronUpdateNodeCommand::__construct()` now takes an instance of `Doctrine\ORM\EntityManagerInterface` as the first argument. Not passing it is deprecated and will throw a `TypeError` in 6.0.
* `InitAclCommand::__construct()` now takes an instance of `Doctrine\ORM\EntityManagerInterface` as the first argument. Not passing it is deprecated and will throw a `TypeError` in 6.0.
* `CronUpdateNodeCommand` and `InitAclCommand` have been marked as final.
* `Possibility to change the icon of your page.`: The possibility already exists to change the icon in the sidebar tree of your page. This was already available by yml configuration. I've added a new interface, TreeIconInterface that can be implemented and that will return the icon that should be used.
* The unused `WidgetsController::selectNodesLazySearch` action is deprecated and will be removed in 6.0.
* Injecting the container in the `SlugRouter` is deprecated and will be removed in 6.0. Inject the required services instead.

TranslatorBundle
----------------
Expand Down
4 changes: 4 additions & 0 deletions autoload.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;

if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
define('PHPUNIT_COMPOSER_INSTALL', __DIR__ . '/vendor/autoload.php');
}

/**
* @var ClassLoader $loader
*/
Expand Down
17 changes: 11 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",

"friendsofsymfony/user-bundle": "~2.0",
"friendsofsymfony/user-bundle": "2.0.*",
"knplabs/knp-menu-bundle": "~2.0",
"guzzlehttp/guzzle": "~6.1",
"white-october/pagerfanta-bundle": "~1.0",
Expand All @@ -49,7 +49,7 @@
"twig/extensions": "~1.0",
"egulias/email-validator": "~1.2",
"box/spout": "^2.5",
"ruflin/elastica": "^5.1",
"ruflin/elastica": "^5.1|^6.0",
"behat/transliterator": "~1.2",
"defuse/php-encryption": "v2.1.0"
},
Expand All @@ -62,9 +62,12 @@
"behat/mink-goutte-driver": "dev-master",
"behat/mink-sahi-driver": "dev-master",
"symfony/phpunit-bridge": "~3.0",
"phpunit/phpunit": "~4.4",
"phpunit/phpunit": "^5.3.27",
"fzaninotto/faker": "~1.6",
"nelmio/alice": "^2.1.4"
"nelmio/alice": "^2.1.4",
"matthiasnoback/symfony-config-test": "2.2.0",
"matthiasnoback/symfony-dependency-injection-test": "1.2.0",
"ekino/newrelic-bundle": "^1.4"
},
"replace": {
"kunstmaan/admin-bundle": "self.version",
Expand Down Expand Up @@ -92,10 +95,12 @@
"kunstmaan/tagging-bundle": "self.version"
},
"conflict": {
"friendsofsymfony/user-bundle": "<2.0.0"
"friendsofsymfony/user-bundle": "<2.0.0, >=2.1.0"
},
"autoload": {
"psr-4": {"Kunstmaan\\": "src/Kunstmaan/"}
"psr-4": {
"Kunstmaan\\": "src/Kunstmaan/"
}
},
"extra": {
"branch-alias": {
Expand Down
Empty file removed docs/04-00-content-management.md
Empty file.
Empty file removed docs/05-00-cookbook.md
Empty file.
21 changes: 0 additions & 21 deletions docs/05-01-intro.md

This file was deleted.

Empty file removed docs/06-00-bundles.md
Empty file.
Empty file removed docs/06-01-admin-bundle.md
Empty file.
Empty file removed docs/06-02-adminlist-bundle.md
Empty file.
Empty file removed docs/06-08-node-bundle.md
Empty file.
13 changes: 0 additions & 13 deletions docs/99-00-contributing.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Configuring adminlists

The default adminlist allows you to add a new item to the list. It also allows you to modify or delete each item. If you want to customize your adminlist, you have to modify the adminlistConfigurator file of that adminlist.
The default adminlist allows you to add a new item to the list. It also allows you to modify or delete each item. If you want to customize your adminlist, you have to modify the adminlistConfigurator file of that adminlist.

## Adding or removing default actions

There are some simple methods build into the Kunstmaan CMS give you control over the default action buttons. You can disable them for your adminlist by overriding them in the adminlistConfigurator to false or true.

```PHP
canAdd()
{
return true;
canAdd()
{
return true;
}

canEdit($item)
Expand All @@ -26,7 +26,7 @@ canExport()
{
return false;
}
```
```
> Note the canExport() method. It is disabled by default. Your adminlist will have export capabilities by enabling it. (see the Exporting admin lists).
## Adding your own actions
Expand All @@ -51,11 +51,11 @@ Open the needed file in your projects `Adminlist` folder and add the following m
);
$this->addListAction(new SimpleListAction($listRoute, 'Action_name', 'Action_icon'));
}
```
```

`$listRoute` contains the name of the route you want to call. It has an array of parameters that will be posted to that route if you call the action. The second parameter is a string containing the name of the button. The third parameter contains the icon.
`$listRoute` contains the name of the route you want to call. It has an array of parameters that will be posted to that route if you call the action. The second parameter is a string containing the name of the button. The third parameter contains the icon.

> The CMS uses [Font Awesome](https://fortawesome.github.io/Font-Awesome/icons/) as icon provider. Just pick a name from their list to use the icon on your action buttons.
> The CMS uses [Font Awesome](https://fortawesome.github.io/Font-Awesome/icons/) as icon provider. Just pick a name from their list to use the icon on your action buttons.
### Adding an adminlist item action
Sometimes you need to apply a specific action to a row of an adminlist. This is where item actions come to the rescue.
Expand All @@ -79,7 +79,7 @@ Item actions can be configured by adding a method to the AdminlistConfigurator f
};
$this->addItemAction(new SimpleItemAction($itemRoute, 'Action_icon', 'Action_name'));
}
```
```
In this example we pass the `Id` of the row along with the route so we know on which item we have to execute the action.
The name and the icon work the same way as the list action above.

Expand Down Expand Up @@ -114,3 +114,14 @@ Its also possible to define custom export fields by adding the following to your
}
```

## Configuring the limits of pagination
You can provide your own limits for pagination of the adminlist by making your AdminlistConfigurator implement the ChangeableLimitInterface.

That interface requires you to implement a couple of methods to allow the
dynamic values for pagination. GetLimit, GetLimitOptions, BindRequest.

Luckily there also is a trait provided by us that does most of the heavy lifting allowing you to only overwrite the values or other things you might want to change.
The trait is called the ChangeableLimitTrait

No other work is needed to adapt the html. There a check is already made to see
if your AdminlistConfigurator implements the ChangeableLimitInterface.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit b87725a

Please sign in to comment.