cameronmurphy / bootstrap-menu-bundle Goto Github PK
View Code? Open in Web Editor NEWRender Bootstrap menus using Symfony
Render Bootstrap menus using Symfony
When trying to upgrade a Symfony project, containing this bundle, to the latest version (Symfony 5), it failed on the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- camurphy/bootstrap-menu-bundle 1.0.0 requires symfony/twig-bundle ^4.3 -> satisfiable by symfony/twig-bundle[v4.4.0] but these conflict with your requirements or minimum-stability.
- camurphy/bootstrap-menu-bundle 1.0.0 requires symfony/twig-bundle ^4.3 -> satisfiable by symfony/twig-bundle[v4.4.0] but these conflict with your requirements or minimum-stability.
- Installation request for camurphy/bootstrap-menu-bundle ^1.0 -> satisfiable by camurphy/bootstrap-menu-bundle[1.0.0].
That happened, if I understand it well, because I explicitly requested the project's composer dependencies regarding Symfony to be at least version 5, but it seems that your requirements only accept version 4, which keeps me from upgrading. Maybe consider adding support for version 5 ?
I've experienced a failure at installation (see #2), and after that, I noticed that config/bundles.php has:
modified config/bundles.php
@@ -15,4 +15,5 @@ return [
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
+ Camurphy\BootstrapMenuBundle\BootstrapMenuBundle::class => ['all' => true],
];
Maybe it's flex's fault ?
I'm wondering how I can use {{ 'menu.homepage'|trans }}
as a label
I'm trying to get menu entries in a Symfony 4.4.32 test app, but nothing is produced by {{ render_bootstrap_menu('mymenu') }}
when with version 1.3.0
Switching back to v1.2.1 seems to fix the issue.
Maybe the support for Bootstrap 5 is fine, but preserving compatibility with Symfony LTS could be great too.
Thanks in advance.
I noticed the CHANGELOG.md file in the root dir... however, it seems of no use...
May I suggest to either fill it with useful info re. releases, or get rid of it plainly.
Hope this helps,
Hello there,
I just discovered this bundle, much more convenient and straight forward than KnpBundle, so thank you!
One question though, is there a "active" or "current" state management?
Looks like it has not at first sight/test.
Thanks for the answer!
Would it be possible to add a feature so as to configure the appearance of a menu if a role isn't granted to the user.
This could be handy in order to allow hiding the login menu if a user is already logged in.
I'm thinking of a syntax like role: '!IS_AUTHENTICATED_...' which would apply for unauthenticated users.
Would it make sense ?
I'm trying to add the bundle to a Symfony 4.3.3 project, and get:
$ composer require camurphy/bootstrap-menu-bundle
Using version ^1.0 for camurphy/bootstrap-menu-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.3.*"
Package operations: 1 install, 0 updates, 0 removals
- Installing camurphy/bootstrap-menu-bundle (1.0.0): Downloading (100%)
Writing lock file
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
Symfony operations: 1 recipe (af5b6d3524609d1b6a9086d4187983ae)
- Configuring camurphy/bootstrap-menu-bundle (>=1.0.0): From auto-generated recipe
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! In ArrayNode.php line 228:
!!
!! The child node "menus" at path "bootstrap_menu" must be configured.
!!
!!
!!
Script @auto-scripts was called via post-update-cmd
Installation failed, reverting ./composer.json to its original content.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.