Skip to content

Commit

Permalink
Merge pull request #28 from Amialc/master
Browse files Browse the repository at this point in the history
Updated example, now angular use keys and domain configured at confi…
  • Loading branch information
ntotten committed Apr 19, 2016
2 parents d9b75cd + 83b4da4 commit d2a8695
Show file tree
Hide file tree
Showing 12 changed files with 470 additions and 392 deletions.
26 changes: 20 additions & 6 deletions example/app/SymfonyRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,12 @@ public function __construct()
);
}

$this->addRequirement(
function_exists('iconv'),
'iconv() must be available',
'Install and enable the <strong>iconv</strong> extension.'
);

$this->addRequirement(
function_exists('json_encode'),
'json_encode() must be available',
Expand Down Expand Up @@ -546,10 +552,10 @@ function_exists('simplexml_import_dom'),
require_once __DIR__.'/../vendor/autoload.php';

try {
$r = new \ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle');
$r = new ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle');

$contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php');
} catch (\ReflectionException $e) {
} catch (ReflectionException $e) {
$contents = '';
}
$this->addRecommendation(
Expand Down Expand Up @@ -638,20 +644,20 @@ function_exists('posix_isatty'),
}

$this->addRecommendation(
class_exists('Locale'),
extension_loaded('intl'),
'intl extension should be available',
'Install and enable the <strong>intl</strong> extension (used for validators).'
);

if (class_exists('Collator')) {
if (extension_loaded('intl')) {
// in some WAMP server installations, new Collator() returns null
$this->addRecommendation(
null !== new Collator('fr_FR'),
'intl extension should be correctly configured',
'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.'
);
}

if (class_exists('Locale')) {
// check for compatible ICU versions (only done when you have the intl extension)
if (defined('INTL_ICU_VERSION')) {
$version = INTL_ICU_VERSION;
} else {
Expand All @@ -670,6 +676,14 @@ class_exists('Locale'),
'intl ICU version should be at least 4+',
'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).'
);

$this->addPhpIniRecommendation(
'intl.error_level',
create_function('$cfgValue', 'return (int) $cfgValue === 0;'),
true,
'intl.error_level should be 0 in php.ini',
'Set "<strong>intl.error_level</strong>" to "<strong>0</strong>" in php.ini<a href="#phpini">*</a> to inhibit the messages when an error occurs in ICU functions.'
);
}

$accelerator =
Expand Down
6 changes: 3 additions & 3 deletions example/app/check.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
$symfonyRequirements = new SymfonyRequirements();
$iniPath = $symfonyRequirements->getPhpIniConfigPath();

echo_title('Symfony2 Requirements Checker');
echo_title('Symfony Requirements Checker');

echo '> PHP is using the following php.ini file:'.PHP_EOL;
if ($iniPath) {
Expand Down Expand Up @@ -42,9 +42,9 @@
}

if ($checkPassed) {
echo_block('success', 'OK', 'Your system is ready to run Symfony2 projects', true);
echo_block('success', 'OK', 'Your system is ready to run Symfony projects');
} else {
echo_block('error', 'ERROR', 'Your system is not ready to run Symfony2 projects', true);
echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects');

echo_title('Fix the following mandatory requirements', 'red');

Expand Down
6 changes: 3 additions & 3 deletions example/app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ swiftmailer:
spool: { type: memory }

jwt_auth:
client_id: KNuydwEqwGsPNpxdAhACmOWDUmBEZsLn
client_secret: cQT57M1wIYvcW1Rr6lTGWitqlkBtYwsyYkHG-mhVKdxhXBATWDwM6tB0mJFJVWFv
domain: wptest.auth0.com
client_id: {CLIENT_ID}
client_secret: {CLIENT_SECRET}
domain: {DOMAIN}
4 changes: 1 addition & 3 deletions example/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"sensio/distribution-bundle": "~3.0.12",
"sensio/framework-extra-bundle": "~3.0",
"incenteev/composer-parameter-handler": "~2.0",
"firebase/php-jwt": "dev-master",
"adoy/oauth2": "dev-master",
"auth0/jwt-auth-bundle": "~1.2"
"auth0/jwt-auth-bundle": "~1.2.8"
},
"require-dev": {
"sensio/generator-bundle": "~2.3"
Expand Down
Loading

0 comments on commit d2a8695

Please sign in to comment.