surfnet / stepup-bundle
A Symfony 5|6 bundle that holds shared code and framework integration for all Step-up applications.
Installs: 26 892
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 14
Forks: 2
Open Issues: 2
pkg:composer/surfnet/stepup-bundle
Requires
- php: ^8.2
- ext-gmp: *
- ext-json: *
- ext-openssl: *
- guzzlehttp/guzzle: ^7.8
- monolog/monolog: ^3
- surfnet/stepup-saml-bundle: ^7.0
- symfony/config: ^6.3|^7.0
- symfony/dependency-injection: ^6.3|^7.0
- symfony/form: ^6.3|^7.0
- symfony/framework-bundle: ^6.3|^7.0
- symfony/http-kernel: ^6.3|^7.0
- symfony/twig-bridge: ^6.3|^7.0
- symfony/validator: ^6.3|^7.0
Requires (Dev)
- irstea/phpcpd-shim: ^6.0
- malukenho/docheader: ^1.1
- mockery/mockery: ^1.5
- overtrue/phplint: *
- phpmd/phpmd: ^2.13
- phpstan/phpstan: ^2.1
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^11.0.0
- rector/rector: ^2.2
- slevomat/coding-standard: ^8.24
- squizlabs/php_codesniffer: ^4.0
- symfony/phpunit-bridge: ^7.3
- dev-main
- 7.0.0
- 6.0.17
- 6.0.16
- 6.0.15
- 6.0.14
- 6.0.13
- 6.0.12
- 6.0.11
- 6.0.10
- 6.0.9
- 6.0.8
- 6.0.7
- 6.0.6
- 6.0.5
- 6.0.4
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- 5.0.0-beta.1
- 5.0.0-beta
- 4.2.6
- 4.2.5
- 4.2.4
- 4.2.3
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.6
- 4.1.5
- 4.1.4
- 4.1.3
- 4.1.2
- 4.1.1
- 4.1.0
- 4.1.0-beta.3
- 4.1.0-beta.2
- 4.1.0-beta.1
- 4.1.0-beta.0
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.5.2
- 3.5.1
- 3.5.0
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.1
- 3.1.0
- 3.0.0
- 2.0.1
- 2.0.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- 0.2.0
- 0.1.0
- dev-feature/maintenance_nov_25
- dev-release/4.2
- dev-feature/make-vetting-type-optional
- dev-release/5.0
- dev-release/4.1
- dev-release/4.0
- dev-release/3.5
- dev-release/3.4
- dev-release/3.3
This package is auto-updated.
Last update: 2025-11-17 12:28:24 UTC
README
A Symfony bundle that holds shared code and framework integration for all Step-up applications. See Stepup-Deploy for an overview of Stepup.
Requirements
- PHP 8.2 or higher
- Symfony 6.3+ or 7.0+
Installation
-
Add the package to your Composer file
composer require surfnet/stepup-bundle
-
The bundle should be automatically registered in
config/bundles.php(for Symfony Flex projects). If not, add it manually:// config/bundles.php return [ // ... Surfnet\StepupBundle\SurfnetStepupBundle::class => ['all' => true], ];
-
Copy and adjust the error templates to your application folder
src/Resources/views/Exception/error.html.twig→templates/bundles/SurfnetStepupBundle/Exception/error.html.twigsrc/Resources/views/Exception/error404.html.twig→templates/bundles/SurfnetStepupBundle/Exception/error404.html.twig
Install resources
For modern Symfony applications, you can use AssetMapper (recommended for Symfony 7.0+) or Webpack Encore to manage assets.
Using AssetMapper (Symfony 7.0+)
# Install AssetMapper if not already installed
composer require symfony/asset-mapper symfony/asset symfony/twig-pack
Copy the bundle's public assets to your project:
php bin/console assets:install --symlink
Then reference the assets in your templates:
<link href="{{ asset('bundles/surfnetstepup/less/stepup.css') }}" type="text/css" rel="stylesheet" media="screen" /> <script type="text/javascript" src="{{ asset('bundles/surfnetstepup/js/stepup.js') }}"></script>
Using Webpack Encore
Import the bundle's assets in your JavaScript/CSS entry point:
// assets/app.js import '../vendor/surfnet/stepup-bundle/src/Resources/public/js/stepup.js'; // assets/app.css @import '../vendor/surfnet/stepup-bundle/src/Resources/public/less/stepup.less';
Using the locale switcher
The locale switcher is a form that can be rendered with the help of a Twig function.
{% if app.user %}
{% set locale_switcher = stepup_locale_switcher('handler_route', {'return-url': app.request.uri}) %}
{{ form_start(locale_switcher, { attr: { class: 'form-inline' }}) }}
{{ form_widget(locale_switcher.locale) }}
{{ form_widget(locale_switcher.switch) }}
{{ form_end(locale_switcher) }}
{% endif %}
Include the required assets:
<link href="{{ asset('bundles/surfnetstepup/less/style.css') }}" type="text/css" rel="stylesheet" media="screen" /> <script type="text/javascript" src="{{ asset('bundles/surfnetstepup/js/index.js') }}"></script>
Release strategy
CHANGELOG
The changelog for the bundle is kept in the CHANGELOG.md file. A history of the releases can be found in this file.
Previous release notes are kept in this file for history purposes. Please use markdown to style the changelog.
Please update the changelog with any notable changes that are introduced in an upcoming release. If you are not yet
certain what the next release number will be, give the release title a generic value like Upcoming release. Make sure
before merging the changes to the release branch to update the release title in the changelog.
Example CHANGELOG entry
# 2.5.23 Brief explanation of the major changes of this release ## New features * Title of PR of the new feature #30 * Support of POST binding for AuthnRequest #31 ## Bugfixes * Title of PR of the bugfix #33 ## Improvements * Title of PR of the improvement #29
When releasing a hotfix on a release branch, please update the changelog on the release branch and after releasing the hotfix, also merge the hotfix to develop.