Skip to content

Commit

Permalink
Merge branch 'staging' into marianela-sso
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/AppKernel.php
#	app/bundles/UserBundle/Config/config.php
#	app/config/security.php
#	composer.json
#	composer.lock
  • Loading branch information
alanhartless committed Dec 15, 2016
2 parents c0dc79a + c4cfd5b commit ac36238
Show file tree
Hide file tree
Showing 2,182 changed files with 154,025 additions and 82,303 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Features that are determined not to fit within the direction of the Mautic Core

### Coding Standards

Mautic tries to follow [Symfony's coding standards](http://symfony.com/doc/current/contributing/code/standards.html) and thus we ask the same of any code submitted through pull requests.
Mautic follows [Symfony's coding standards](http://symfony.com/doc/current/contributing/code/standards.html) by implementing pre-commit git hook running [php-cs-fixer](https://github.com/friendsofphp/php-cs-fixer), which is installed and updated with `composer install`/`composer update`.

In addition to Symfony's coding standards, please appropriately indent code using 4 spaces rather than a tab. If using PhpStorm, a code style settings file can be found [here](https://gist.github.com/alanhartless/f3ad051108351a3fcffd). Simply add it to the project's .idea folder then through PhpStorm's preferences, browse to Editor -> Code Style -> PHP and select "Symfony" as the Scheme.
All code styling is handled automatically by the aforementioned git hook. In case if you setup git hook correctly (which is true if you ever run `composer install`/`composer update` before creating a pull request), you can format your code as you like - it will be converted to Mautic code style automatically.

### Pull Request Description Format

Expand Down
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Please answer the following questions.
[//]: # ( Please answer the following questions: )

| Q | A
| --- | ---
Expand All @@ -10,17 +10,17 @@ Please answer the following questions.
| BC breaks? |
| Deprecations? |

**Note that all new features should have a related user and/or developer documentation PR in their respective repositories.**
[//]: # ( Note that all new features should have a related user and/or developer documentation PR in their respective repositories. )

### Required
[//]: # ( Required: )
#### Description:


#### Steps to test this PR:
1.
2.

### As applicable
[//]: # ( As applicable: )
#### Steps to reproduce the bug:
1.
2.
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
.*
!.gitignore
!.htaccess
!.gitkeep
/app/bootstrap*
/app/tests.bootstrap*
/app/bundles/CoreBundle/Assets/css/app/less/**/*.css
/app/bundles/CoreBundle/Assets/css/libraries/**/*.css
!/app/bundles/CoreBundle/Assets/css/libraries/builder.css
!/app/bundles/CoreBundle/Assets/css/libraries/froala/plugins/gated_video.css
!/app/bundles/CoreBundle/Assets/css/*.css
/app/cache/*
!/app/cache/.gitkeep
/app/logs/*
!/app/logs/.gitkeep
/app/config/local*.php
/app/config/config_local.php
/app/config/paths_local.php
Expand Down
9 changes: 9 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'align_double_arrow',
'align_equals',
'ordered_use',
'short_array_syntax',
]);
257 changes: 133 additions & 124 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/AppCache.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once __DIR__ . '/AppKernel.php';
require_once __DIR__.'/AppKernel.php';

use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;

Expand Down
50 changes: 25 additions & 25 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
<?php
/**
* @package Mautic
* @copyright 2014 Mautic Contributors. All rights reserved.

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/

use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\Config\EnvParametersResource;
use Symfony\Component\HttpKernel\DependencyInjection;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Kernel;

/**
* Mautic Application Kernel
* Mautic Application Kernel.
*/
class AppKernel extends Kernel
{

/**
* Major version number
* Major version number.
*
* @const integer
*/
const MAJOR_VERSION = 2;

/**
* Minor version number
* Minor version number.
*
* @const integer
*/
const MINOR_VERSION = 0;
const MINOR_VERSION = 4;

/**
* Patch version number
* Patch version number.
*
* @const integer
*/
const PATCH_VERSION = 2;
const PATCH_VERSION = 1;

/**
* Extra version identifier
* Extra version identifier.
*
* This constant is used to define additional version segments such as development
* or beta status.
Expand Down Expand Up @@ -81,7 +82,6 @@ public function __construct($environment, $debug)
*/
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{

if (strpos($request->getRequestUri(), 'installer') !== false || !$this->isInstalled()) {
define('MAUTIC_INSTALLER', 1);
}
Expand All @@ -91,7 +91,7 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ
if (strpos($uri, 'installer') === false) {
$base = $request->getBaseUrl();
//check to see if the .htaccess file exists or if not running under apache
if ((strpos(strtolower($_SERVER["SERVER_SOFTWARE"]), 'apache') === false
if ((strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache') === false
|| !file_exists(__DIR__.'../.htaccess')
&& strpos(
$base,
Expand All @@ -106,7 +106,6 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ
}

if (false === $this->booted) {

$this->boot();
}

Expand All @@ -121,7 +120,7 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ
$this->getContainer()->get('translator')->trans(
'mautic.core.db.connection.error',
[
'%code%' => $e->getCode()
'%code%' => $e->getCode(),
]
)
);
Expand Down Expand Up @@ -153,6 +152,7 @@ public function registerBundles()
new JMS\SerializerBundle\JMSSerializerBundle(),
new Oneup\UploaderBundle\OneupUploaderBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Debril\RssAtomBundle\DebrilRssAtomBundle(),
// Mautic Bundles
new Mautic\ApiBundle\MauticApiBundle(),
new Mautic\AssetBundle\MauticAssetBundle(),
Expand Down Expand Up @@ -230,14 +230,13 @@ public function registerBundles()
public function boot()
{
if (true === $this->booted) {

return;
}

if (!defined('MAUTIC_TABLE_PREFIX')) {
//set the table prefix before boot
$localParams = $this->getLocalParams();
$prefix = isset($localParams['db_table_prefix']) ? $localParams['db_table_prefix'] : '';
$prefix = isset($localParams['db_table_prefix']) ? $localParams['db_table_prefix'] : '';
define('MAUTIC_TABLE_PREFIX', $prefix);
}

Expand Down Expand Up @@ -271,7 +270,7 @@ public function boot()
}

/**
* Returns a list of addon bundles that are enabled
* Returns a list of addon bundles that are enabled.
*
* @return array
*/
Expand All @@ -289,7 +288,7 @@ public function registerContainerConfiguration(LoaderInterface $loader)
}

/**
* Retrieves the application's version number
* Retrieves the application's version number.
*
* @return string
*/
Expand All @@ -299,7 +298,7 @@ public function getVersion()
}

/**
* Checks if the application has been installed
* Checks if the application has been installed.
*
* @return bool
*/
Expand All @@ -319,6 +318,7 @@ private function isInstalled()
* @param array $params
*
* @return \Doctrine\DBAL\Connection
*
* @throws Exception
* @throws \Doctrine\DBAL\DBALException
*/
Expand Down Expand Up @@ -383,7 +383,7 @@ public function getLogDir()
}

/**
* Get Mautic's local configuration file
* Get Mautic's local configuration file.
*
* @return array
*/
Expand Down Expand Up @@ -422,7 +422,7 @@ public function getLocalParams()
}

/**
* Get local config file
* Get local config file.
*
* @param bool $checkExists If true, then return false if the file doesn't exist
*
Expand All @@ -445,7 +445,7 @@ public function getLocalConfigFile($checkExists = true)
}

/**
* Get the container file name or path
* Get the container file name or path.
*
* @param bool|true $fullPath
*
Expand Down
6 changes: 3 additions & 3 deletions app/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
require_once __DIR__.'/bootstrap.php.cache';
}

use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;

/**
* @var ClassLoader $loader
* @var ClassLoader
*/
$loader = require __DIR__.'/../vendor/autoload.php';

AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
AnnotationRegistry::registerLoader([$loader, 'loadClass']);

return $loader;
12 changes: 7 additions & 5 deletions app/bundles/ApiBundle/ApiEvents.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?php
/**
* @package Mautic
* @copyright 2014 Mautic Contributors. All rights reserved.

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/

namespace Mautic\ApiBundle;

/**
* Class ApiEvents
* Class ApiEvents.
*/
final class ApiEvents
{
Expand Down Expand Up @@ -42,7 +44,7 @@ final class ApiEvents
const CLIENT_POST_DELETE = 'mautic.client_post_delete';

/**
* The mautic.build_api_route event is thrown to build Mautic API routes
* The mautic.build_api_route event is thrown to build Mautic API routes.
*
* The event listener receives a Mautic\CoreBundle\Event\RouteEvent instance.
*
Expand Down
Loading

0 comments on commit ac36238

Please sign in to comment.