[GH-ISSUE #17] Share project via Packagist.org #12

Closed
opened 2026-03-03 14:33:54 +03:00 by kerem · 14 comments
Owner

Originally created by @rvanlaak on GitHub (May 22, 2014).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/17

This would be a great addition to my Symfony project, which makes use of Composer to handle the package dependencies.

Any option that this project can be required via Packagist.org ?

Originally created by @rvanlaak on GitHub (May 22, 2014). Original GitHub issue: https://github.com/lipis/flag-icons/issues/17 This would be a great addition to my Symfony project, which makes use of Composer to handle the package dependencies. Any option that this project can be required via Packagist.org ?
kerem closed this issue 2026-03-03 14:33:54 +03:00
Author
Owner

@lipis commented on GitHub (May 22, 2014):

Never used it before so what do I have to do on my side?

Any chance that you can simply use Bower for your front end stuff?!

<!-- gh-comment-id:43898021 --> @lipis commented on GitHub (May 22, 2014): Never used it before so what do I have to do on my side? Any chance that you can simply use Bower for your front end stuff?!
Author
Owner

@rvanlaak commented on GitHub (May 23, 2014):

I've been looking into the 'components' repository over here at Github, which all are available via Packagist.

But, as can be seen in the FontAwesome repo, they still have to update manually. The easiest way is to add a composer.json to your own project and add it to Packagist.org.

Nice article about this can be found here:
http://tech.arendjantetteroo.nl/blog/2013/11/06/switching-from-bower-to-composer-with-components/

<!-- gh-comment-id:43981154 --> @rvanlaak commented on GitHub (May 23, 2014): I've been looking into the 'components' repository over here at Github, which all are available via [Packagist](https://packagist.org/search/?q=components). But, as can be seen in the [FontAwesome repo](https://github.com/components/font-awesome), they still have to update manually. The easiest way is to add a `composer.json` to your own project and add it to Packagist.org. Nice article about this can be found here: http://tech.arendjantetteroo.nl/blog/2013/11/06/switching-from-bower-to-composer-with-components/
Author
Owner

@roest01 commented on GitHub (Jun 6, 2014):

+1

<!-- gh-comment-id:45363960 --> @roest01 commented on GitHub (Jun 6, 2014): +1
Author
Owner

@lipis commented on GitHub (Jun 6, 2014):

hey.. totally forgot about that.. I will do something about it I the coming days..

<!-- gh-comment-id:45373428 --> @lipis commented on GitHub (Jun 6, 2014): hey.. totally forgot about that.. I will do something about it I the coming days..
Author
Owner

@lipis commented on GitHub (Jun 10, 2014):

@Rvanlaak Do you mind creating a PR with the valid composer.json for this app and then I will add it to Packagist..

<!-- gh-comment-id:45683831 --> @lipis commented on GitHub (Jun 10, 2014): @Rvanlaak Do you mind creating a PR with the valid `composer.json` for this app and then I will add it to Packagist..
Author
Owner

@rvanlaak commented on GitHub (Jun 11, 2014):

Well, the thing is that adding a composer.json does not directly make the package usable by Symfony. All code will be added to the /vendor folder, where it should be in the /web folder.

A possible solution would be to let composer install assets via an extra plugin. Can you take a look at the following two options?

<!-- gh-comment-id:45712756 --> @rvanlaak commented on GitHub (Jun 11, 2014): Well, the thing is that adding a `composer.json` does not directly make the package usable by Symfony. All code will be added to the `/vendor` folder, where it should be in the `/web` folder. A possible solution would be to let composer install assets via an extra plugin. Can you take a look at the following two options? - https://github.com/atelierspierrot/assets-manager - http://www.phpclasses.org/blog/package/8429/post/1-Using-Composer-to-Install-JavaScript-CSS-and-Images-Under-the-Web-Document-Directory.html
Author
Owner

@ickbinhier commented on GitHub (Jun 16, 2014):

or via https://github.com/RobLoach/component-installer

"extra": {
    "component": {
        "name": "flag-icon-css",
        "files": [
            "js/datei1.js",
            "css/datei2.css",
            "oder_das_verzeichnis_mit_allem_inhalt/**"
        ]
    }
}
<!-- gh-comment-id:46151767 --> @ickbinhier commented on GitHub (Jun 16, 2014): or via https://github.com/RobLoach/component-installer ``` "extra": { "component": { "name": "flag-icon-css", "files": [ "js/datei1.js", "css/datei2.css", "oder_das_verzeichnis_mit_allem_inhalt/**" ] } } ```
Author
Owner

@lipis commented on GitHub (Jun 16, 2014):

So here you are!! https://packagist.org/packages/components/flag-icon-css

<!-- gh-comment-id:46237162 --> @lipis commented on GitHub (Jun 16, 2014): So here you are!! https://packagist.org/packages/components/flag-icon-css
Author
Owner

@lipis commented on GitHub (Jun 16, 2014):

Let me know if it actually worked on your sides :)

<!-- gh-comment-id:46237194 --> @lipis commented on GitHub (Jun 16, 2014): Let me know if it actually worked on your sides :)
Author
Owner

@rvanlaak commented on GitHub (Jun 17, 2014):

Nice! Will try in the near future

<!-- gh-comment-id:46278191 --> @rvanlaak commented on GitHub (Jun 17, 2014): Nice! Will try in the near future
Author
Owner

@roest01 commented on GitHub (Jun 19, 2014):

Works like a charm - thank you :)

<!-- gh-comment-id:46552636 --> @roest01 commented on GitHub (Jun 19, 2014): Works like a charm - thank you :)
Author
Owner

@lipis commented on GitHub (Jun 19, 2014):

nice.. I thought about it later.. but instead of component/.. I might
rename it to lipis/.. or something, but either case it works :)

<!-- gh-comment-id:46552778 --> @lipis commented on GitHub (Jun 19, 2014): nice.. I thought about it later.. but instead of `component/..` I might rename it to `lipis/..` or something, but either case it works :)
Author
Owner

@ickbinhier commented on GitHub (Jun 19, 2014):

you can it rename to 'lipis/'

<!-- gh-comment-id:46562935 --> @ickbinhier commented on GitHub (Jun 19, 2014): you can it rename to 'lipis/'
Author
Owner

@roest01 commented on GitHub (Jun 19, 2014):

I would prefer to let it on '/component'
Structure in Symfony2 for libs is

/vendor/
/vendor/js
/vendor/css/
/vendor/packageName/....

bower seems to use the /component/ folder as default - so there of course there are some bower packages in packagist (like your's) and if you use one of it - you will have the component folder next to the vendor folder.

/vendor/
/vendor/css/
/component/flag-icon-css/  

Finaly the nicest solution for me is to have everything in /vendor/ but this seems not to be useful because of different package manager defaults.
The best compromise is to have a vendor for libs and bundles and components for frontent stuff installed with bower.
the badest solution (for me) is, to have a third folder next to them - vendor, component and libs ...

So I suggest to keep the 'component/' folder setting and orientate at the bower defaults.

<!-- gh-comment-id:46564416 --> @roest01 commented on GitHub (Jun 19, 2014): I would prefer to let it on '/component' Structure in Symfony2 for libs is ``` /vendor/ /vendor/js /vendor/css/ /vendor/packageName/.... ``` bower seems to use the /component/ folder as default - so there of course there are some bower packages in packagist (like your's) and if you use one of it - you will have the component folder next to the vendor folder. ``` /vendor/ /vendor/css/ /component/flag-icon-css/ ``` Finaly the nicest solution for me is to have everything in /vendor/ but this seems not to be useful because of different package manager defaults. The best compromise is to have a vendor for libs and bundles and components for frontent stuff installed with bower. the badest solution (for me) is, to have a third folder next to them - vendor, component and libs ... So I suggest to keep the 'component/' folder setting and orientate at the bower defaults.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flag-icons#12
No description provided.