-
-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Autocomplete] autoimport bootstrap option is reset to default when doing a composer update #1307
Comments
symfony/ux-autocomplete is provided with two options (bootstrap5 or the default css) since end of 2022 / early 2023. You should not add / remove entries from this file (controllers.json), but it can be used to enable/disable features, set lazy loading, etc. In your situation, i'd write "false" for both the CSS suggested, and i'd import manually the bootstrap4 CSS See the AssetMapper documentation there: https://symfony.com/doc/current/frontend/asset_mapper.html#lazily-importing-css-from-a-javascript-file |
I just ran into the same problem, glad I've seen this issue ! |
Thanks for you help @smnandre @danakil , it did the trick indeed. "scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts" It's the first time I notice this type of behavior |
I'm not sure 100% in your case because i'm not too familiar with WebpackEncore + StimulusBundle, but things start with Flex, which reacts after a symfony bundle is installed / updated and synchronize config files : importmap.php or package.json and assets/controllers.json ( https://github.com/symfony/flex/blob/2.x/src/PackageJsonSynchronizer.php ) |
If you want to open a PR on symfony/ux-autocomplete, don't hesitate to do... it would be well received :) I think it would just need to add the bootstrap4 in this file (false per default) : https://github.com/symfony/ux-autocomplete/blob/2.x/assets/package.json |
Done : #1316 |
…le (Anthony FACHAUX) This PR was merged into the 2.x branch. Discussion ---------- add tom-select bootstrap4 css file to default config file | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Issues | Fix #1307 | License | MIT Add tom-select bootstrap4 css file to default config file. Without this, if you have replaced the bootstrap5.css value with a boostrap4 with value set to true, it will be replaced every time you perform a composer update (with the help of flex). Like this : ![image](https://github.com/symfony/ux/assets/63842196/9a436c6b-3efb-4d61-98ce-e0e8a14da68c) Commits ------- d5ca775 add tom-select bootstrap4 css file to default config file
Issue
When I perform a composer update on my project, the autoimport bootstrap option is always reset to default value.
![image](https://private-user-images.githubusercontent.com/63842196/286505080-a6406012-959d-4fb3-afdf-ae185a960e74.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODE3ODQsIm5iZiI6MTczOTA4MTQ4NCwicGF0aCI6Ii82Mzg0MjE5Ni8yODY1MDUwODAtYTY0MDYwMTItOTU5ZC00ZmIzLWFmZGYtYWUxODVhOTYwZTc0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA2MTEyNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThmMDY4YTMxNDAwNjVjZjRmYjdiNjVkZGRmYTU4OTc2ODI0MTdkNjQyYmFkOGY3MDU5MjExZWFmYmJmODk2ODAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.nzCN-hrGx8VjBzebMKS0fwtIWqSGTntF0CNhPfOYHAc)
Like this :
Files
Here is my composer.json file, i'm running on a docker image (php:8.2-apache) with php8.2 and node18 installed.
I want to keep the bootstrap4 option, of course.
Not sure exactly what is happening here.
Any feedback appreciated, thanks.
The text was updated successfully, but these errors were encountered: