Symfony base bundle, contains general classes, controls and templates.
Homepage Repository Packagist PHP
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require jumpersoft/symfony-base-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Jumpersoft\BaseBundle\JumpersoftBaseBundle(),
);
// ...
}
// ...
}
In "app/config/parameters.yml" and "..parameters.yml.dist" set configuration with:
Base parameters, put all parameters with values optional by each utility:
jumpersoft.recaptcha.secretCaptchaKey: ''
jumpersoft.entityUser: ''
jumpersoft.redirectToOnAuthenticationFailure: ''
jscommerce.defaultStoreId: ''
mailer_email_to_show: 'info@jumpersoft.com'
mailer_email_intern_for_notifications: 'webadmin@jumpersoft.com'
Service parameters, add this configuration in your services.yml main file:
services:
...
_defaults:
bind:
$defaultStoreId: '%jscommerce.defaultStoreId%'
$debug: '%kernel.debug%'
Security paramaters, you can change with your name:
jumpersoft.security.token_key: '' # csrf token jumpersoft.security.jwt_private_key_path: '' # ssh path private key path jumpersoft.security.jwt_public_key_path: '' # ssh path public key path jumpersoft.security.jwt_key_pass_phrase: '' # ssh key pass phrase jumpersoft.security.jwt_token_ttl: 86400 # jwt duration
In "app/config/config.yml" set the next lexic jwt authentication configuration:
Add configuration below to use for with the listener Exception:
framework: ... templating: engines: ['twig']
Optional, add configuration below to add a shorcut to access to entities in DQL
doctrine: ... orm: .. mappings: MainEntities: type: annotation # Changue to your bundle name dir: '%kernel.project_dir%/src/AppBundle/Entity' prefix: AppBundle\Entity alias: E
Add Lexit JWT Athentication configurarion:
lexik_jwt_authentication: private_key_path: %jumpersoft.security.jwt_private_key_path% public_key_path: %jumpersoft.security.jwt_public_key_path% pass_phrase: %jumpersoft.security.jwt_key_pass_phrase% token_ttl: %jumpersoft.security.jwt_token_ttl%
This are the topics related to this bundle:
Templates:
Classes:
Extensions:
Annotations
Twig extensions:
Doctrine extensions for MySQL:
We recommend use the bundle "nelmio/cors-bundle": "~1.4" in order to take all advantages with json web tokens.