Skip to content

Commit

Permalink
[SensiolabsInsight] Changed method visibility for non-action methods …
Browse files Browse the repository at this point in the history
…in controller classes (Kunstmaan#1690)

[AllBundle] Fix unused method, property, variable or parameter (Kunstmaan#1767)

* Unused method, property, variable or parameter

* Unused variable

* Update BundleVersionDataCollector.php

* DocBlock fix

[AllBundle] Fix unused method, property, variable or parameter (Kunstmaan#1767)

* Unused method, property, variable or parameter

* Unused variable

* Update BundleVersionDataCollector.php

* DocBlock fix

[UtilitiesBundle] Commands as services and mark commands as final (Kunstmaan#1789)

[NodeBundle] Commands as services and mark commands as final (Kunstmaan#1791)

[TranslatorBundle] Commands as services and mark commands as final (Kunstmaan#1788)

[AdminListBundle][5.1] Deprecate direct container access in controllers (Kunstmaan#1769)

[AllBundles] Backport the removal of unused parameters (Kunstmaan#1838)

[AdminBundle] refactor media token transformer (Kunstmaan#1827)

[AdminListBundle] Fix Export Exception namespace (Kunstmaan#1825)

[AdminBundle]: readd the extrajavascript block (Kunstmaan#1829)

[MediaBundle] Bulk upload fix (Kunstmaan#1834)

[AdminListBundle]: ->loadTemplate() is only for internal use.. (Kunstmaan#1846)

[PagePartBundle] Fix for PHP 7.2 - value passed to count() cannot be null (Kunstmaan#1849)

update changelog

update changelog

[AdminBundle]: Fix fosuser bundle inheritance deprecation (Kunstmaan#1831)

[LeadGenerationBundle]: remove jquery dependency leadgeneration bundle (Kunstmaan#1859)

Reset event listeners after submit + fixed serialization of form data

[LeadGenerationBundle]: add extras

[NodeBundle]: improve URL chooser external (Kunstmaan#1852)

[AllBundles] 5.1 upgrade file with all current changes (Kunstmaan#1850)

[NodeBundle]: deprecate service function (Kunstmaan#1840)

[AllBundles]: Linting changes (Kunstmaan#1867)

Change the eslint config for the AdminBundle to make it lint the code inside the jsnext folder instead of the js folder

Remove all other eslint / stylelint config

[GeneratorBundle] Add imagemin task to groundcontrol (Kunstmaan#1870)

[NodeBundle]: allow to set icon for tree (Kunstmaan#1790)

Change upgrade guide

[NodeBundle]: remove deprecation annotation

Revert to php 5 code

CHange upgrade guide
  • Loading branch information
acrobat authored and sandergo90 committed Apr 3, 2018
1 parent cd84d05 commit 1a92c3e
Show file tree
Hide file tree
Showing 70 changed files with 2,126 additions and 426 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG-5.X.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 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))
* [MediaBundle] Bulk file upload fix [#1834](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1834) ([@cv65kr](https://github.com/cv65kr))
* [AdminBundle]: re-add the extrajavascript block [#1829](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1829) ([@sandergo90](https://github.com/sandergo90))
* [AdminBundle] refactor media token transformer [#1827](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1827) ([@delboy1978uk](https://github.com/delboy1978uk))
* [AdminListBundle] Fix Export Exception namespace [#1825](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1825) ([@delboy1978uk](https://github.com/delboy1978uk))
* [Leadgenerationbundle]: abstract functions should be public [#1817](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1817) ([@sandergo90](https://github.com/sandergo90))
* [KunstmaanNodeBundle] admin styles no longer have .min extension [#1813](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1813) ([@sandergo90](https://github.com/sandergo90))


## 5.0.3 / 2018-02-06

* [KunstmaanAdminBundle] change php7 to php5 code [#1807](https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/1807) ([@sandergo90](https://github.com/sandergo90))
Expand Down
1,142 changes: 1,142 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions UPGRADE-5.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
UPGRADE FROM 5.0 to 5.1
=======================

AdminBundle
-----------

* Passing the `logger` service as the second argument in `Kunstmaan\AdminBundle\Toolbar\BundleVersionDataCollector` is deprecated and will be removed in 6.0.

AdminListBundle
---------------

* Getting services directly from the container in list controllers is deprecated and will be removed in 6.0. Register your controllers as services and inject the necessary dependencies.
* Getting parameters directly from the container in list controllers is deprecated and will be removed in 6.0. Register your controllers as services and inject the necessary parameters.

ArticleBundle
-------------

* Passing the `request_stack` service as the third argument in `Kunstmaan\ArticleBundle\Twig\ArticleTwigExtension` is deprecated and will be removed 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.

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.

TranslatorBundle
----------------

* `ExportTranslationsCommand::__construct()` now takes an instance of `Kunstmaan\TranslatorBundle\Service\Command\Exporter\ExportCommandHandler` as the first argument. Not passing it is deprecated and will throw a `TypeError` in 6.0.
* `ImportTranslationsCommand::__construct()` now takes an instance of `Kunstmaan\TranslatorBundle\Service\Command\Importer\ImportCommandHandler` as the first argument. Not passing it is deprecated and will throw a `TypeError` in 6.0.
* `TranslationCacheCommand::__construct()` now takes an instance of `Kunstmaan\TranslatorBundle\Service\Translator\ResourceCacher` as the first argument. Not passing it is deprecated and will throw a `TypeError` in 6.0.
* `TranslationFlagCommand::__construct()` now takes an instance of `Kunstmaan\TranslatorBundle\Repository\TranslationRepository` as the first argument. Not passing it is deprecated and will throw a `TypeError` in 6.0.
* `ExportTranslationsCommand`, `ImportTranslationsCommand`, `MigrationsDiffCommand`, `TranslationCacheCommand` and `TranslationFlagCommand` have been marked as final.

UtilitiesBundle
---------------

* `CipherCommand::__construct()` now takes an instance of `Kunstmaan\UtilitiesBundle\Helper\Cipher\CipherInterface` as the first argument. Not passing it is deprecated and will throw a `TypeError` in 6.0.
* `CipherCommand` has been marked as final.
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"doctrine/dbal": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"doctrine/doctrine-migrations-bundle": "^1.3",
"symfony/assetic-bundle": "~2.7",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "~2.8|~3.0",
Expand Down Expand Up @@ -90,6 +91,9 @@
"kunstmaan/languagechooser-bundle": "self.version",
"kunstmaan/tagging-bundle": "self.version"
},
"conflict": {
"friendsofsymfony/user-bundle": "<2.0.0"
},
"autoload": {
"psr-4": {"Kunstmaan\\": "src/Kunstmaan/"}
},
Expand Down
4 changes: 1 addition & 3 deletions groundcontrol/admin-bundle.tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ export const adminBundle = {
};

adminBundle.tasks.eslint = createEslintTask({
src: adminBundle.config.srcPath + 'js/**/*.js',
src: adminBundle.config.srcPath + 'jsnext/**/*.js',
failAfterError: !consoleArguments.continueAfterTestError
});

adminBundle.tasks.stylelint = createStylelintTask({src: adminBundle.config.srcPath + 'scss/**/*.scss'});

adminBundle.tasks.copy = gulp.parallel(
createCopyTask({src: [adminBundle.config.srcPath + 'img/**'], dest: adminBundle.config.distPath + 'img'})
);
Expand Down
7 changes: 0 additions & 7 deletions groundcontrol/dashboard-bundle.tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ export const dashboardBundle = {
tasks: {}
};

dashboardBundle.tasks.eslint = createEslintTask({
src: dashboardBundle.config.srcPath + 'js/**/*.js',
failAfterError: !consoleArguments.continueAfterTestError
});

dashboardBundle.tasks.stylelint = createStylelintTask({src: dashboardBundle.config.srcPath + 'scss/**/*.scss'});

dashboardBundle.tasks.cssLocal = createCssLocalTask({src: dashboardBundle.config.srcPath + 'scss/*.scss', dest: dashboardBundle.config.distPath + 'css'});

dashboardBundle.tasks.cssOptimized = createCssOptimizedTask({src: dashboardBundle.config.srcPath + 'scss/*.scss', dest: dashboardBundle.config.distPath + 'css'});
Expand Down
5 changes: 0 additions & 5 deletions groundcontrol/media-bundle.tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ export const mediaBundle = {
tasks: {}
};

mediaBundle.tasks.eslint = createEslintTask({
src: mediaBundle.config.srcPath + 'js/**/*.js',
failAfterError: !consoleArguments.continueAfterTestError
});

mediaBundle.tasks.scripts = createScriptsTask({
src: [
mediaBundle.config.srcPath + 'vendor_bower/plupload/js/plupload.full.min.js',
Expand Down
7 changes: 0 additions & 7 deletions groundcontrol/translator-bundle.tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@ export const translatorBundle = {
tasks: {}
};

translatorBundle.tasks.stylelint = createStylelintTask({src: translatorBundle.config.srcPath + 'scss/**/*.scss'});

translatorBundle.tasks.cssLocal = createCssLocalTask({src: translatorBundle.config.srcPath + 'scss/*.scss', dest: translatorBundle.config.distPath + 'css'});

translatorBundle.tasks.cssOptimized = createCssOptimizedTask({src: translatorBundle.config.srcPath + 'scss/*.scss', dest: translatorBundle.config.distPath + 'css'});

translatorBundle.tasks.eslint = createEslintTask({
src: translatorBundle.config.srcPath + 'js/**/*.js',
failAfterError: !consoleArguments.continueAfterTestError
});

translatorBundle.tasks.scripts = createScriptsTask({
src: [
translatorBundle.config.srcPath + 'vendor_bower/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.min.js',
Expand Down
20 changes: 1 addition & 19 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import createBuildGroundControlSkeletonTask from './groundcontrol/tasks/build-gc
// AdminBundle Tasks
const analyzeAdminBundle = gulp.series(
adminBundle.tasks.eslint,
adminBundle.tasks.stylelint
);

const buildLocalAdminBundle = gulp.series(
Expand All @@ -31,11 +30,6 @@ const buildOptimizedAdminBundle = gulp.series(
);

// DashboardBundle Tasks
const analyzeDashboardBundle = gulp.series(
dashboardBundle.tasks.eslint,
dashboardBundle.tasks.stylelint
);

const buildLocalDashboardBundle = gulp.series(
dashboardBundle.tasks.cssLocal,
dashboardBundle.tasks.scripts,
Expand All @@ -49,10 +43,6 @@ const buildOptimizedDashboardBundle = gulp.series(
);

// MediaBundle Tasks
const analyzeMediaBundle = gulp.series(
mediaBundle.tasks.eslint,
);

const buildLocalMediaBundle = gulp.series(
mediaBundle.tasks.scripts
);
Expand All @@ -62,11 +52,6 @@ const buildOptimizedMediaBundle = gulp.series(
);

// TranslatorBundle Tasks
const analyzeTranslatorBundle = gulp.series(
translatorBundle.tasks.eslint,
translatorBundle.tasks.stylelint
);

const buildLocalTranslatorBundle = gulp.series(
translatorBundle.tasks.cssLocal,
translatorBundle.tasks.scripts
Expand All @@ -80,10 +65,7 @@ const buildOptimizedTranslatorBundle = gulp.series(

// Combine bundles
const analyze = gulp.series(
analyzeAdminBundle,
analyzeDashboardBundle,
analyzeMediaBundle,
analyzeTranslatorBundle
analyzeAdminBundle
);

const test = gulp.series(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ public function prepend(ContainerBuilder $container)
$monologConfig['handlers']['main']['level'] = 'debug';
$container->prependExtensionConfig('monolog', $monologConfig);

$twigConfig['paths'][] = ['value' => dirname(__DIR__).'/Resources/views', 'namespace' => 'FOSUser'];
$container->prependExtensionConfig('twig', $twigConfig);

$configs = $container->getExtensionConfig($this->getAlias());
$this->processConfiguration(new Configuration(), $configs);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Kunstmaan/AdminBundle/Form/MediaTokenTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ function (Crawler $node) {
if (isset($query['token'])) {
$image->setAttribute('src', $query['token']);
}
$image->setAttribute('data-src', $src);
$image->setAttribute('data-src', urldecode($src));
}
);

return urldecode($crawler->filter('body')->html());
return $crawler->filter('body')->html();
}
}
8 changes: 0 additions & 8 deletions src/Kunstmaan/AdminBundle/KunstmaanAdminBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,4 @@ public function build(ContainerBuilder $container)

$container->registerExtension(new KunstmaanAdminExtension());
}

/**
* @return string The Bundle parent name it overrides or null if no parent
*/
public function getParent()
{
return 'FOSUserBundle';
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
{% extends "FOSUserBundle::layout.html.twig" %}

{% block fos_user_content %}
{% include "@KunstmaanAdmin/ChangePassword/changePassword_content.html.twig" %}
{% endblock fos_user_content %}
{# Deprecated: This template is deprecated since kunstmaanAdminBundle 5.1 and will be removed in kunstmaanAdminBundle 6.0. Use change_password.html.twig instead #}
{% extends 'change_password.html.twig' %}
Original file line number Diff line number Diff line change
@@ -1,41 +1,2 @@
{% trans_default_domain 'FOSUserBundle' %}

{{ form_start(form, {'method': 'POST', 'action': path('fos_user_change_password'), 'attr': {'novalidate': 'novalidate', 'class': 'fos_user_change_password'}}) }}
<div class="form-group form-group--icon-in-control {% if form.current_password.vars.errors|length > 0 %}has-error{% endif %}">
{{ form_label(form.current_password) }}
{{ form_widget(form.current_password) }}
<i class="fa fa-key form-group--icon-in-control__icon"></i>
{% if form.current_password.vars.errors|length > 0 %}
<div class="form__errors text-danger">
{{ form_errors(form.current_password) }}
</div>
{% endif %}
</div>

<div class="form-group form-group--icon-in-control {% if form.plainPassword.first.vars.errors|length > 0 %}has-error{% endif %}">
{{ form_label(form.plainPassword.first) }}
{{ form_widget(form.plainPassword.first) }}
<i class="fa fa-key form-group--icon-in-control__icon"></i>
{% if form.plainPassword.first.vars.errors|length > 0 %}
<div class="form__errors text-danger">
{{ form_errors(form.plainPassword.first) }}
</div>
{% endif %}
</div>

<div class="form-group form-group--icon-in-control {% if form.plainPassword.second.vars.errors|length > 0 %}has-error{% endif %}">
{{ form_label(form.plainPassword.second) }}
{{ form_widget(form.plainPassword.second) }}
<i class="fa fa-key form-group--icon-in-control__icon"></i>
{% if form.plainPassword.second.vars.errors|length > 0 %}
<div class="form__errors text-danger">
{{ form_errors(form.plainPassword.second) }}
</div>
{% endif %}
</div>

{{ form_rest(form) }}
<button type="submit" id="_submit" name="_submit" class="btn btn-brand btn-block btn--raise-on-hover">
{{ 'change_password.submit'|trans }}
</button>
{{ form_end(form) }}
{# Deprecated: This template is deprecated since kunstmaanAdminBundle 5.1 and will be removed in kunstmaanAdminBundle 6.0. Use change_password_content.html.twig instead #}
{% extends 'change_password_content.html.twig' %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "@FOSUser/layout.html.twig" %}

{% block fos_user_content %}
{% include "@KunstmaanAdmin/ChangePassword/change_password_content.html.twig" %}
{% endblock fos_user_content %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{% trans_default_domain 'FOSUserBundle' %}

{{ form_start(form, {'method': 'POST', 'action': path('fos_user_change_password'), 'attr': {'novalidate': 'novalidate', 'class': 'fos_user_change_password'}}) }}
<div class="form-group form-group--icon-in-control {% if form.current_password.vars.errors|length > 0 %}has-error{% endif %}">
{{ form_label(form.current_password) }}
{{ form_widget(form.current_password) }}
<i class="fa fa-key form-group--icon-in-control__icon"></i>
{% if form.current_password.vars.errors|length > 0 %}
<div class="form__errors text-danger">
{{ form_errors(form.current_password) }}
</div>
{% endif %}
</div>

<div class="form-group form-group--icon-in-control {% if form.plainPassword.first.vars.errors|length > 0 %}has-error{% endif %}">
{{ form_label(form.plainPassword.first) }}
{{ form_widget(form.plainPassword.first) }}
<i class="fa fa-key form-group--icon-in-control__icon"></i>
{% if form.plainPassword.first.vars.errors|length > 0 %}
<div class="form__errors text-danger">
{{ form_errors(form.plainPassword.first) }}
</div>
{% endif %}
</div>

<div class="form-group form-group--icon-in-control {% if form.plainPassword.second.vars.errors|length > 0 %}has-error{% endif %}">
{{ form_label(form.plainPassword.second) }}
{{ form_widget(form.plainPassword.second) }}
<i class="fa fa-key form-group--icon-in-control__icon"></i>
{% if form.plainPassword.second.vars.errors|length > 0 %}
<div class="form__errors text-danger">
{{ form_errors(form.plainPassword.second) }}
</div>
{% endif %}
</div>

{{ form_rest(form) }}
<button type="submit" id="_submit" name="_submit" class="btn btn-brand btn-block btn--raise-on-hover">
{{ 'change_password.submit'|trans }}
</button>
{{ form_end(form) }}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

<!-- Body block -->
{% block body %}

<!-- Header -->
{% block appHeader %}
{% include "KunstmaanAdminBundle:Default:app_header.html.twig" %}
Expand Down Expand Up @@ -140,11 +139,15 @@
</a>
</footer>
{% endblock %}

{% endblock %}

{% block js_footer %}
<!-- JS -->
{% include "KunstmaanAdminBundle:Default:_js_footer.html.twig" %}
{% endblock %}

<!-- JS - Extra -->
{% block extrajavascript %}{% endblock %}
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
{% extends "FOSUserBundle::layout.html.twig" %}

{% block fos_user_content %}
<div class="alert alert-success">
{{ 'We have sent you an email with a link to reset your password.' | trans }}
<a class="btn alert__action" href="{{ path('fos_user_security_login') }}">
<i class="fa fa-times"></i>
</a>
</div>
{% endblock %}
{# Deprecated: This template is deprecated since kunstmaanAdminBundle 5.1 and will be removed in kunstmaanAdminBundle 6.0. Use check_email.html.twig instead #}
{% extends 'check_email.html.twig' %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% extends "@FOSUser/layout.html.twig" %}

{% block fos_user_content %}
<div class="alert alert-success">
{{ 'We have sent you an email with a link to reset your password.' | trans }}
<a class="btn alert__action" href="{{ path('fos_user_security_login') }}">
<i class="fa fa-times"></i>
</a>
</div>
{% endblock %}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "FOSUserBundle::layout.html.twig" %}
{% extends "@FOSUser/layout.html.twig" %}

{% block fos_user_content %}
<div class="alert alert-error">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "FOSUserBundle::layout.html.twig" %}
{% extends "@FOSUser/layout.html.twig" %}

{% trans_default_domain 'FOSUserBundle' %}

Expand Down
2 changes: 1 addition & 1 deletion src/Kunstmaan/AdminBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"php": ">=5.5.0",
"symfony/symfony": "~2.8",
"doctrine/orm": "~2.2,>=2.2.3",
"friendsofsymfony/user-bundle": "2.0.*@dev",
"friendsofsymfony/user-bundle": "^2.0",
"knplabs/knp-menu-bundle": "~2.0",
"sensio/framework-extra-bundle": "*",
"kunstmaan/utilities-bundle": "~3.2",
Expand Down
Loading

0 comments on commit 1a92c3e

Please sign in to comment.