Download the PHP package alexhenriet/common-bundle without Composer
On this page you can find all versions of the php package alexhenriet/common-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alexhenriet/common-bundle
More information about alexhenriet/common-bundle
Files in alexhenriet/common-bundle
Package common-bundle
Short Description Common stuffs used in Symfony projects
License MIT
Informations about the package common-bundle
CommonBundle
Common stuffs used in Symfony projects.
How to install the bundle ?
-
Create bundle configuration in config/packages/alexhenriet_common.yaml BEFORE requiring the package or you'll get an error during install (the bundle has no recipe)
common: ldap_host: 'ldap-host.lan'
ldap_port: 389
# ldap_opt_protocol_version: 3 # ldap_opt_referrals: 0 login_prefix: 'DOMAIN' # login_route: 'app_login' bypass_user_identifiers: ['MyLogin'] bypass_environments: ['loc']
-
Install the package with composer
composer require alexhenriet/common-bundle
-
Enable the package in config/bundles.php
return [ ... Alexhenriet\Bundle\CommonBundle\CommonBundle::class => ['all' => true], ];
How to use the bundle ?
Custom Authenticator
-
Generate user and auth using commands provided by symfony/maker-bundle
-
Replace the custom authenticator in the security.yaml
security: enable_authenticator_manager: true
firewalls: main: custom_authenticators:
- Alexhenriet\Bundle\CommonBundle\Security\BypassableLdapLoginFormAuthenticator
- Use _username and _password as input names in your template\security\login.html.twig
Abstract Controller
-
Extend the abstract controller in a controller
use Alexhenriet\Bundle\CommonBundle\Controller\AbstractController;
class ActionsController extends AbstractController {}
-
If you get error "Controller ... cannot be fetched from the container because it is private", add the following lines to your services.yaml
controllers are imported separately to make sure services can be injected
as action arguments even if you don't extend any base controller class
App\Controller\: resource: '../src/Controller/' tags: ['controller.service_arguments']
Warranty Disclaimer and Limitation of Liability
THIS FREE LIBRARY IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE AUTHOR DISCLAIMS ALL WARRANTIES, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY. UNDER NO CIRCUMSTANCES WILL THE AUTHOR BE LIABLE FOR ANY CONSEQUENTIAL, SPECIAL, INDIRECT, INCIDENTAL OR PUNITIVE DAMAGES WHATSOEVER ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS DO NOT ALLOW LIMITATIONS ON IMPLIED WARRANTIES OR THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU. THIS EULA WILL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE LAWS OF BELGIUM WITHOUT REGARD TO ITS CONFLICTS OF LAWS OR ITS PRINCIPLES. ANY CLAIM OR SUIT ARISING OUT OF OR RELATING TO THIS EULA WILL BE BROUGHT EXCLUSIVELY IN ANY COURT OF COMPETENT JURISDICTION LOCATED IN HAINAUT (BELGIUM).
All versions of common-bundle with dependencies
ext-ldap Version *
symfony/security-bundle Version ^5.4
symfony/config Version ^5.4
symfony/dependency-injection Version ^5.4