Download the PHP package stringkey/bit-magic-bundle without Composer
On this page you can find all versions of the php package stringkey/bit-magic-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stringkey/bit-magic-bundle
More information about stringkey/bit-magic-bundle
Files in stringkey/bit-magic-bundle
Package bit-magic-bundle
Short Description Symfony bundle that allows you to do bit manipulations in code and with symfony forms
License MIT
Informations about the package bit-magic-bundle
bit-magic-bundle
Toolkit to manipulate bitfields in code and symfony forms
Using the bundle
Installation
To include the bundle in your Symfony 6.4 LTS or Symfony 7 project, run:
Creating a Symfony 6.4 demo app
Create a new Symfony 6.4 LTS project `
Include the minimum required bundles
Setup the database connection string, since the bundle works with standard integer types there should be no issues with any database create a .env.local file
And create the database
Create an entity
Add 2 integer properties and name them
- enableMask
- valueMask
After creating the entity, generate the migration and execute it
Run the symfony development server
And navigate to http://localhost:8000/bitmask/test
When clicking new a form with 2 fields are shown, modify the code in: src/Form/BitmaskTestType.php
Don't forget to include the usages
Modify the build form method
Refresh the create page the form should now show 2 rows of checkboxes the top one controls which fields in the bottom row are enabled
All versions of bit-magic-bundle with dependencies
ext-ctype Version *
symfony/config Version ^6.0 || ^7.0
symfony/form Version ^6.0 || ^7.0
symfony/dependency-injection Version ^6.0 || ^7.0
symfony/http-kernel Version ^6.0 || ^7.0