-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
Add Imagine Bundle Recipe #14
Conversation
db57f16
to
782f8e9
Compare
I'm left a little confused by the automated pull request checker, which has somehow determined that the
|
Just to check, is it possible that this is because of our requirement on ext-gd? |
There is a bug in the validator (the issue here is that there is no |
Ah, thanks @fabpot! |
- Twig: <comment>{{ imagine_filter('my_thumbnails') }}</comment> | ||
- PHP: <comment>$this->get('liip_imagine.cache.manager')->getBrowserPath('/relative/path/to/image.jpg', 'my_thumbnails');</comment> | ||
|
||
* <fg=blue>Read</> the documentation at <comment>http://symfony.com/doc/current/bundles/LiipImagineBundle</> |
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.
Please use https://
when linking to symfony.com. Thanks!
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 will add a check for that :)
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.
Fixed; thanks!
6d8b53e
to
910ac96
Compare
- GET | ||
requirements: | ||
filter: "[A-z0-9_\\-]*" | ||
path: .+ |
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.
Maybe use 4 spaces instead of 2 to keep consistency with the rest of the codebase?
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.
Fixed
"copy-from-recipe": { | ||
"etc/": "%ETC_DIR%/" | ||
} | ||
} |
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.
Missing newline here
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.
Fixed; thanks for the review!
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.
👍
methods: | ||
- GET | ||
requirements: | ||
filter: "[A-z0-9_\\-]*" |
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.
Maybe use single quotes everywhere too? 😆 It'll help in backslash escaping too
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.
Good idea; updated.
19e1408
to
9b26ae4
Compare
@@ -0,0 +1,19 @@ | |||
liip_imagine_filter: |
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.
is it possible include @LiipImagineBundle/Resources/config/routing.xml
instead of copy-pasting it content here?
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.
My only concern is that the use of YAML here was an intentional choice made to lower the entry barrier for someone looking to, perhaps, edit the route paths; XML is generally more difficult for newcomers to follow or edit.
Assuming adding the following addition to the manifest.json
results in the same auto-registration of the file, I agree, aside from my aforementioned comment.
"copy-from-package": {
"Resources/config/routing.xml": "%ETC_DIR%/routing/"
}
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 that you could just use
liip_imagine:
resource: '@LiipImagineBundle/Resources/config/routing.xml'
It's fairly enough to add routing config with flex
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.
Good idea, except it doesn't allow for users to edit it easily.
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.
so convert LiipImagineBundle routing to yaml and copy it?
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.
That isn't something we can do until the next major release, as people rely on the current name for their own usage in pre-flex applications.
Let's move this discussion to liip/LiipImagineBundle#924 so as to not pollute the Flex maintainers with our internal discussions.
@fabpot Is there a standard for enabling multiple package versions and avoiding duplication of files; every single recipe file for this bundle is exactly the same for both version For example, is the solution found at the following link acceptable, where I created a github.com/robfrawley/recipes-contrib/tree/feature-include-version-1.x-and-2.x/liip/imagine-bundle Is this a suitable strategy, or is there an alternative standard, or should the files simply be duplicated in each version folder? |
@robfrawley Take example of the PHPUnit recipe: https://github.com/symfony/recipes/blob/master/phpunit/phpunit/4.7/manifest.json You can specify other versions that are compatible with this recipe. But if files change, you'll have to create a new directory with a new manifest |
@Pierstoval Oh, wonderful; I don't know how I missed that. Thanks! |
be14e01
to
8bb6d4b
Compare
Please do not merge until |
Bug fix, validation does not pass now because the 1.8 version does not exist yet, which is expected. |
@fabpot You were right; I had thought the composer configuration was global, not per project; thanks for the clarification on that. The new PR deployment page is great, BTW. At this point, this looks good from our end. I was able to successfully test both version |
@robfrawley extras are not global |
|
@robfrawley I would prefer to be the one who will approve this PR, the rules are still changing a bit, so better to wait a bit :) |
@fabpot Apologies; I misunderstood the updated |
@robfrawley I think everything is ready now. So, for that PR to be merged, a Symfony Core team member or a member of the Liip organization must approve the PR (the member must be publicly listed on the Liip organization). |
Hm; thanks for giving that a try @Pierstoval 🥇 |
|
||
* <fg=blue;options=bold>Read</> <fg=blue>the documentation and</> <fg=blue;options=bold>ask</> <fg=blue>for help:</> | ||
- Documentation: <comment>https://symfony.com/doc/current/bundles/LiipImagineBundle</> | ||
- Issue Tracker: <comment>https://github.com/liip/LiipImagineBundle/issues</> |
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.
This block is way too long. It should not replace proper documentation. It should only be used to indicate the immediate next steps to make it work, if any.
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.
Brought it down from 18 to 10 lines: is that more appropriate?
"copy-from-recipe": { | ||
"etc/": "%ETC_DIR%/" | ||
}, | ||
"version_aliases": ["2.0"] |
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.
Unsupported key "version_aliases"
|
||
* <fg=blue;options=bold>Read</> <fg=blue>the documentation and</> <fg=blue;options=bold>ask</> <fg=blue>for help:</> | ||
- Documentation: <comment>https://symfony.com/doc/current/bundles/LiipImagineBundle</> | ||
- Issue Tracker: <comment>https://github.com/liip/LiipImagineBundle/issues</> |
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.
The last paragraph should be removed.
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.
Done!
This pull request adds a Symfony Flex recipe for
LiipImagineBundle
, a popular image manipulation bundle that leverages the Imagine Library internally.I am waiting for some reviews from my fellow bundle maintainers, so do not merge this immediately. Also, as there isn't much information or many examples on writing these recipes yet, I look forward to fielding reviews or change requests from this repository's maintainers, as well.
Hopefully, this bundle will land in the exciting Symfony Flex ecosystem shortly!