-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
Added VichUploaderBundle recipe #22
Conversation
In the original bundle docs, they use |
Actually, it would be better if the bot could detect |
vich_uploader: | ||
db_driver: orm | ||
|
||
# mappings: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is an extra space here that should be removed (i.e: should be #mappings:
) thus the user doesn't have to delete 2 space while removing the comments :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, people will just remove the #
and the indentation will be off.
@fabpot I've tested this recipe and I don't see the Package operations: 11 installs, 0 updates, 0 removals
- Installing jms/metadata (1.6.0): Loading from cache
- Installing symfony/asset (dev-master 67ee69a): Loading from cache
- Installing symfony/inflector (dev-master aed5a08): Loading from cache
- Installing paragonie/random_compat (v2.0.10): Loading from cache
- Installing symfony/polyfill-php70 (dev-master 13ce343): Loading from cache
- Installing symfony/property-access (dev-master 1bb34c3): Loading from cache
- Installing symfony/polyfill-util (dev-master 746bce0): Loading from cache
- Installing symfony/polyfill-php56 (dev-master 1dd42b9): Loading from cache
- Installing symfony/security (dev-master 39263c7): Downloading (100%)
- Installing symfony/templating (dev-master 503b8be): Loading from cache
- Installing vich/uploader-bundle (dev-master 83c3e27): Downloading (100%)
Detected auto-configuration settings for "vich/uploader-bundle"
Enabling the package as a Symfony bundle No file copied. |
@yceruto in case you did the same mistake as I did, have you enabled the installation of contrib recipes? |
@javiereguiluz yeap :) all of them https://symfony.sh/r/contrib/22 |
Hence, if ...
Executing script assets:install --symlink --relative %WEB_DIR% [KO]
[KO]
Script assets:install --symlink --relative %WEB_DIR% returned with error code 1
!!
!!
!!
!! [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
!! The child node "db_driver" at path "vich_uploader" must be configured.
!!
!!
!!
!!
!!
Installation failed, reverting ./composer.json to its original content. |
@yceruto Making |
@Pierstoval I don't think so, the issue is that #22 (comment) |
@yceruto That's because it installed the master version (which is 1.6) and this recipe is for 1.5 only. |
@fabpot same issue for 1.5: $ composer req "vich/uploader-bundle:1.5"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 15 installs, 0 updates, 0 removals
- Installing ocramius/package-versions (1.1.2): Loading from cache
- Installing jms/metadata (1.6.0): Loading from cache
- Installing zendframework/zend-eventmanager (dev-develop 42d2abc): Loading from cache
- Installing zendframework/zend-code (dev-develop e8e6491): Loading from cache
- Installing ocramius/proxy-manager (2.1.x-dev e18ac87): Loading from cache
- Installing symfony/asset (dev-master 67ee69a): Loading from cache
- Installing symfony/inflector (dev-master aed5a08): Loading from cache
- Installing paragonie/random_compat (v2.0.10): Loading from cache
- Installing symfony/polyfill-php70 (dev-master 13ce343): Loading from cache
- Installing symfony/property-access (dev-master 1bb34c3): Loading from cache
- Installing symfony/polyfill-util (dev-master 746bce0): Loading from cache
- Installing symfony/polyfill-php56 (dev-master 1dd42b9): Loading from cache
- Installing symfony/security (dev-master 39263c7): Loading from cache
- Installing symfony/templating (dev-master 503b8be): Loading from cache
- Installing vich/uploader-bundle (1.5.0): Loading from cache
Detected auto-configuration settings for "vich/uploader-bundle"
Enabling the package as a Symfony bundle
Writing lock file
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
Executing script make cache-warmup [OK]
Executing script assets:install --symlink --relative %WEB_DIR% [KO]
[KO]
Script assets:install --symlink --relative %WEB_DIR% returned with error code 1
!!
!!
!!
!! [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
!! The child node "db_driver" at path "vich_uploader" must be configured.
!!
!!
!!
!!
!!
Installation failed, reverting ./composer.json to its original content. |
Somebody else have the same issue or am I the only one? |
@yceruto let's wait until 1.6 version of bundle will released |
@yceruto Try using the latest version 1.5.3, and it works:
|
I had to clean the composer cache to make it work, I don't know why :( On the other hand, this bundle require Executing script assets:install --symlink --relative %WEB_DIR% [KO]
[KO]
Script assets:install --symlink --relative %WEB_DIR% returned with error code 1
!!
!!
!!
!!
!!
!! [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
!!
!!
!! The service "vich_uploader.property_mapping_factory" has a dependency on a
!!
!!
!! non-existent service "annotation_reader".
!!
!!
!!
!!
!!
!!
!!
!!
Installation failed, reverting ./composer.json to its original content. |
@yceruto FrameworkBundle does not install the annotation layer by default anymore in 3.3. If the bundle needs it, it should add a dependency on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyone willing to make a PR on the bundle to add the missing annotations dependency?
vich_uploader: | ||
db_driver: orm | ||
|
||
# mappings: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, people will just remove the #
and the indentation will be off.
About the bundle:
License MIT